Replies: 1 comment
-
Would merging all models and runs into a single dataset (with I wouldn't recommend subclassing
Not sure yet how to expose this feature to Xpublish users. Another tricky thing is to properly update OpenAPI specs according to the custom dependency function and route prefix, as FastAPI currently doesn't seem to update the specs when overriding a dependency with a different signature (see fastapi/fastapi#1594). |
Beta Was this translation helpful? Give feedback.
-
I want to serve partial weather forecast data from one or a few forecasting models, and want to keep a history for a few weeks, maybe months. The purpose is to serve subset of forecast parameters for trajectory forecast and hindcast, which is used for stuff like this or this.
The forecast happens in runs, from maybe 2 to 8 runs per day and so have a timestamp like 2020121712 run 00, 03 etc. Clients use data from a single run.
Serving a single run works fine for me but as of now is a singleton. I run uvicorn behind an nginx reverse proxy.
What I have: https://example.com/datasets/u/points/47.0/14.7/47.05/14.8/1/4 (eg the northern wind component, samples from a bounding box and selected height levels)
What I need is something like https://example.com/icon-d2/2020121712/00/u/points/47.0/14.7/47.05/14.8/1/4
How should I go about it?
One idea would be to subclass xpublish.Rest and override get_dataset_collection_keys(). Making sense?
thanks for any suggestions,
Michael
edit: reading up on the FastAPI docs this seems a viable solution for the setup above:
I'd prefer to do this without modifying Xpublish. Feasible?
Beta Was this translation helpful? Give feedback.
All reactions