CSHS-CWRA / RavenPy

A Python wrapper to setup and run the hydrologic modelling framework Raven
https://ravenpy.readthedocs.io
MIT License
25 stars 5 forks source link

WPS returns datasets : access `band_data` variable #356

Closed tlogan2000 closed 1 month ago

tlogan2000 commented 2 months ago

In notebook 02 using the PAVICS beta image stats_resp.get(asobj=True) returns an xr.Dataset ... plotting requires accessing the band_data variable

See https://github.com/Ouranosinc/pavics-jupyter-env-issues/issues/7

Note this will break the notebook when using current image. Do not merge until all fixes are ready

Fix for https://github.com/Ouranosinc/PAVICS-e2e-workflow-tests/pull/121.

Zeitsperre commented 2 months ago

@tlogan2000 The "current" image copies notebooks based on the master branch? Doesn't the RavenPy version lag by several months already?

We should change this setup.

tlogan2000 commented 2 months ago

@tlogan2000 The "current" image copies notebooks based on the master branch? Doesn't the RavenPy version lag by several months already?

We should change this setup.

I'm not sure how this works exactly ... we'd need to ask @tlvu which version of the notebooks are pulled. Ideally the notebooks pulled would be based on a ravenpy release that is deployed in each pavics image but I have a feeling that it is straight from master

And in the end my feeling is that the 'new' behavior here is not ravenpy but more the version of xarray or rioxarray on PAVICS that changes the return type when accessing the WPS output..

huard commented 2 months ago

I suspect this might have to do with : https://github.com/bird-house/birdy/pull/240/files

coveralls commented 2 months ago

Coverage Status

coverage: 81.764% (+0.09%) from 81.67% when pulling 6ff9f29c9bd6b9209f25ef65edc0c4f0886bffa2 on fixnbs_pavics_betaimage into 0676b1cf7ce6c5585efc04687e9239e060d0de61 on master.

huard commented 2 months ago

This PR would revert to returning a DataArray https://github.com/bird-house/birdy/pull/248