stevej2608 / dash-svg

SVG support library for Plotly/Dash
Other
15 stars 3 forks source link

Generate API documentation #5

Open sbliven opened 1 year ago

sbliven commented 1 year ago

Is the generated API documented anywhere? This would be useful for documenting particular version (if https://developer.mozilla.org changes), as well as documenting the expected parameters.

Guessing valid parameters from the SVG documentation is not always straightforward (for instance Ellipse accepts x and y in addition to the svg-style cx and cy). It also wasn't clear to me when starting out whether all parameters expect strings or if python types would work too (eg if Polygon would accept a list of points like [(0,0), (0,1),...]

stevej2608 commented 1 year ago

The SVG package is generated using the same tooling as that used to create the Dash core and html packages. The API in each case is defined by the function docstrings. I use VSCODE and python intellisense works well.

There must be python cli tools that can read the package docstrings and spit them out in some other format, html, read the docs, or whatever.

The Dash tooling doesn't currently emit typings, it would be great if it did.

Cheers, Steve