change XTC/TRR tests for lock file presence#5423
Conversation
- fix #5382 - filelock >= 3.29.5 will now never remove the lockfile (avoids a race condition on POSIX): changed the correspond test (xfail for older versions of fielock) - updated doc string XDRBaseReader._load_offsets to indicate that we use filelock - added more docs to XDR page (more details on offsets) - add filelock docs to intersphinx mapping
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #5423 +/- ##
========================================
Coverage 93.85% 93.86%
========================================
Files 182 182
Lines 22509 22510 +1
Branches 3202 3202
========================================
+ Hits 21125 21128 +3
+ Misses 922 921 -1
+ Partials 462 461 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
42127e8 to
7c7724e
Compare
|
Not sure what the linter is complaining about. Pre-commit (with black 24.10) was happy. The feedback from linters/black is close to useless to me as it just says "2 files would be reformatted, 218 files would be left unchanged." without telling me which one. (And please don't make me read the list of 200 files that it touched to find the one that does not say "already well formatted, good job."...). |
|
It looks as if on Win, the lock file is being removed (?!). https://dev.azure.com/mdanalysis/mdanalysis/_build/results?buildId=9343&view=logs&j=dc60759d-7bf7-580f-541c-8b624e38610f&t=c864e5cd-d904-5b0e-978b-27ea9778a5fc&l=843 |
Documentation build overview
10 files changed ·
|
|
We might want to consider switching from FileLock to SoftFileLock because the latter works on NFS, which is typical in HPC environments. See eg https://py-filelock.readthedocs.io/en/latest/concepts.html#what-filelock-doesn-t-protect-against I am happy to postpone this decision, though, and just get this PR merged so that our CI passes reliably again. |
Good point, I'll see if this can be improved. |
|
Are the timeouts expected? |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Seems like a consistent failure with the IMD tests, which is odd given that it's meant to all be accessing localhost only. |
Upstream jobs only run when github.repository == MDAnalysis/mdanalysis. Allow bitflicker64/mdanalysis so this fork can exercise the MDAnalysis#5423 port. - Open linter + GH Actions CI job gates to this fork - Add focused fork-verify-filelock workflow for offset lock tests - Skip IMD tests on the fork only (imdclient 0.2.4 hangs; unrelated)
|
hey, took a look at this and ported the diff onto a fork to re-run the lock tests under current filelock fork PR with the same XDR/test changes: bitflicker64#1 focused run on test_xdr offsets/lock tests with filelock 3.31.0 - both TestXTCReader_offsets::test_offset_lock_created and the TRR twin passed (29 related tests green): the POSIX keep-lockfile + Windows delete-on-release split matches what filelock does now (tox-dev/filelock#577 / >=3.29.5), and the xfail for older versions makes sense. docs / intersphinx / CHANGELOG look fine from here on the remaining red CI here: the timeouts @RMeli / @IAlibay flagged look like IMD + imdclient 0.2.4 (default timeout went 5→600), not this FileLock change. suite doesn’t use pytest-flaky either - only pytest-timeout + xdist - and these read more like hard hangs that burn the full --timeout=200 than intermittent flakes. happy to dig on that separately if useful softfilelock/NFS as a follow-up also seems right rather than blocking this |
|
@IAlibay the latest 0.2.4 release of imdclient ships with an increased timeout (issue Becksteinlab/imdclient#111 , PR Becksteinlab/imdclient#120 ). I am going to quickly raise an issue. |
|
@yuxuanzhuang @IAlibay @RMeli could you please review this PR? The imdclient issue is being addressed in PR #5443 . Thank you. |
IAlibay
left a comment
There was a problem hiding this comment.
Before I even review this PR - @orbeckst this PR is in direct contradiction to our own AI policy. It's unclear to me how we should proceed.
At the very minimum, please provide details on what parts of the code being pushed is AI generated (and how).
|
The yes is a mistake. It should be no — I just made a mistake when I put up the PR. I thought I had edited it but apparently hadn't. Will do now. |
…sis into fix-filelocktest-5382
IAlibay
left a comment
There was a problem hiding this comment.
Just the one thing, otherwise lgtm
| register_plugin("pybtex.style.labels", "keylabel", KeyLabelStyle) | ||
| register_plugin("pybtex.style.formatting", "MDA", KeyStyle) | ||
|
|
||
| mathjax_path = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML" |
There was a problem hiding this comment.
I don't think splitting a URL up is beneficial to understanding. Please revert the black changeand add a fmt: skip?
There was a problem hiding this comment.
Ok, can do; the linter was unhappy with the original long line. I hadn’t considered locally exempting format checks.
There was a problem hiding this comment.
fixed — and now the CI is all 💚
4e089e6 to
dd0636a
Compare
- exempt from black - exempt from flake8 - shortened other offending lines
dd0636a to
e495ba5
Compare
Fixes #5382
Changes made in this Pull Request:
LLM / AI generated code disclosure
LLMs or other AI-powered tools (beyond simple IDE use cases) were used in this contribution: no
PR Checklist
package/CHANGELOGfile updated?package/AUTHORS? (If it is not, add it!)Developers Certificate of Origin
I certify that I can submit this code contribution as described in the Developer Certificate of Origin, under the MDAnalysis LICENSE.