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

Fix date-based restart pruning breaking on empty restart dirs #376

Merged

Conversation

jo-basevi
Copy link
Collaborator

Fix issue described in #375, Closes #375

Instead of raising an exception when restart file can't be found, a warning is printed and the restart is ignored from date-based restart pruning.

Also, moved code for restart file parsing for ocean_solo.res to a mixin mom class. This mixin class is then pulled into the mom and mom6 model drivers.

@coveralls
Copy link

coveralls commented Oct 23, 2023

Coverage Status

coverage: 45.707% (+0.2%) from 45.539% when pulling ea9cbef on jo-basevi:375-date-based-restart-MOM-mixin into a336968 on payu-org:master.

aidanheerdegen
aidanheerdegen previously approved these changes Oct 31, 2023
Copy link
Collaborator

@aidanheerdegen aidanheerdegen 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.

payu/experiment.py Show resolved Hide resolved
@pep8speaks
Copy link

pep8speaks commented Nov 1, 2023

Hello @jo-basevi! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2023-11-01 05:36:34 UTC

…nd mom6 drivers

- add a test for date-based restart pruning ignoring empty restart directories
@jo-basevi jo-basevi force-pushed the 375-date-based-restart-MOM-mixin branch from 6044072 to ea9cbef Compare November 1, 2023 05:36
Copy link
Collaborator

@aidanheerdegen aidanheerdegen left a comment

Choose a reason for hiding this comment

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

Good to merge I think. Sorry it has taken a while to get back to it.

payu/experiment.py Show resolved Hide resolved
test/test_prune_restarts.py Show resolved Hide resolved
@jo-basevi jo-basevi merged commit 9523ae3 into payu-org:master Nov 8, 2023
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.

date-based restart pruning breaks with empty restart directories
4 participants