Skip to content

Commit d1de05d

Browse files
authored
doc: Fix references (#3097)
Fix many of the cross-references broken during the recent renaming and moving of objects. Also fixes some intersphinx references that never worked. Related to #3062.
1 parent d578a31 commit d1de05d

File tree

15 files changed

+55
-54
lines changed

15 files changed

+55
-54
lines changed

doc/implementation_discontinuities.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ Solution Jump Discontinuities
3636

3737
SUNDIALS by itself does not support solution jump discontinuities. We
3838
implement support by accessing private SUNDIALS API in
39-
:cpp:func:`amici::Solver::resetState`,
40-
:cpp:func:`amici::Solver::reInitPostProcess` and
41-
:cpp:func:`amici::Solver::reInitPostProcessB`. These functions reset interval
39+
:cpp:func:`amici::Solver::reset_tate`,
40+
:cpp:func:`amici::Solver::reinit_post_process` and
41+
:cpp:func:`amici::Solver::reinit_post_process_b`. These functions reset interval
4242
variables to initial values to simulate a fresh integration start, but
4343
keep/update the solution history, which is important for adjoint solutions.
4444

include/amici/model.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -884,8 +884,8 @@ class Model : public AbstractModel, public ModelDimensions {
884884
/**
885885
* @brief Sets the estimated lower boundary for sigma_y.
886886
*
887-
* When :meth:`setAddSigmaResiduals` is activated, this lower boundary must
888-
* ensure that log(sigma) + min_sigma > 0.
887+
* When :meth:`set_add_sigma_residuals` is activated, this lower boundary
888+
* must ensure that log(sigma) + min_sigma > 0.
889889
*
890890
* @param min_sigma lower boundary
891891
*/

python/sdist/amici/importers/petab/_petab_importer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ def rdatas_to_measurement_df(
634634
``rdatas`` and own information.
635635
636636
:param rdatas:
637-
A sequence of :class:`amici.ReturnData`.
637+
A sequence of :class:`amici.sim.sundials.ReturnData`.
638638
:param model:
639639
AMICI model used to generate ``rdatas``.
640640
:param petab_problem:
@@ -693,7 +693,7 @@ def rdatas_to_simulation_df(
693693
``rdatas`` and own information.
694694
695695
:param rdatas:
696-
A sequence of :class:`amici.ReturnData`.
696+
A sequence of :class:`amici.sim.sundials.ReturnData`.
697697
:param model:
698698
AMICI model used to generate ``rdatas``.
699699
:param petab_problem:

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

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def pysb2jax(
8989
simulations.
9090
9191
:param model:
92-
pysb model, :attr:`pysb.Model.name` will determine the name of the
92+
pysb model, :attr:`pysb.core.Model.name` will determine the name of the
9393
generated module
9494
9595
:param output_dir:
@@ -98,12 +98,12 @@ def pysb2jax(
9898
:param observation_model:
9999
The different measurement channels that make up the observation
100100
model, see also :class:`amici.importers.utils.MeasurementChannel`.
101-
The ID is expected to be the name of a :class:`pysb.Expression` or
102-
:class:`pysb.Observable` in the provided model that should be mapped to
103-
an observable.
104-
``sigma`` is expected to be the name of a :class:`pysb.Expression` to
105-
be mapped to the scale parameter of the noise distribution.
106-
``MeasurementChannel.formula`` is expected to be
101+
The ID is expected to be the name of a :class:`pysb.core.Expression` or
102+
:class:`pysb.core.Observable` in the provided model that should be
103+
mapped to an observable.
104+
``sigma`` is expected to be the name of a :class:`pysb.core.Expression`
105+
to be mapped to the scale parameter of the noise distribution.
106+
:attr:`MeasurementChannel.formula` is expected to be
107107
``None``. Event-observables are not supported.
108108
109109
:param verbose: verbosity level for logging, True/False default to
@@ -124,11 +124,12 @@ def pysb2jax(
124124
https://github.com/AMICI-dev/AMICI/pull/1672
125125
126126
:param model_name:
127-
Name for the generated model module. If None, :attr:`pysb.Model.name`
128-
will be used.
127+
Name for the generated model module.
128+
If None, :attr:`pysb.core.Model.name` will be used.
129129
130130
:param pysb_model_has_obs_and_noise:
131-
if set to ``True``, the pysb model is expected to have extra observables and noise variables added
131+
If set to ``True``, the pysb model is expected to have extra
132+
observables and noise variables added.
132133
"""
133134
model_name = model_name or model.name
134135

@@ -199,15 +200,16 @@ def pysb2amici(
199200
The different measurement channels that make up the observation
200201
model, see also :class:`amici.importers.utils.MeasurementChannel`.
201202
The ID is expected to be the name of a :class:`pysb.core.Expression` or
202-
:class:`pysb.Observable` in the provided model that should be mapped to
203-
an observable.
204-
``sigma`` is expected to be the name of a :class:`pysb.Expression` to
205-
be mapped to the scale parameter of the noise distribution.
206-
``MeasurementChannel.formula`` is expected to be
203+
:class:`pysb.core.Observable` in the provided model that should be
204+
mapped to an observable.
205+
``sigma`` is expected to be the name of a :class:`pysb.core.Expression`
206+
to be mapped to the scale parameter of the noise distribution.
207+
:attr:`MeasurementChannel.formula` is expected to be
207208
``None``. Event-observables are not supported.
208209
209210
:param fixed_parameters:
210-
list of :class:`pysb.core.Parameter` to be excluded from sensitivity analysis
211+
list of :class:`pysb.core.Parameter` to be excluded from sensitivity
212+
analysis.
211213
212214
:param verbose: verbosity level for logging, True/False default to
213215
:attr:`logging.DEBUG`/:attr:`logging.ERROR`
@@ -244,8 +246,8 @@ def pysb2amici(
244246
generated
245247
246248
:param model_name:
247-
Name for the generated model module. If None, :attr:`pysb.Model.name`
248-
will be used.
249+
Name for the generated model module.
250+
If None, :attr:`pysb.core.Model.name` will be used.
249251
250252
:param pysb_model_has_obs_and_noise:
251253
if set to ``True``, the pysb model is expected to have extra
@@ -323,7 +325,7 @@ def ode_model_from_pysb_importer(
323325
_events: list[Event] = None,
324326
) -> DEModel:
325327
"""
326-
Creates an :class:`amici.DEModel` instance from a :class:`pysb.Model`
328+
Creates an :class:`DEModel` instance from a :class:`pysb.core.Model`
327329
instance.
328330
329331
:param model:

python/sdist/amici/importers/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def __init__(
183183
Expression representing the scale parameter of the noise
184184
distribution. This can be a numeric value, a sympy expression,
185185
or an expression string that will be passed to
186-
:func:`sympy.sympify`.
186+
:func:`sympy.core.sympify.sympify`.
187187
:param event_id:
188188
Identifier of the associated event for event-resolved observables.
189189
`None` for time-resolved observables.

python/sdist/amici/sim/sundials/_debugging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def get_model_for_preeq(
2121
During preequilibration, event-handling is disabled. However, when
2222
simulating the returned model, event-handling will be enabled.
2323
For events triggered at fixed timepoints, this can be avoided by setting
24-
:meth:`t0 <amici.Model.setT0>` to a timepoints after the last trigger
24+
:meth:`t0 <amici.Model.set_t0>` to a timepoints after the last trigger
2525
timepoint.
2626
2727
:param model:

python/sdist/amici/sim/sundials/_swig_wrappers.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def read_solver_settings_from_hdf5(
139139
file: str, solver: AmiciSolver, location: str | None = "solverSettings"
140140
) -> None:
141141
"""
142-
Convenience wrapper for :py:func:`amici.read_solver_settings_from_hdf5`
142+
Apply solver settings from an HDF5 file to a Solver instance.
143143
144144
:param file: hdf5 filename
145145
:param solver: Solver instance to which settings will be transferred
@@ -154,10 +154,9 @@ def write_solver_settings_to_hdf5(
154154
location: str | None = "solverSettings",
155155
) -> None:
156156
"""
157-
Convenience wrapper for :py:func:`amici.amici.writeSolverSettingsToHDF5`
157+
Write solver settings from a Solver instance to an HDF5 file.
158158
159-
:param file: hdf5 filename, can also be an object created by
160-
:py:func:`amici.amici.createOrOpenForWriting`
159+
:param file: hdf5 filename
161160
:param solver: Solver instance from which settings will be stored
162161
:param location: location of solver settings in hdf5 file
163162
"""

python/sdist/amici/sim/sundials/petab/_v2.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
import numpy as np
1212
import sympy as sp
13-
from petab import v1 as v1
1413
from petab import v2 as v2
1514
from petab.v2 import ExperimentPeriod
1615

@@ -41,7 +40,7 @@ class ExperimentManager:
4140
Handles the creation of :class:`ExpData` objects for a given model and
4241
PEtab problem.
4342
44-
The assumption is that we have a set of :class:`amici.ExpData` objects,
43+
The assumption is that we have a set of :class:`ExpData` objects,
4544
one for each PEtab experiment.
4645
Those are updated based on a set of global parameters (PEtab
4746
problem parameters, as opposed to model parameters for a single experiment

python/sdist/amici/sim/sundials/petab/v1/_conditions.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def create_parameterized_edatas(
242242
simulation_conditions: pd.DataFrame | dict = None,
243243
warn_unused: bool = True,
244244
) -> list[ExpData]:
245-
"""Create list of :class:ExpData objects with parameters filled in.
245+
"""Create list of :class:`ExpData` objects with parameters filled in.
246246
247247
:param amici_model:
248248
AMICI Model assumed to be compatible with ``petab_problem``.
@@ -258,9 +258,10 @@ def create_parameterized_edatas(
258258
If ``False``, they are assumed to be in linear scale.
259259
:param parameter_mapping:
260260
Optional precomputed PEtab parameter mapping for efficiency, as
261-
generated by :func:`create_parameter_mapping`.
261+
generated by
262+
:func:`amici.sim.sundials.petab.v1.create_parameter_mapping`.
262263
:param simulation_conditions:
263-
Result of :func:`petab.get_simulation_conditions`. Can be provided to
264+
Result of :func:`petab.v1.get_simulation_conditions`. Can be provided to
264265
save time if this has been obtained before.
265266
:param warn_unused:
266267
Whether a warning should be emitted if not all problem parameters

python/sdist/amici/sim/sundials/petab/v1/_simulations.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ def simulate_petab(
9797
``nominalValues`` will be used. To be provided as dict, mapping PEtab
9898
problem parameters to SBML IDs.
9999
:param simulation_conditions:
100-
Result of :py:func:`petab.get_simulation_conditions`. Can be provided
101-
to save time if this has be obtained before.
100+
Result of :py:func:`petab.v1.get_simulation_conditions`.
101+
Can be provided to save time if this has be obtained before.
102102
Not required if ``edatas`` and ``parameter_mapping`` are provided.
103103
:param edatas:
104104
Experimental data. Parameters are inserted in-place for simulation.
@@ -113,7 +113,7 @@ def simulate_petab(
113113
If `parameter_mapping` is provided, this must match the value of
114114
`scaled_parameters` used to generate the mapping.
115115
:param log_level:
116-
Log level, see :mod:`amici.logging` module.
116+
Log level, see :mod:`logging` module.
117117
:param num_threads:
118118
Number of threads to use for simulating multiple conditions
119119
(only used if compiled with OpenMP).
@@ -128,12 +128,12 @@ def simulate_petab(
128128
Dictionary of
129129
130130
* cost function value (``LLH``),
131-
* list of :class:`amici.amici.ReturnData` (``RDATAS``),
132-
* list of :class:`amici.amici.ExpData` (``EDATAS``),
131+
* list of :class:`ReturnData` (``RDATAS``),
132+
* list of :class:`ExpData` (``EDATAS``),
133133
134134
corresponding to the different simulation conditions.
135135
For ordering of simulation conditions, see
136-
:meth:`petab.Problem.get_simulation_conditions_from_measurement_df`.
136+
:meth:`petab.v1.Problem.get_simulation_conditions_from_measurement_df`.
137137
"""
138138
logger.setLevel(log_level)
139139

@@ -418,7 +418,7 @@ def rdatas_to_measurement_df(
418418
419419
:param rdatas:
420420
A sequence of rdatas with the ordering of
421-
:func:`petab.get_simulation_conditions`.
421+
:func:`petab.v1.get_simulation_conditions`.
422422
423423
:param model:
424424
AMICI model used to generate ``rdatas``.

0 commit comments

Comments
 (0)