Closed dougiesquire closed 4 months ago
This is the PR I mentioned in the stand up this morning @jo-basevi. I've tagged you for a review.
Yeah, maybe the access-om2 schema could be the default checksum schema? And then it would make sense for check_checksums_over_restarts be the default method in the Model base class? Or alternatively, check_checksums_over_restarts be an external function in accessom2 that can be imported to accessom3
Sounds good to me 😄
If there's an example file for ocean.stats and an expected checksum value for it, I am happy to add in a test for it.
I've added an example ocean.stats
and access-om3-checksums-1-0-0.json
to test/resources
. Would be great if you could write/refactor the tests thanks! (feel free to add to this PR)
Firstly, sorry for force pushing - I only realised after a git push
that I needed to amend a commit message..
So I've updated the extract_checksums tests, it was very good because I noticed that schema has an error which will need to be fixed. I've added that and moving the schema to a more general location in this PR: https://github.com/ACCESS-NRI/schema/pull/24
Once, that is merged I can update the URL to point to a new location and commit, as the url is not used anywhere apart from the tests for extract_checksums under test
.
As part of package tests issue #3, it'll will be good to add in CI to automatically run these tests so it is actually checking the schema validation.
So I've updated the extract_checksums tests, it was very good because I noticed that schema has an error which will need to be fixed. I've added that and moving the schema to a more general location in this PR: https://github.com/ACCESS-NRI/schema/pull/24
Thanks @jo-basevi. Is the idea to merge https://github.com/ACCESS-NRI/schema/pull/24 first so that we can get the tests running here before merging? Or is the plan to update the schema in a subsequent PR (and merge this with failing tests)?
It would be great to merge the schema PR first. But if its needed to merge this to main asap, I can create a separate issue for updating schema url once the schema PR is merged.
But if its needed to merge this to main asap
Nope, I'm not in any particular rush. I agree it would be good to have working tests before merging
@aidanheerdegen looks like we need you to approve (if you're happy to)
I'll rebase this branch onto changes from main as I imagine there's going to be a few merge conflicts
Attention: Patch coverage is 56.33803%
with 31 lines
in your changes are missing coverage. Please review.
Project coverage is 14.36%. Comparing base (
dff16de
) to head (213dd71
). Report is 1 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I ran a test on gadi to double check I didn't mess up the merge, and can confirm no errors when testing a released access-om2-configs configuration.
This PR adds a very basic
AccessOm3
model class. I wrote this a while ago and I see that in the meantime acheck_checksums_over_restarts
method has been added to theAccessOm2
class. From a very quick glance, it looks like theAccessOm3
implementation of this method would be the same. So could this method implementation be moved to theModel
base class?I haven't added any tests to the
test
directory but probsibly should. Lemme know.Closes #7