-
Notifications
You must be signed in to change notification settings - Fork 4
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
chore: Update sample data to v0.3.0 #68
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
|
@bouweandela I'm trying to make the tests that depend on the sample data use pytest-regressions where possible to make it easier to bump versions in future |
@@ -123,4 +123,4 @@ fetch-test-data: ## Download any data needed by the test suite | |||
|
|||
.PHONY: update-test-data-registry | |||
update-test-data-registry: ## Update the test data registry | |||
curl --output packages/ref/src/ref/datasets/sample_data.txt https://raw.githubusercontent.com/CMIP-REF/ref-sample-data/refs/heads/main/registry.txt | |||
curl --output packages/ref/src/cmip_ref/datasets/sample_data.txt https://raw.githubusercontent.com/CMIP-REF/ref-sample-data/refs/heads/main/registry.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could avoid the need to manually update the registry file and bump the version to the correct value: how about making this command bump the SAMPLE_VERSION
variable to the latest release of the sample data and adding a bit of code in packages/ref/src/cmip_ref/testing.py that automatically downloads the file from https://raw.githubusercontent.com/CMIP-REF/ref-sample-data/refs/tags/{SAMPLE_VERSION}/registry.txt
if it's not yet available locally? e.g. it could be stored in pooch.os_cache("cmip_ref") / f"sample-data-registry-{SAMPLE_VERSION}.txt"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would also have to/should track the hash of the registry file. I quite like seeing the diff of the registry in the PR. Maybe a future enhancement if we have to do this often.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would also have to/should track the hash of the registry file
The SAMPLE_VERSION git tag/commit already refers to a unique version of that file, so I don't think we would need another one.
If you like seeing the diff to make it more clear which files have changed, maybe we could just make the make update-test-data-registry
also automatically figure out what the latest version is and update SAMPLE_VERSION, so we avoid some manual work and we are sure that the registry file always matches the SAMPLE_VERSION.
* origin/main: Add temporal constraints (#64) case changes ilamb3 to ilamb missing dep added changelog ilamb3 implementation of the example metric
Description
Updates the sample data to v0.3.0 and streamlined some of the tests to minimise the number of hand rolled changes that are required when updating the sample data
Checklist
Please confirm that this pull request has done the following:
changelog/