Skip to content

Commit e50b631

Browse files
authored
Include grantami-bomanalytics documentation approach (#56)
Add new paragraph and links to bomanalytics examples
1 parent 3567320 commit e50b631

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

doc/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
# Intersphinx mapping
4040
intersphinx_mapping = {
4141
"python": ("https://docs.python.org/dev", None),
42+
"grantami-bomanalytics": ("https://grantami.docs.pyansys.com", None),
4243
# "scipy": ("https://docs.scipy.org/doc/scipy/reference", None),
4344
# "numpy": ("https://numpy.org/devdocs", None),
4445
# "matplotlib": ("https://matplotlib.org/stable", None),

doc/source/documentation_style/class_documentation.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,32 @@ method or attribute on its own page.
7878
pyansys_sphinx_theme.samples.Complex.real
7979
pyansys_sphinx_theme.samples.Complex.imag
8080
pyansys_sphinx_theme.samples.Complex.abs
81+
82+
83+
Documenting Multiple Classes Together
84+
-------------------------------------
85+
86+
To document a set of small but highly cohesive classes, an option
87+
is to combine the two approaches described above. This is done by
88+
including multiple ``autoclass`` directives on the same page with
89+
headings and text blocks as necessary to describe the
90+
relationships between the classes.
91+
92+
For example, the Granta MI BoM Analytics
93+
:external+grantami-bomanalytics:doc:`Part Compliance page <api/compliance/parts>`
94+
first describes the
95+
:external+grantami-bomanalytics:class:`~ansys.grantami.bomanalytics.queries.PartComplianceQuery`
96+
class, and then describes the
97+
:external+grantami-bomanalytics:class:`~ansys.grantami.bomanalytics._query_results.PartComplianceQueryResult`,
98+
and
99+
:external+grantami-bomanalytics:class:`~ansys.grantami.bomanalytics._item_results.PartWithComplianceResult`
100+
classes returned by the query. The classes are only ever
101+
encountered together in this context, so they are documented on a
102+
single page.
103+
104+
In contrast, the
105+
:external+grantami-bomanalytics:class:`~ansys.grantami.bomanalytics.indicators.RoHSIndicator`
106+
and
107+
:external+grantami-bomanalytics:class:`~ansys.grantami.bomanalytics.indicators.WatchListIndicator`
108+
classes are shared across multiple queries, and so they are
109+
documented separately.

0 commit comments

Comments
 (0)