-
Notifications
You must be signed in to change notification settings - Fork 4
Use semantikon annotation for units in a random number of functions #467
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
Open
samwaseda
wants to merge
9
commits into
main
Choose a base branch
from
semantikon
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
5d009be
add units
samwaseda 22f3489
Merge remote-tracking branch 'origin' into semantikon
samwaseda e073bdc
Use units for optimizer
samwaseda 3093ba0
Add units everywhere
samwaseda 32cadf8
Add semantikon to environment
samwaseda dfacb26
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 9d3b0ff
Add semantikon to environment-old
samwaseda ac99710
Merge branch 'semantikon' of github.com:pyiron/atomistics into semant…
samwaseda 278634e
Forgot to remove print statement
samwaseda 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 hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,4 @@ dependencies: | |
- pyiron_lammps =0.3.2 | ||
- pyiron_vasp =0.2.4 | ||
- sphinx_parser =0.0.1 | ||
- semantikon =0.0.16 |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ dependencies: | |
- sphinx_parser =0.0.1 | ||
- tqdm =4.67.1 | ||
- pyiron_vasp =0.2.5 | ||
- semantikon =0.0.16 |
This file contains hidden or 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 hidden or 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.
💡 Verification agent
🧩 Analysis chain
Good unit specification for displacement parameter.
The displacement parameter is appropriately annotated with angstrom units, which clearly communicates its physical meaning and enables automatic unit conversion.
There is a similar function in atomistics/workflows/quasiharmonic.py that also has a displacement parameter. Consider adding unit annotations there as well for consistency:
🏁 Script executed:
Length of output: 368
🏁 Script executed:
Length of output: 5925
Add unit annotation for displacement in QuasiHarmonic helper
The phonons helper correctly uses
to convey units, but the QuasiHarmonic
generate_structures_helper
still has a plain float:• File: atomistics/workflows/quasiharmonic.py
• Around line 367 in the
def generate_structures_helper(...)
signatureUpdate the parameter to match the phonons helper:
And add the corresponding import for
u
if it’s not already present: