ESM-VFC / esm-vfc-api-demo

MIT License
3 stars 2 forks source link

Refactor using xpublish custom routers #10

Closed benbovy closed 3 years ago

benbovy commented 3 years ago

This simplifies things:

Also closes #6. The /esm/extract_tracks endpoint now returns GeoJSON formatted data, just like input data (field values are returned as feature properties).

TODO:

benbovy commented 3 years ago

Yeah that's a bit unfortunate, but on the other hand it would be a bit overkill to create a pydantic model (with an example) just for the fieldnames parameter.

Maybe we could make it optional (by default return extracted values for all data variables in dataset)?

benbovy commented 3 years ago

The example should work now without any modification.

willirath commented 3 years ago

Looks great now!

benbovy commented 3 years ago

We could do a better job at handling errors (for example, a bad fieldname will return a internal server error), but this could be done later.

I'm going to merge this.

benbovy commented 3 years ago

Actually, I don't have commit rights on this repo so I can't merge it :)

willirath commented 3 years ago

@benbovy I've given you maintainer status here. Lets see if this helps.

benbovy commented 3 years ago

Great, thanks!