-
-
Notifications
You must be signed in to change notification settings - Fork 132
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
Improve tests #757
Improve tests #757
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #757 +/- ##
==========================================
- Coverage 89.90% 89.60% -0.30%
==========================================
Files 45 45
Lines 3713 3713
==========================================
- Hits 3338 3327 -11
- Misses 375 386 +11 ☔ View full report in Codecov by Sentry. |
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.
This is great! Also good to have added tests for: alternative samplers, dropping NaNs, amongst others.
I think this is good for now. But I know pytest also allows for a conftest.py
file that allows you to reuse fixtures in multiple test files. Perhaps in the future we could explore putting simulated data and built models in this file to share amongst the other test files. For example, any test functions for interpret
requires loading / simulating of data and building models also.
This reverts commit 8dd25b1.
@tomicapretto I am pretty sure I prematurely merged this into main. Even though all the checks passed, this branch is behind main by 2 commits (per viewing this PR's branch). I think we need to revert and rebase first. |
Did we ever take care of this? 🙈 |
As I wrote in #753, our tests were taking too much time to run. One of the reasons is that we had a
test_predict.py
file where we wanted to test whether we could compute predictions for a variety of models, but we ended up rebuilding and refitting many models already tested intest_built_models.py
.In this PR I'm moving and merging many tests from
test_predict.py
andtest_built_model.py
intotest_models.py
. There's a class for every model family. There we implement as many methods as needed. The goal is to avoid building and fitting the same model more than once.I'm sure there's still room for improvement and reorganization. But I think this is now in a better state. And on top of that, I already invested a couple of days on this and I think it's more than enough 😅.
As soon as the run finishes on my end I will add the time it takes now. Before these changes, running the tests took 1709.07 seconds on my end (28:29 minutes)
Edit After the changes it took 949.76 seconds (15:49)