-
Notifications
You must be signed in to change notification settings - Fork 4
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
Element composition dict with str and mixed keys #100
Conversation
lmseidler
commented
Jan 6, 2025
- added the capability to use composition dicts with string keys instead of atomic number keys, as well as mixed keys
- added test cases for dict[int, tuple[int, int]], dict[str, tuple[int, int]], dict[str | int, tuple[int, int]]
- added check for validity of provided atomic numbers in composition dict (check, if atomic number in PSE table)
- side-effect is that element composition is effectively a copy of the input argument, protecting the attribute from possibly unwanted changes due to passing by reference when using a dict as input
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.
Looks great! Thanks for contributing!
Before merging:
- Have you checked if
pytest -vv --optional
succeeds as well? (Contains all tests that depend on external non-Python dependencies.) - Can you update the Python API description in
README.md
and the corresponding lines/descriptions in the samplemindlessgen.toml
(only if applicable)? - Can you add a line to
CHANGELOG.md
, describing your changes?
Co-authored-by: Marcel Mueller <marcel.mueller@thch.uni-bonn.de>
Co-authored-by: Marcel Mueller <marcel.mueller@thch.uni-bonn.de>
On my machine, all tests (including |
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.
Great, thanks for your contribution!