mdanalysis icon indicating copy to clipboard operation
mdanalysis copied to clipboard

Adding Appending Functionality method to WriterBase

Open yuxuanzhuang opened this issue 2 years ago • 1 comments

Fixes #3861

Changes made in this Pull Request:

  • add new SingleFrameWriterBase
  • add new flag append for appending trajectory to WriterBase
  • add a check for the number of frames written by WriterBase.
  • make sure write is not overwritten by Writers (they only modified _write_next_frame)

TODO:

  • add tests for writers that are not covered by BaseWriterTest

PR Checklist

  • [x] Tests?
  • [] Docs?
  • [] CHANGELOG updated?
  • [x] Issue raised/referenced?

yuxuanzhuang avatar Oct 14 '22 13:10 yuxuanzhuang

Codecov Report

Base: 94.31% // Head: 94.34% // Increases project coverage by +0.03% :tada:

Coverage data is based on head (523a46f) compared to base (35248e8). Patch coverage: 95.50% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3863      +/-   ##
===========================================
+ Coverage    94.31%   94.34%   +0.03%     
===========================================
  Files          193      193              
  Lines        25024    25068      +44     
  Branches      3374     3376       +2     
===========================================
+ Hits         23601    23651      +50     
+ Misses        1374     1368       -6     
  Partials        49       49              
Impacted Files Coverage Δ
package/MDAnalysis/coordinates/XYZ.py 92.05% <75.00%> (-0.76%) :arrow_down:
package/MDAnalysis/coordinates/PDB.py 95.62% <78.57%> (+0.48%) :arrow_up:
package/MDAnalysis/coordinates/CRD.py 93.20% <100.00%> (+1.04%) :arrow_up:
package/MDAnalysis/coordinates/DCD.py 100.00% <100.00%> (ø)
package/MDAnalysis/coordinates/FHIAIMS.py 95.09% <100.00%> (ø)
package/MDAnalysis/coordinates/GRO.py 96.66% <100.00%> (ø)
package/MDAnalysis/coordinates/H5MD.py 97.60% <100.00%> (-0.01%) :arrow_down:
package/MDAnalysis/coordinates/MOL2.py 97.67% <100.00%> (ø)
package/MDAnalysis/coordinates/NAMDBIN.py 100.00% <100.00%> (ø)
package/MDAnalysis/coordinates/PDBQT.py 87.75% <100.00%> (+0.12%) :arrow_up:
... and 12 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Oct 14 '22 14:10 codecov[bot]