Closed ab5424 closed 5 months ago
This update refines the handling of periodic table data in the Molara project. It involves adding new functionalities for data retrieval and storage, updating atom handling logic to accommodate hydrogen isotopes, adjusting testing accordingly, and optimizing the pre-commit configuration to exclude JSON files.
Files | Change Summary |
---|---|
.pre-commit-config.yaml |
Added exclusion for JSON files in the check-yaml hook configuration. |
data/periodic_table/get_json.py |
Retrieves periodic table data, saves it as JSON, includes licensing information. |
src/molara/Structure/atom.py |
Updated to load data from a JSON file, modified handling for hydrogen isotopes. |
src/molara/Structure/periodic_table_copyright.txt |
Added licensing information for periodic table data. |
tests/molara/Structure/test_atom.py |
Modified tests to accommodate changes in the element_symbol_to_atomic_number function. |
.github/workflows/lint.yml |
Updated dependency installation commands and added a new package types-requests . |
develop/colors/get_colors.py |
Introduced a new file to fetch atom colors and generate a JSON file with color information. |
develop/periodic_table/get_pd_data.py |
Added a new file to fetch periodic table data from pymatgen repository and save it to files. |
src/molara/Structure/crystal.py |
Modified the calculation of molar_mass using atomic mass from _pt_data and updated imports. |
src/molara/Structure/io/exporter.py |
Removed import elements and updated writing structure to an xyz-file. |
src/molara/Structure/periodic_table_copyright |
Added a new file containing periodic table data sourced from pymatgen. |
tests/molara/Structure/test_crystal.py |
Updated the calculation of molar mass in the crystal test. |
Objective | Addressed | Explanation |
---|---|---|
Periodic table data (#223) | β | The changes incorporate periodic table data from the pymatgen repository as planned. |
π°β¨ In the garden of code, where the data trees bloom, A rabbit hopped by, with a brush and a broom. Sweeping the bugs, with a twirl and a swoop, Adding sparkles of JSON, in a joyful loop. "Hop, skip, and a jump," it cheerfully said, "Letβs make our code cleaner, before we head to bed!" ππ
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 71.83%. Comparing base (
7431d46
) to head (01a741e
).:exclamation: Current head 01a741e differs from pull request most recent head 68737f8. Consider uploading reports for the commit 68737f8 to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Ready to merge. Next week, I will work on #211 so the user can select the color scheme in the new structure costumizer.
Btw, I deliberately didn't add the libraries used in the developer scripts to the requirements/pyproject. Realistically speaking, these scripts will be executed less than once a year.
Works just fine for me and now we have a good source for the information! Does the MIT clash with our License?
I don't think so, MIT should be more liberal and I made sure that the licenses text is included in the releases
Closes #223
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Documentation
Tests
Chores