Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: add versionadded to function descriptions #410

Merged
merged 1 commit into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading