inventree / InvenTree

Open Source Inventory Management System
https://docs.inventree.org
MIT License
3.94k stars 701 forks source link

Add code documentation #4702

Open SchrodingersGat opened 1 year ago

SchrodingersGat commented 1 year ago

Body of the issue

Ref: https://github.com/inventree/InvenTree/issues/2493#issuecomment-1523121443

Ref: https://github.com/mkdocstrings/mkdocstrings

Build code documentation into the InvenTree docs automatically

SchrodingersGat commented 1 year ago

It might be an idea to add a decorator to functions we wish to specify as "API" functions (which we make an effort not to change), while some functions are marked as internal. Or mark internal functions with an underscore prefix, or similar.

Having an API of public functions would help to make them more discoverable for inclusion in generated reports, for example

matmair commented 1 year ago

@SchrodingersGat I think it makes sense to only expose things we want to be included specifically like plugin mixins.

SchrodingersGat commented 1 year ago

So you would suggest an "opt in" approach for which classes and methods we expose?

github-actions[bot] commented 1 year ago

This issue seems stale. Please react to show this is still important.

SchrodingersGat commented 1 year ago

not stale

github-actions[bot] commented 11 months ago

This issue seems stale. Please react to show this is still important.

matmair commented 10 months ago

Still important

github-actions[bot] commented 8 months ago

This issue seems stale. Please react to show this is still important.

matmair commented 8 months ago

still important

github-actions[bot] commented 6 months ago

This issue seems stale. Please react to show this is still important.

wolflu05 commented 3 months ago

I think this is still relevant because this would reduce a lot of duplicate documentation in the docstrings and the documentation.

The suggested library was now also already added as part of #4824 documentation.