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

Update tests for ewatercycle 2.3.1 #9

Merged
merged 5 commits into from
Sep 19, 2024
Merged

Conversation

BSchilperoort
Copy link
Member

@BSchilperoort BSchilperoort commented Sep 17, 2024

Closes #8

I re-rendered the forcing notebook.

The model.ipynb notebook ran without issues.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@@ -169,8 +171,7 @@ def test_saved_yaml_content(self, forcing, tmp_path):

def test_saved_yaml(self, forcing, tmp_path):
saved_forcing = WflowForcing.load(tmp_path)
# shape should is not included in the yaml file
forcing.shape = None
forcing.shape = forcing.directory / "Rhine.shp"
Copy link
Member Author

Choose a reason for hiding this comment

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

shape is now copied upon saving, so this behavior changed.

@@ -28,6 +28,7 @@ class WflowForcing(DefaultForcing):
Inflow (str) = None: Variable name of inflow data in input file.
"""

filenames: dict[str, str] = {}
Copy link
Member Author

Choose a reason for hiding this comment

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

I chose to leave this empty as wflow (old python version) requires a single netcdf for multiple variables. It had to be included though to follow the parent class.

Copy link
Member

Choose a reason for hiding this comment

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

weird that extending needs you to repeat the properties, oh well.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah not sure, didn't have to do this with Hype. I'll double check...

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh it runs fine without that line now 🤦‍♂️

Copy link
Member

@sverhoeven sverhoeven left a comment

Choose a reason for hiding this comment

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

Looks good to me

@@ -28,6 +28,7 @@ class WflowForcing(DefaultForcing):
Inflow (str) = None: Variable name of inflow data in input file.
"""

filenames: dict[str, str] = {}
Copy link
Member

Choose a reason for hiding this comment

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

weird that extending needs you to repeat the properties, oh well.

@BSchilperoort
Copy link
Member Author

Didn't need to bump the version: I only modified the tests.

@BSchilperoort BSchilperoort merged commit 159d5a1 into main Sep 19, 2024
1 check passed
@BSchilperoort BSchilperoort deleted the ewatercycle-2.3.1 branch September 19, 2024 09:27
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.

Update tests for ewatercycle v2.1.0
2 participants