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

Unit handling and round-trip .nc conversion fixes #13

Merged
merged 11 commits into from
Nov 30, 2023

Conversation

tbody-cfs
Copy link
Collaborator

No description provided.

@tbody-cfs tbody-cfs requested a review from hassec November 29, 2023 21:12
@tbody-cfs
Copy link
Collaborator Author

Closes #10

@hassec
Copy link
Collaborator

hassec commented Nov 29, 2023

Before merging this I'd like to make sure we have a way to reproduce the error described in #10. I've tried locally without luck so far and added a test that would catch the in #10 described problem, see #14

@tbody-cfs
Copy link
Collaborator Author

Think I've figured out how to reproduce the error. To fix https://github.com/cfs-energy/cfspopcon/actions/runs/7038938605/job/19156931593?pr=7, I added netcdf4 to the poetry environment. Then I can reproduce #10 with

poetry add netcdf4
rm -rf .venv
poetry install
poetry run python tests/regression_results/generate_regression_results.py
poetry run pytest

@tbody-cfs
Copy link
Collaborator Author

@tbody-cfs
Copy link
Collaborator Author

Copy link
Collaborator

@hassec hassec left a comment

Choose a reason for hiding this comment

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

Just a small change request to add a comment to the conversion logic.

I'd prefer to have dependency updates to the poetry.lock in a separate PR but since you already fixed the mypy stuff here let's merge this as is. But in the future we should try and avoid poetry updates in PRs that have other changes.

tests/test_unit_handling/test_conversions.py Show resolved Hide resolved
cfspopcon/unit_handling/default_units.py Show resolved Hide resolved
cfspopcon/file_io.py Show resolved Hide resolved
Co-authored-by: Christoph Hasse <[email protected]>
cfspopcon/file_io.py Outdated Show resolved Hide resolved
@hassec hassec merged commit dad2abb into cfs-energy:main Nov 30, 2023
6 checks passed
@tbody-cfs tbody-cfs deleted the unit_handling_fixes branch November 30, 2023 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants