pymc-labs / CausalPy

A Python package for causal inference in quasi-experimental settings
https://causalpy.readthedocs.io
Apache License 2.0
881 stars 63 forks source link

Ignore `causalpy/tests/` when running doctest to save a little time #280

Closed jpreszler closed 9 months ago

jpreszler commented 9 months ago

Ignore causalpy/tests/ when running doctest to save a little time. Resolves issue #278.

This cuts out the tests from being run twice, and doesn't doctest the docstrings in the tests - but none of them have examples so the doctests weren't doing much.

Locally, this went from 4m 50s to 3m 20s, so ~40% reduction in time.

drbenvincent commented 9 months ago

Thanks @jpreszler, this looks great. The tests and doctests work for me locally. @ricardoV94 do you think we can get away with merging this despite the failing remote test, which I believe is being caused by the issue (https://github.com/pymc-labs/CausalPy/issues/279) we discussed the other day?

codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (83cb28c) 75.86% compared to head (b747906) 75.86%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #280 +/- ## ======================================= Coverage 75.86% 75.86% ======================================= Files 20 20 Lines 1305 1305 ======================================= Hits 990 990 Misses 315 315 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

drbenvincent commented 9 months ago

Remote tests seem to pass now that https://github.com/pymc-devs/pytensor/pull/550 is addressed in pytensor 2.18.4