-
Notifications
You must be signed in to change notification settings - Fork 10
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
Patch QE n_electrons
#271
Merged
Merged
Patch QE n_electrons
#271
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
2f54135
Add handler for `number_of_electrons`
c17c471
Modify error messages and variable names
0a9cf31
Apply ruff formatting
8d2965a
Improve corrputed format handling
01b1cba
Harden fall-back for corrputed electron count
0f1141b
Apply ruff formatting
7a9288e
Update tests
6dec427
Use subparser instead of multiple quantities
efe1486
Apply ruff formatting
bf7aa7c
Fix mypy
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you send me the text which fails for this regex pattern? as far as i can see this is generic enough for both cases. we should try to keep it in one quantity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pattern isn't failing itself. The schema only needs the 1st match. There was a bug where the parser passed along all 3, violating the shape. The new shape rules actually brought it too light. So we should maybe consider reprocessing QE calcs...
If for some God-foresaken reason the 1st number can't be extracted, it can still be reconstructed from the latter 2.
It's very niche, I can remove that logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you then simply put this logic in swtting the value based on the length of the list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried that first (it's in an older commit). The answer's no, since idk which value(s) is missing when the list is of length 2 or 1. The only choice is to support this corruption recovery or not. Up to you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can then make this as a sub-parser to resolve the electron type, this i think is still a better way than introducing multiple quantites