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

Changes to move the parsing to the ouput from the screen instead of the log file. #84

Conversation

JPchico
Copy link
Collaborator

@JPchico JPchico commented Jun 8, 2023

During the development we discovered that the log file and the stdout print the same information except for warnings and errors, which are only printed in stdout.

To ensure that we can make use of the warnings and errors, the parsing file has been changed from the log file to use the redirected stdout, which is lammps.out.

The information obtained should be the same, but the amount of retrieved files will be less, and the information parsed richer.

The log file can still be retrieved by adding it to the list of additionally retrieved files if the user wishes to do so.

@JPchico JPchico requested review from chrisjsewell and sphuber June 8, 2023 14:51
@JPchico JPchico self-assigned this Jun 8, 2023
@JPchico JPchico added this to the Refactoring and generalization milestone Jun 8, 2023
@codecov
Copy link

codecov bot commented Jun 9, 2023

Codecov Report

Merging #84 (199231d) into develop (2eace50) will decrease coverage by 0.25%.
The diff coverage is 76.31%.

@@             Coverage Diff             @@
##           develop      #84      +/-   ##
===========================================
- Coverage    88.90%   88.65%   -0.25%     
===========================================
  Files           19       19              
  Lines         1451     1455       +4     
===========================================
  Hits          1290     1290              
- Misses         161      165       +4     
Flag Coverage Δ
pytests 88.65% <76.31%> (-0.25%) ⬇️

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

Impacted Files Coverage Δ
aiida_lammps/parsers/inputfile.py 87.23% <ø> (ø)
aiida_lammps/parsers/raw.py 84.61% <66.66%> (ø)
aiida_lammps/parsers/parse_raw/lammps_output.py 89.06% <69.23%> (ø)
aiida_lammps/parsers/base.py 85.22% <78.57%> (ø)
aiida_lammps/calculations/base.py 96.26% <100.00%> (-0.09%) ⬇️
aiida_lammps/calculations/raw.py 100.00% <100.00%> (ø)
aiida_lammps/parsers/parse_raw/__init__.py 100.00% <100.00%> (ø)

@JPchico
Copy link
Collaborator Author

JPchico commented Jun 9, 2023

@chrisjsewell, @sphuber I have changed the parsing to make use of the redirected stdout instead of the log file. The reason behind this is to make sure that we can parse the warnings and errors, which do not seem to be printed in the log file.

We can then use the warnings and errors in the parsing to give the information to the user and or to give proper exit codes related to actual lammps errors

Copy link
Member

@sphuber sphuber left a comment

Choose a reason for hiding this comment

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

Thanks @JPchico looks good to me

@JPchico JPchico merged commit 22cf69c into aiidaplugins:develop Jun 9, 2023
@JPchico JPchico deleted the 83-recycle-add-warnings-and-errors-to-the-parsing branch June 9, 2023 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants