-
Notifications
You must be signed in to change notification settings - Fork 12
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 CLI for days above tas indicator #48
Conversation
|
||
default_dev_bucket = "physrisk-hazard-indicators-dev01" | ||
|
||
|
||
class OscZarr(WriteDataArray): |
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.
@joemoorhouse I'd like to attract your attention to these two typing changes. I had to do these changes because mypy
was failing. These new failures weren't due to my own changes, but because the CLI I added in this PR uses code that wasn't typed-checked before. More precisely, my CLI is essentially a copy of the launcher notebook, which wasn't typed check.
- I changed the inherited class to
ReadWriteDataArray
because this is whatIndicatorModel.run_all
requires for itstarget
argument type. - I changed store to
any
, following whatzarr
expects downstream.
If you see any problem with this let me know and I'll reopen a PR, but I'd like to move forward in the meanwhile.
@@ -31,7 +31,7 @@ def test_create_inventory(test_output_dir): # noqa: F811 | |||
|
|||
# path = os.path.join(test_output_dir) | |||
|
|||
docs_store = DocStore(bucket=path, fs=local_fs, prefix="hazard") |
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.
@joemoorhouse again here we had a quite confusing pattern where, even for a local DocStore
we had to pass a 'prefix' and a 'bucket'.
I changed things so that we can pass a local_path
if fs
is a local filesystem.
Solves #44
@joemoorhouse this is a draft PR but the general idea is here (I'm relying on google's fire module to create a CLI).
This will then be packaged in a docker container and OGC application package. The biggest questions are :