Skip to content

Commit

Permalink
DOC: add versionadded to functions
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Mar 9, 2024
1 parent 40a898f commit 3ece1ec
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ampform/io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ def aslatex(obj) -> str:
"""Render objects as a LaTeX `str`.
The resulting `str` can for instance be given to `IPython.display.Math`.
.. versionadded:: 0.14.1
"""
return str(obj)

Expand Down Expand Up @@ -76,7 +78,10 @@ def _(obj: Iterable) -> str:


def improve_latex_rendering() -> None:
"""Improve LaTeX rendering of an `~sympy.tensor.indexed.Indexed` object."""
"""Improve LaTeX rendering of an `~sympy.tensor.indexed.Indexed` object.
.. versionadded:: 0.14.2
"""

def _print_Indexed_latex(self, printer, *args): # noqa: N802
base = printer._print(self.base)
Expand Down
6 changes: 6 additions & 0 deletions src/ampform/sympy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,11 @@ def determine_indices(symbol: sp.Basic) -> list[int]:


class UnevaluatableIntegral(sp.Integral):
"""See :ref:`usage/sympy:Numerical integrals`.
.. versionadded:: 0.14.10
"""

abs_tolerance = 1e-5
rel_tolerance = 1e-5
limit = 50
Expand Down Expand Up @@ -356,6 +361,7 @@ def perform_cached_doit(
<https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHASHSEED>`_ to a
fixed value.
.. versionadded:: 0.14.4
.. automodule:: ampform.sympy._cache
"""
if cache_directory is None:
Expand Down
6 changes: 6 additions & 0 deletions src/ampform/sympy/_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ def argument(
Creates a :class:`dataclasses.Field` with additional metadata for
:func:`unevaluated` by wrapping around :func:`dataclasses.field`.
.. versionadded:: 0.14.8
"""
return _create_field(
default=default,
Expand Down Expand Up @@ -176,6 +178,10 @@ def unevaluated(
True
>>> expr.functor is Transformation
True
.. versionadded:: 0.14.8
.. versionchanged:: 0.14.7
Renamed from :code:`@unevaluated_expression()` to :code:`@unevaluated()`.`
"""
if assumptions is None:
assumptions = {}
Expand Down

0 comments on commit 3ece1ec

Please sign in to comment.