Skip to content

Conversation

DrDomenicoMarson
Copy link
Contributor

@DrDomenicoMarson DrDomenicoMarson commented Jul 1, 2025

fix #4671

Changes made in this Pull Request:

  • Added parallelization to polymer.PersistenceLength

PR Checklist

  • Issue raised/referenced?
  • Tests updated/added?
  • Documentation updated/added?
  • package/CHANGELOG file updated?
  • Is your name in package/AUTHORS? (If it is not, add it!)

I haven't added new tests, but I checked that this version pass the relevant tests from the testsuite.

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.


📚 Documentation preview 📚: https://mdanalysis--5074.org.readthedocs.build/en/5074/

Copy link

codecov bot commented Jul 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.85%. Comparing base (96f0b67) to head (3097ddf).
⚠️ Report is 6 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #5074   +/-   ##
========================================
  Coverage    93.85%   93.85%           
========================================
  Files          178      178           
  Lines        22122    22128    +6     
  Branches      3129     3129           
========================================
+ Hits         20763    20769    +6     
  Misses         902      902           
  Partials       457      457           

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

@orbeckst
Copy link
Member

orbeckst commented Jul 2, 2025

@talagayev would you be able to look after this PR? You have plenty of experience with parallelization. You can try and find reviewers or you can review yourself. Ultimately, you're acting like an editor and you try to shepherd the PR to completion.

If you don't have the bandwidth, please say something and un-assign yourself. Thanks!

@talagayev
Copy link
Member

@orbeckst yes I can review and shepherd it and if I have troubles I will probably ask also Yuxuan and Egor for help :)

@orbeckst
Copy link
Member

@talagayev could you provide an initial review so that @DrDomenicoMarson would have some idea what might need to be done?

Copy link
Member

@orbeckst orbeckst left a comment

Choose a reason for hiding this comment

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

Quick comments: You need to add specific tests for the parallel version. Look into https://github.com/MDAnalysis/mdanalysis/blob/develop/testsuite/MDAnalysisTests/analysis/conftest.py and follow the pattern there. You need to define a client_PersistenceLength that will be used for the run(..., **client_PersistenceLength) method.

Then you need to update tests_persistencelength.py to use the new client that you defined. See, for instance,

as an example.

Also include an explicit test for the "parallelizable" attribute. Check existing tests for details (e.g. in test_rms.py or test_lineardensity.py).

@DrDomenicoMarson
Copy link
Contributor Author

Hi, I updated the tests as requested, and added the test for the "parallelizable" attribute. I'm not sure I quite understood 100% of the testing mechanism (as I'm sort of new in such things), but I ran the tests and all passed on my machine.

@talagayev
Copy link
Member

Ah sorry for the late reply, had to focus on work last week, so I didn't have time to focus on this PR. @DrDomenicoMarson from the first look it looks correct and you adjusted the tests as @orbeckst suggested. I will run and check everything also locally from my side to see if everything works

@orbeckst
Copy link
Member

While you were working on this pr did you look at open PR #4871 ? That PR had stalled but if you used anything then we would also add the original PR author.

Copy link
Member

@orbeckst orbeckst left a comment

Choose a reason for hiding this comment

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

Testing looks good, only minor comments.

@talagayev
Copy link
Member

Looks also good from my side, tests run fine locally.

Co-authored-by: Rocco Meli <r.meli@bluemail.ch>
Copy link
Member

@orbeckst orbeckst left a comment

Choose a reason for hiding this comment

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

@DrDomenicoMarson please include your GH handle in the contributor list for 2.10.0 in CHANGELOG.

Everything else looks good to me! Thank you for the contribution!!

@DrDomenicoMarson
Copy link
Contributor Author

#4671

Hi, sorry I didn't check for existing open PR, so I didn't know someone already worked on this!

Copy link
Member

@orbeckst orbeckst left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for your contribution @DrDomenicoMarson !

@orbeckst
Copy link
Member

@talagayev please feel free to squash-merge when all status checks pass.

For the squash-merge, rewrite the log message with the - fixes #4671 bullet point and summarize everything else that was done. Basically, the message for the single squashed commit should read nicely.

Thank you for shepherding the PR to completion! Nice work everyone.

@yuxuanzhuang yuxuanzhuang merged commit 79dead3 into MDAnalysis:develop Aug 6, 2025
23 checks passed
@yuxuanzhuang
Copy link
Contributor

Thanks! @DrDomenicoMarson

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.

MDAnalysis.analysis.polymer: Implement parallelization or mark as unparallelizable
5 participants