Skip to content

Add verbose option to AtomGroup.write for multiframe writing - #5557

Open
steveharington8484 wants to merge 1 commit into
MDAnalysis:developfrom
steveharington8484:develop
Open

steveharington8484 wants to merge 1 commit into
MDAnalysis:developfrom
steveharington8484:develop

Conversation

@steveharington8484

Copy link
Copy Markdown

What

Adds a verbose keyword to AtomGroup.write() that displays a progress bar (MDAnalysis.lib.log.ProgressBar) while writing multiple frames requested via the frames keyword. Resolves the # TODO: Add a 'verbose' option alongside 'frames'..

Changes

  • Added explicit verbose=False parameter to AtomGroup.write() (consumed by the signature, never forwarded to the writer via **kwargs).
  • Multi-frame branch (frames is not None) wraps the frame iteration in ProgressBar(trj_frames, verbose=verbose, desc="Writing frames").
  • Single-frame branch (frames is None) is unchanged.
  • Documented verbose in the docstring with a .. versionadded:: 2.12.0 note.
  • Added tests in TestAtomGroupWriting: verbose frame writing, stderr progress output (capsys), and no forwarding of verbose to writers.

Testing

Full test suite run after the change: 20831 passed, 985 skipped, 7 xfailed, 2 xpassed.

Add a 'verbose' keyword to AtomGroup.write() that displays a progress
bar (MDAnalysis.lib.log.ProgressBar) while writing multiple frames
passed via the 'frames' keyword. The single-frame path is unchanged;
verbose is consumed by write() and not forwarded to the writer.
@read-the-docs-community

Copy link
Copy Markdown

@codecov

codecov Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.93%. Comparing base (5d5a634) to head (6e63d7a).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #5557   +/-   ##
========================================
  Coverage    93.93%   93.93%           
========================================
  Files          184      184           
  Lines        22680    22681    +1     
  Branches      3228     3228           
========================================
+ Hits         21304    21306    +2     
+ Misses         916      915    -1     
  Partials       460      460           

☔ View full report in Codecov by Harness.
📢 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.

@IAlibay IAlibay left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for opening this PR. However as-is, the PR itself doesn't meet our submissions standards.

Could you:

  1. Add back the PR template details - specifically the "developer certificate of origin" and the "LLM / AI generated code disclosure".
  2. Either link to the issue you are trying to fix, or open an issue describing what you are trying to fix.

@orbeckst orbeckst added the close? Evaluate if issue/PR is stale and can be closed. label Nov 25, 2026

This branch has not been deployed

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

Labels

close? Evaluate if issue/PR is stale and can be closed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants