add vmm grid support#76
Conversation
stijnvanhoey
left a comment
There was a problem hiding this comment.
Thanks for fitting it in the current implementation withou big refactorings.
I do have some comment, but should be easy to update.
| VMM_GRID_AUTH = "https://hydro.vmm.be/kiwis-auth/token" | ||
|
|
||
| # Provider registry for easier maintenance | ||
| PROVIDERS = { |
There was a problem hiding this comment.
Good idea, thanks. Also relevant for @TimFranken
|
Thanks for the review @stijnvanhoey . I adjusted your comments, and provided a little bit more detail about the attributes of the hdf5-file. The PR is ready for review again. |
stijnvanhoey
left a comment
There was a problem hiding this comment.
Thanks a lot, with these adjustments I do think we are good to go
| "extra_deps": 1, | ||
| # True if extra dependencies are required for this provider. | ||
| # Add the dependencies to the setup.cfg under '[options.extras_require]' | ||
| "extra_deps": True, |
There was a problem hiding this comment.
Thanks, good to have this feedback to the user
…r other providers
stijnvanhoey
left a comment
There was a problem hiding this comment.
Still a depdency issue
now we hit to pytz issue also here in this PR -> https://github.com/fluves/pywaterinfo/actions/runs/24124066789/job/70384387893?pr=76 I propose we first merge #77 as we will remove pytz dependency which will hopefully solve also the issues in this PR |
|
I have also updated python versions of the CI pipelines for pypi deployment and documentation building (3.9 -> 3.11) |
stijnvanhoey
left a comment
There was a problem hiding this comment.
Thanks for the update and adjustments, ready to merge!
Hi @stijnvanhoey , after our discussion on how to support for the raster data products, I could work on the remaining issues and now here we add support for:
Changes
Waterinfo.request_kiwis()method is made. Now, it is possible to passreturn_bytesio: boolargument to optionally return raw binary data (via BytesIO), enabling support for file downloads and non-JSON responses from the grid API.getRasterTimeseriesValuesas xarray Dataset,parse_waterinfo_hdf5()is added. (which I believe the moduleparser.pyshould also hold the specific json parsing logic forgetTimeseriesValues,getTimeseriesValueLayer,getGroupList,getTimeseriesListrequest types)getRasterTimeseriesValues,Waterinfo.get_raster_timeseries_values()method is addedI really enjoyed implementing and exploring the data on a map. I hope you also enjoy reviewing and giving it a try 😃
closes #66 . However there are still room for improvements for VMM-Grid api (more request types are available such as
GetRasterToPointValues,GetRasterFile)