-
Notifications
You must be signed in to change notification settings - Fork 1
Fixing flaky tests #70
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
base: main
Are you sure you want to change the base?
Conversation
…e runners for the matrix
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #70 +/- ##
==========================================
- Coverage 88.16% 87.94% -0.23%
==========================================
Files 7 7
Lines 338 340 +2
==========================================
+ Hits 298 299 +1
- Misses 40 41 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
for more information, see https://pre-commit.ci
|
@hannahbaumann you'll want to build pooch from |
IAlibay
left a comment
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.
Couple of things, still looking into that positions thing.
| POOCH_CACHE = pooch.os_cache("openfe_analysis") | ||
| ZENODO_DOI = "doi:10.5281/zenodo.18378051" | ||
|
|
||
| ZENODO_FILES = { |
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.
We should probably have an "HAS_INTERNET" check on most of our tests.
Maybe todo in a separate issue?
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.
Raised an issue!
|
|
||
|
|
||
| def test_universe_creation(simulation_nc, hybrid_system_pdb): | ||
| with pytest.warns(UserWarning, match="This is an older NetCDF file that"): |
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.
Do we still have a test somewhere to warn for the old netcdf file types?
If not, can we mock one?
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.
The old one was the one with >500MB, I added a new test test_determine_position_indices_warns_for_old_nc that mocks this and gives a warning.
| assert_allclose(u.dimensions, [82.191055, 82.191055, 82.191055, 90.0, 90.0, 90.0]) | ||
| assert_allclose(u.dimensions, [78.141495, 78.141495, 78.141495, 60.0, 60.0, 90.0]) | ||
|
|
||
| u.trajectory.close() |
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.
Are these actually necessary now? __del__ should call self.close (it's a reader thing), so they should get garbage collected when they go out of scope, if they don't then we might still be encountering an issue with closing the files.
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.
I'm not seeing failures without this, I had put it since I wasn't sure if things could be unstable when lots of test run in parallel, but we could remove it for now and if we see problems later again, investigate further?
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.
Since it's only in tests, I would vote for removing and seeing how we fare - it's a good canary.
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.
Remove it!
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.
Added it again, see below.
Co-authored-by: Irfan Alibay <IAlibay@users.noreply.github.com>
|
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
|
@IAlibay : After I removed the different |
That means things aren't being deleted properly.. I'm not sure we can fix it in this PR, can you open an issue and we can revisit later? |
Fixes #43 and #67
This PR: