-
Notifications
You must be signed in to change notification settings - Fork 86
Add Type Hints to simulate_data.py
#544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #544 +/- ##
==========================================
+ Coverage 95.59% 96.48% +0.88%
==========================================
Files 29 29
Lines 2681 2703 +22
==========================================
+ Hits 2563 2608 +45
+ Misses 118 95 -23 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
3b22a00 to
f4062be
Compare
|
@drbenvincent codecov failure seems irrelevant for a PR that just adds type hints right? These were pre-existing issues right, or am I missing something? |
|
pre-commit.ci autofix |
Hi @drbenvincent I added a test on the functions that were causing CodeCov to fail - but I am certain this was a pre-existing issue and nothing related to my PR 🤷 Hopefully this is good to go now though 😁 |
|
Sorry about the delay on this - it's been a manic week. I'll try to review this asap.
|
|
All good, thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds type annotations to data generation functions in the simulate_data.py module and introduces test coverage for two previously untested functions: generate_regression_discontinuity_data and generate_synthetic_control_data.
- Added comprehensive type hints to function signatures, parameters, and return types across all data generation functions
- Modified
generate_synthetic_control_datato acceptNoneas default forlowess_kwargsparameter with proper handling - Added tests for
generate_regression_discontinuity_dataandgenerate_synthetic_control_datafunctions - Fixed typo in comment ("treaated" → "treated")
- Updated interrogate documentation coverage badge from 95.8% to 95.9%
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| docs/source/_static/interrogate_badge.svg | Updated documentation coverage badge to reflect improved docstring coverage (95.8% → 95.9%) |
| causalpy/data/simulate_data.py | Added comprehensive type annotations to all data generation functions and fixed default parameter handling for lowess_kwargs |
| causalpy/tests/test_synthetic_data.py | Added test coverage for generate_regression_discontinuity_data and generate_synthetic_control_data functions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thanks for the PR @louismagowan. I approved, but if you could take a quick look at the copilot review suggestions and either do a commit or let me know if you want to merge is as. 👍🏻 |
|
@drbenvincent yep pushed a small fix - should be good to go now! |
|
@drbenvincent, I will merge this one so that I can rebase and continue with #557 |
|
Thank you @louismagowan 🚀 |
Closes #378
📚 Documentation preview 📚: https://causalpy--544.org.readthedocs.build/en/544/