Skip to content

Conversation

@hannahbaumann
Copy link
Contributor

@hannahbaumann hannahbaumann commented Jan 19, 2026

Fixes #43 and #67

This PR:

  • Closes netcdfs both in the code and in the test
  • Adds pooch caching back in
  • Updates the test; the new simulation_skipped dataset is from CDK2, which has two chains. Since the multichain fix is not in yet, this test currently has large RMSDs
  • Removes flaky argument in tests
  • Uses the skipped test dataset in more tests for not having to use the bigger one everywhere.

@codecov
Copy link

codecov bot commented Jan 19, 2026

Codecov Report

❌ Patch coverage is 97.43590% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 87.05%. Comparing base (5260e3b) to head (2a1d130).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/openfe_analysis/rmsd.py 97.14% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #70      +/-   ##
==========================================
- Coverage   88.16%   87.05%   -1.11%     
==========================================
  Files           7        7              
  Lines         338      340       +2     
==========================================
- Hits          298      296       -2     
- Misses         40       44       +4     

☔ 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.

assert ts.time == times[inx]
assert np.all(u.atoms.positions > 0)
# Positions are not all zero since PBC is not removed
assert np.any(u.atoms.positions != 0)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@IAlibay : This is what I mentioned yesterday. The positions in this nc file are not always >0.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok thanks, that's interesting..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I add this u.trajectory.add_transformations(wrap(u.atoms)) it passes the >0 check.

@hannahbaumann hannahbaumann changed the title [WIP ] Closing netcdfs properly Fixing flaky tests Jan 28, 2026
This was referenced Jan 28, 2026
@hannahbaumann hannahbaumann linked an issue Jan 28, 2026 that may be closed by this pull request
@hannahbaumann hannahbaumann linked an issue Jan 28, 2026 that may be closed by this pull request
@hannahbaumann
Copy link
Contributor Author

pre-commit.ci autofix

Comment on lines +73 to +74
base_url=ZENODO_DOI,
registry=ZENODO_FILES,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

glad you're doing this! it's what I'm moving us toward on the openfe side.

@atravitz
Copy link
Contributor

@hannahbaumann you'll want to build pooch from main (like we are here in openfe) if you're seeing issues with fetching data.

Comment on lines +22 to +23
yield u
u.trajectory.close()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we be doing the same here in openfe?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, xtc files, and trajectories in MDAnalysis overall, do not need this - close should get called on garbage collection and xtc files don't have concurrency issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

improve file clean up Tests are flaky - unclosed NetCDF datasets?

4 participants