Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the parser works when using many thermo_style #166

Merged
merged 3 commits into from
Nov 18, 2024

Conversation

rikigigi
Copy link
Contributor

before the parser was adding all the data in the same array, and parsing the numbers with the last headers found messing up if many headers and data columns were present in the output file.
Now, if many header are present, the old data is forgotten as soon as a new Step ... header is found, and only the last one will be parsed in the output. This allows to parse output from LammpsRawCalculation with different thermo_style without errors, as the one found in https://docs.lammps.org/compute_heat_flux.html#example-input-file

Copy link
Collaborator

@JPchico JPchico left a comment

Choose a reason for hiding this comment

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

Looks very good! Thank you for your contribution! Could I ask that you add a test to this? In that way we can make sure that if something changes in the future this feature does not get left behind.
Thanks!

before the parser was adding all the data in the same array, and parsing
the numbers with the last headers found messing up if many headers and
data columns were present in the output file.
Now, if many header are present, the old data is forgotten as soon as a
new Step ... header is found, and only the last one will be parsed in
the output. This allows to parse output from LammpsRawCalculation
with different thermo_style without errors, as the one found in
https://docs.lammps.org/compute_heat_flux.html#example-input-file

added test
@rikigigi rikigigi force-pushed the fix-parser-step-many branch from 8579a66 to e05db94 Compare November 14, 2024 18:19
Copy link
Collaborator

@JPchico JPchico left a comment

Choose a reason for hiding this comment

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

Fantastic! Thank you for the contribution!

Copy link

codecov bot commented Nov 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.43%. Comparing base (499a6c5) to head (7b198cf).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #166      +/-   ##
==========================================
+ Coverage   85.41%   85.43%   +0.01%     
==========================================
  Files          19       19              
  Lines        1625     1627       +2     
==========================================
+ Hits         1388     1390       +2     
  Misses        237      237              
Flag Coverage Δ
pytests 85.43% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JPchico JPchico merged commit 0bce91d into aiidaplugins:master Nov 18, 2024
10 checks passed
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.

2 participants