-
Notifications
You must be signed in to change notification settings - Fork 122
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
Add variables argument to the DatacubeExtension apply
method
#782
Add variables argument to the DatacubeExtension apply
method
#782
Conversation
I don't have a lot of experience with type hints, so I'm not sure what to do about the following test failure:
Is there a convention for checking a |
We have mostly been handling this within the tests by using something like the following: cube = DatacubeExtension.ext(item)
cube_variables = cube.variables
assert cube_variables is not None
key, value = cube_variables.popitem() It's a bit verbose, but |
I'll include a commit updating the changelog when/if workflow approval is granted, which I presume will do the coverage check. |
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.
Thanks for catching and fixing this @itcarroll! I'll merge once the CHANGELOG has been updated.
Added to the CHANGELOG. It looks like the coverage workflow still requires approval to run. |
Yeah, I've noticed really long lag times in Codecov posting back to the PR and sometimes it seems to take a few CI runs before it triggers. Looks like things are good on that front, thanks for the work on this! |
Related Issue(s):
Description:
An optional argument is added to the
DatacubeExtension.apply
method calledvariables
and handed off to the variable setter. The argument is optional because Variable Objects are optional in the datacube extension spec.A new
test_apply_variables
method for theDatacubeTest
class does a round-trip check on a variable present in the example item usingapply
.PR Checklist:
pre-commit run --all-files
)scripts/test
)