Skip to content

Conversation

@louismagowan
Copy link
Contributor

@louismagowan louismagowan commented Nov 2, 2025

Closes #378


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

@codecov
Copy link

codecov bot commented Nov 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.48%. Comparing base (81eb020) to head (13e3da0).
⚠️ Report is 3 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@louismagowan louismagowan changed the title Lm type hints Add Type Hints to simulate_data.py Nov 2, 2025
@louismagowan
Copy link
Contributor Author

@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?

@louismagowan
Copy link
Contributor Author

pre-commit.ci autofix

@louismagowan
Copy link
Contributor Author

louismagowan commented Nov 8, 2025

@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?

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 😁

@drbenvincent
Copy link
Collaborator

drbenvincent commented Nov 8, 2025

Sorry about the delay on this - it's been a manic week. I'll try to review this asap.

Agree on the code coverage thing, I'll try to deal with that separately. Cool, will take a look as soon as I can.

@louismagowan
Copy link
Contributor Author

All good, thank you!

@drbenvincent drbenvincent requested a review from Copilot November 10, 2025 14:54
@drbenvincent drbenvincent added the devops DevOps related label Nov 10, 2025
Copy link
Contributor

Copilot AI left a 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_data to accept None as default for lowess_kwargs parameter with proper handling
  • Added tests for generate_regression_discontinuity_data and generate_synthetic_control_data functions
  • 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.

@drbenvincent
Copy link
Collaborator

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. 👍🏻

@louismagowan
Copy link
Contributor Author

@drbenvincent yep pushed a small fix - should be good to go now!

@juanitorduz
Copy link
Collaborator

juanitorduz commented Nov 12, 2025

@drbenvincent, I will merge this one so that I can rebase and continue with #557

@juanitorduz juanitorduz merged commit bc2fbae into pymc-labs:main Nov 12, 2025
10 checks passed
@juanitorduz
Copy link
Collaborator

Thank you @louismagowan 🚀

@juanitorduz juanitorduz mentioned this pull request Nov 12, 2025
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/improve type hints for functions in simulate_data.py

3 participants