Skip to content

Conversation

arthurmello
Copy link
Contributor

@arthurmello arthurmello commented Sep 10, 2024

Closes #356

  • Saves the original dataset in causalpy/data/gt_social_media_data.csv
  • Processes data in the same way as the original example
  • Asserts that WeightedSumFitter, SyntheticControl and the results plot all run without errors

📚 Documentation preview 📚: https://causalpy--407.org.readthedocs.build/en/407/

…config

[pre-commit.ci] pre-commit autoupdate
Copy link
Collaborator

@drbenvincent drbenvincent left a comment

Choose a reason for hiding this comment

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

Thanks @arthurmello ! The only change that's needed is to speed up the tests by asking for fewer samples. We do this in some of the other tests, such as test_integration_pymc_example.py. So we just need to define custom sample kwargs sample_kwargs = {"tune": 20, "draws": 20, "chains": 2, "cores": 2} and pass those in when the model object is first created.

While that is a slight deviation from the original code, it doesn't represent a meaningful change, and it speeds up the tests which is important both locally and remotely.

Copy link

codecov bot commented Sep 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.40%. Comparing base (4b0fcef) to head (f7c7c05).
Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #407      +/-   ##
==========================================
+ Coverage   94.35%   94.40%   +0.05%     
==========================================
  Files          30       31       +1     
  Lines        1967     1985      +18     
==========================================
+ Hits         1856     1874      +18     
  Misses        111      111              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@arthurmello
Copy link
Contributor Author

@drbenvincent yes, it makes sense! I have included those, let me know if anything else is needed.

Copy link
Collaborator

@drbenvincent drbenvincent left a comment

Choose a reason for hiding this comment

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

Looks good to me :)

Thanks for the PR @arthurmello

@drbenvincent drbenvincent merged commit c584272 into pymc-labs:main Sep 16, 2024
8 checks passed
@drbenvincent drbenvincent added the devops DevOps related label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops DevOps related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add test for API stability for a CausalPy example in Causal Inference and Discovery in Python by Aleksander Molak

2 participants