mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add module-level docstrings for each app
This commit is contained in:
parent
b0487b33dc
commit
aa04941bf1
@ -0,0 +1,5 @@
|
||||
"""
|
||||
The InvenTree module provides high-level management and functionality.
|
||||
|
||||
It provides a number of helper functions and generic classes which are used by InvenTree apps.
|
||||
"""
|
@ -0,0 +1,5 @@
|
||||
"""
|
||||
The Build module is responsible for managing "Build" transactions.
|
||||
|
||||
A Build consumes parts from stock to create new parts
|
||||
"""
|
@ -0,0 +1,8 @@
|
||||
"""
|
||||
The Company module is responsible for managing Company interactions.
|
||||
|
||||
A company can be either (or both):
|
||||
|
||||
- Supplier
|
||||
- Customer
|
||||
"""
|
@ -0,0 +1,10 @@
|
||||
"""
|
||||
The Part module is responsible for Part management.
|
||||
|
||||
It includes models for:
|
||||
|
||||
- PartCategory
|
||||
- Part
|
||||
- SupplierPart
|
||||
- BomItem
|
||||
"""
|
@ -0,0 +1,9 @@
|
||||
"""
|
||||
The Stock module is responsible for Stock management.
|
||||
|
||||
It includes models for:
|
||||
|
||||
- StockLocation
|
||||
- StockItem
|
||||
- StockItemTracking
|
||||
"""
|
97
docs/templates/python/module.rst
vendored
Normal file
97
docs/templates/python/module.rst
vendored
Normal file
@ -0,0 +1,97 @@
|
||||
{% if not obj.display %}
|
||||
:orphan:
|
||||
|
||||
{% endif %}
|
||||
:mod:`{{ obj.name }}`
|
||||
======={{ "=" * obj.name|length }}
|
||||
|
||||
.. py:module:: {{ obj.name }}
|
||||
|
||||
{% if obj.docstring %}
|
||||
.. autoapi-nested-parse::
|
||||
|
||||
{{ obj.docstring|prepare_docstring|indent(3) }}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% block subpackages %}
|
||||
{% set visible_subpackages = obj.subpackages|selectattr("display")|list %}
|
||||
{% if visible_subpackages %}
|
||||
Subpackages
|
||||
-----------
|
||||
.. toctree::
|
||||
:titlesonly:
|
||||
:maxdepth: 3
|
||||
|
||||
{% for subpackage in visible_subpackages %}
|
||||
{{ subpackage.short_name }}/index.rst
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block submodules %}
|
||||
{% set visible_submodules = obj.submodules|selectattr("display")|list %}
|
||||
{% if visible_submodules %}
|
||||
Submodules
|
||||
----------
|
||||
|
||||
The {{ obj.name }} module contains the following submodules
|
||||
|
||||
.. toctree::
|
||||
:titlesonly:
|
||||
:maxdepth: 1
|
||||
|
||||
{% for submodule in visible_submodules %}
|
||||
{{ submodule.short_name }}/index.rst
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
{% set visible_children = obj.children|selectattr("display")|list %}
|
||||
{% if visible_children %}
|
||||
{{ obj.type|title }} Contents
|
||||
{{ "-" * obj.type|length }}---------
|
||||
|
||||
{% set visible_classes = visible_children|selectattr("type", "equalto", "class")|list %}
|
||||
{% set visible_functions = visible_children|selectattr("type", "equalto", "function")|list %}
|
||||
{% if include_summaries and (visible_classes or visible_functions) %}
|
||||
{% block classes %}
|
||||
{% if visible_classes %}
|
||||
Classes
|
||||
~~~~~~~
|
||||
|
||||
.. autoapisummary::
|
||||
|
||||
{% for klass in visible_classes %}
|
||||
{{ klass.id }}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block functions %}
|
||||
{% if visible_functions %}
|
||||
Functions
|
||||
~~~~~~~~~
|
||||
|
||||
.. autoapisummary::
|
||||
|
||||
{% for function in visible_functions %}
|
||||
{{ function.id }}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
{% for obj_item in visible_children %}
|
||||
{% if obj.all is none or obj_item.short_name in obj.all %}
|
||||
{{ obj_item.rendered|indent(0) }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user