phenology / springtime

Spatiotemporal phenology research with interpretable models
https://springtime.readthedocs.io
Apache License 2.0
3 stars 2 forks source link

Generate API documentation #149

Closed sverhoeven closed 1 year ago

sverhoeven commented 1 year ago

The code has lots of docstrings it would be nice to see them renderend somewhere like the mkdir api docs.

Peter9192 commented 1 year ago

There's also examples in notebooks for each of the datasets. Might want to limit duplication as it's hard to maintain. Note these can also double as tests. https://github.com/phenology/springtime/tree/main/docs/notebooks

Peter9192 commented 1 year ago

Mkdocstrings uses a python handler. There's a legacy handler based on pytkdocs and a newer handler based on griffe, where pydantic support is still on the todo list. There's been several issues relating to how we use our (typically pydantic) classes, e.g. related to inhering from parents, using class attributes/fields, etc. that have only partly been solved

https://github.com/mkdocstrings/griffe/pull/170 https://github.com/mkdocstrings/pytkdocs/issues/123 https://github.com/mkdocstrings/pytkdocs/issues/9 https://github.com/mkdocstrings/python/issues/40

Note that attributes documented in the class docstring are formatted much nicer than attributes documented inline:

image versus image

Peter9192 commented 1 year ago

TODO: