Skip to content

Commit bbf356e

Browse files
committed
doc: Exclude private API
Set `__all__`, and remove some modules from the API doc completely.
1 parent c64ec7a commit bbf356e

File tree

12 files changed

+43
-16
lines changed

12 files changed

+43
-16
lines changed

doc/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import exhale_multiproject_monkeypatch # noqa: F401
1919
except ModuleNotFoundError:
2020
# for unclear reasons, the import of exhale_multiproject_monkeypatch
21-
# fails on some systems, because the the location of the editable install
21+
# fails on some systems, because the location of the editable install
2222
# is not automatically added to sys.path ¯\_(ツ)_/¯
2323
import json
2424
from importlib.metadata import Distribution
@@ -206,6 +206,7 @@ def install_doxygen():
206206
"special-members": "__init__",
207207
"inherited-members": True,
208208
"undoc-members": True,
209+
"ignore-module-all": False,
209210
}
210211

211212
# sphinx-autodoc-typehints

doc/python_modules.rst

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,16 @@ AMICI Python API
77
:toctree: generated
88

99
amici
10-
amici.importers.utils
1110
amici.importers.sbml
12-
amici.importers.sbml.conserved_quantities_demartino
13-
amici.importers.sbml.conserved_quantities_rref
14-
amici.importers.sbml.utils
1511
amici.importers.sbml.splines
1612
amici.importers.pysb
1713
amici.importers.bngl
1814
amici.importers.antimony
1915
amici.importers.petab
2016
amici.importers.petab.v1
21-
amici.importers.petab.v1.import_helpers
22-
amici.importers.petab.v1.parameter_mapping
23-
amici.importers.petab.v1.petab_import
24-
amici.importers.petab.v1.pysb_import
25-
amici.importers.petab.v1.sbml_import
2617
amici.jax
27-
amici.exporters.sundials.de_export
2818
amici.sim.sundials
2919
amici.sim.sundials.plotting
3020
amici.sim.sundials.gradient_check
3121
amici.sim.sundials.petab.v1
32-
amici.logging
3322
amici.adapters.fiddy

python/sdist/amici/__init__.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
"""
2-
AMICI
3-
-----
4-
52
The AMICI Python module provides functionality for importing SBML or PySB
63
models and turning them into C++ Python extensions.
74
"""
@@ -18,6 +15,14 @@
1815
from types import ModuleType
1916
from typing import Any
2017

18+
__all__ = [
19+
"import_model_module",
20+
"AmiciVersionError",
21+
"get_model_root_dir",
22+
"get_model_dir",
23+
"__version__",
24+
]
25+
2126

2227
def _get_amici_path():
2328
"""

python/sdist/amici/adapters/fiddy.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
Adapters for using AMICI with the `fiddy <https://github.com/ICB-DCM/fiddy/>`__
33
package for finite difference checks.
44
5-
NOTE: Like fiddy, this module is experimental and subject to change.
5+
6+
.. note::
7+
8+
Like fiddy, this module is experimental and subject to change.
69
"""
710

811
from __future__ import annotations

python/sdist/amici/importers/antimony/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
from pathlib import Path
88

9+
__all__ = ["antimony2sbml", "antimony2amici"]
10+
911

1012
def antimony2sbml(ant_model: str | Path) -> str:
1113
"""Convert Antimony model to SBML.

python/sdist/amici/importers/bngl/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
from ..pysb import pysb2amici
1111

12+
__all__ = ["bngl2amici"]
13+
1214

1315
def bngl2amici(bngl_model: str, *args, **kwargs) -> None:
1416
r"""

python/sdist/amici/importers/pysb/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@
5252
symbol_with_assumptions,
5353
)
5454

55+
__all__ = [
56+
"pysb_model_from_path",
57+
"pysb2amici",
58+
"pysb2jax",
59+
]
60+
5561
CL_Prototype = dict[str, dict[str, Any]]
5662
ConservationLaw = dict[str, dict | str | sp.Basic]
5763

python/sdist/amici/importers/sbml/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,13 @@
7373
)
7474
from amici.logging import get_logger, log_execution_time, set_log_level
7575

76+
__all__ = [
77+
"SbmlImporter",
78+
"SBMLException",
79+
"MeasurementChannel",
80+
"assignment_rules_to_observables",
81+
]
82+
7683
SymbolicFormula = dict[sp.Symbol, sp.Expr]
7784

7885

python/sdist/amici/importers/sbml/conserved_quantities_demartino.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
from amici.logging import get_logger
88

9+
__all__ = ["compute_moiety_conservation_laws"]
10+
911
logger = get_logger(__name__, logging.ERROR)
1012

1113
# increase recursion limit for recursive quicksort

python/sdist/amici/importers/sbml/conserved_quantities_rref.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
import numpy as np
66

7+
__all__ = ["nullspace_by_rref", "rref"]
8+
79

810
def rref(
911
mat: np.array, round_ndigits: Literal[False] | int | None = None

0 commit comments

Comments
 (0)