Skip to content

Conversation

jmafoster1
Copy link
Contributor

@jmafoster1 jmafoster1 commented Feb 17, 2025

  • DataCollector classes have been removed
  • ObservationalDataCollector has been replaced by directly passing dataframes
  • ExperimentalDataCollector has been replaced by ExperimentalEstimator class to directly run models
  • Removed test generation and execution functionality from MetamorphicRelation since this can be done via the JSON front end
  • Moved MetamorphicRelation classes into the testing package instead of specification
  • Changed estimators (except IPCWEstimator) to take a BaseTestCase instead of a treatment and outcome variable

Copy link

github-actions bot commented Feb 17, 2025

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON black 29 0 0.87s
✅ PYTHON pylint 29 0 5.36s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

Copy link

codecov bot commented Feb 17, 2025

Codecov Report

Attention: Patch coverage is 98.93048% with 2 lines in your changes missing coverage. Please review.

Project coverage is 94.64%. Comparing base (48e636d) to head (15fa8ee).
Report is 49 commits behind head on main.

Files with missing lines Patch % Lines
causal_testing/testing/causal_test_result.py 50.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #308      +/-   ##
==========================================
- Coverage   96.87%   94.64%   -2.23%     
==========================================
  Files          29       25       -4     
  Lines        1856     1345     -511     
==========================================
- Hits         1798     1273     -525     
- Misses         58       72      +14     
Files with missing lines Coverage Δ
causal_testing/__init__.py 100.00% <ø> (ø)
causal_testing/estimation/abstract_estimator.py 100.00% <100.00%> (ø)
...esting/estimation/abstract_regression_estimator.py 96.00% <100.00%> (-1.96%) ⬇️
...ausal_testing/estimation/cubic_spline_estimator.py 96.55% <100.00%> (+0.12%) ⬆️
...ausal_testing/estimation/experimental_estimator.py 100.00% <100.00%> (ø)
...ting/estimation/instrumental_variable_estimator.py 100.00% <100.00%> (ø)
causal_testing/estimation/ipcw_estimator.py 99.25% <100.00%> (+<0.01%) ⬆️
..._testing/estimation/linear_regression_estimator.py 100.00% <100.00%> (ø)
...esting/estimation/logistic_regression_estimator.py 100.00% <100.00%> (ø)
causal_testing/specification/causal_dag.py 99.49% <100.00%> (+0.53%) ⬆️
... and 8 more

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1240348...15fa8ee. Read the comment docs.

@jmafoster1 jmafoster1 marked this pull request as ready for review February 17, 2025 13:23
@jmafoster1 jmafoster1 requested a review from f-allian February 17, 2025 13:23
@jmafoster1 jmafoster1 self-assigned this Feb 17, 2025
@jmafoster1
Copy link
Contributor Author

This PR looks to drop the overall percentage code coverage, but that's because I've ripped out a bunch of code, so the proportions have changed slightly.

@jmafoster1
Copy link
Contributor Author

Resolved merging conflicts from main

Copy link
Contributor

@f-allian f-allian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jmafoster1 Thanks Michael, this all looks good. However, we should also update our documentation to reflect these changes too. If you don't have the time let me know and I'll take it on 👍🏼

@jmafoster1
Copy link
Contributor Author

Good point. Done

@jmafoster1 jmafoster1 requested a review from f-allian February 17, 2025 15:44
@jmafoster1 jmafoster1 marked this pull request as ready for review February 18, 2025 16:05
@jmafoster1 jmafoster1 marked this pull request as draft February 19, 2025 15:14
@jmafoster1
Copy link
Contributor Author

I think this is ready for review now. Absolute monster of a PR!

@jmafoster1 jmafoster1 marked this pull request as ready for review February 24, 2025 11:41
@f-allian
Copy link
Contributor

@jmafoster1 This looks fine now. There are still some mentions of the data collector / JSON class in our examples/ directory, but it makes sense to leave that for another PR once we've had our discussions. 👍🏼

@jmafoster1
Copy link
Contributor Author

Thanks Farhad. I had a quick look through and removed all mentions of data collection and JSON from docs and examples by running grep for "collect" and "json" and removing all the problematic content. I agree that we can get this merged in now for the JOSS paper and give the docs a proper overhaul in the coming months, but thought it was important to lose anything that could be confusing or misleading!

@jmafoster1
Copy link
Contributor Author

No need to re-review. Once this batch of tests pass, I'll get this PR merged in and do the JOSS release

@jmafoster1 jmafoster1 merged commit c5d6a8f into main Feb 27, 2025
12 of 13 checks passed
@jmafoster1 jmafoster1 deleted the jmafoster1/remove-data-collector branch February 27, 2025 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants