From 3f0e8f6576b59943d9ba65db00d603d11e200242 Mon Sep 17 00:00:00 2001 From: Sepand KASHANI Date: Fri, 15 Sep 2023 09:03:17 +0200 Subject: [PATCH] [doc][api][info] Provide machine-independant docstrings. --- doc/api/info.deps.rst | 4 ++++ doc/api/info.ptype.rst | 48 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/doc/api/info.deps.rst b/doc/api/info.deps.rst index ab346d37a..117cefd9c 100644 --- a/doc/api/info.deps.rst +++ b/doc/api/info.deps.rst @@ -3,5 +3,9 @@ pyxu.info.deps .. automodule:: pyxu.info.deps :members: + :exclude-members: CUPY_ENABLED :undoc-members: :show-inheritance: + + .. autodata:: CUPY_ENABLED + :no-value: diff --git a/doc/api/info.ptype.rst b/doc/api/info.ptype.rst index 652a3ebba..a0c23519b 100644 --- a/doc/api/info.ptype.rst +++ b/doc/api/info.ptype.rst @@ -1,4 +1,52 @@ pyxu.info.ptype =============== +.. [Sepand, 2023.09.15] +.. `pyxu.info.ptype` contains alias types for Python type checkers. When auto-documented via Sphinx, alias types +.. contain "alias of ..." as part of their docstring, which depends on the machine config. (Was unable to remove them +.. via Sphinx's `autodoc-process-docstring` event.) To avoid machine-dependant outputs in HTML docs, we provide custom +.. machine-agnostic documentation for some aliases as required. Provided descriptions match those given as comments in +.. `pyxu.info.ptype`. + + .. automodule:: pyxu.info.ptype + :exclude-members: NDArray, ArrayModule, SparseArray, SparseModule, OpT, Property, SolverT, SolverM, Real, DType + + .. class:: NDArray + + Supported dense array types. + + .. class:: ArrayModule + + Supported dense array modules. + + .. class:: SparseArray + + Supported sparse array types. + + .. class:: SparseModule + + Supported sparse array modules. + + .. class:: OpT + + Top-level abstract :py:class:`~pyxu.abc.Operator` interface exposed to users. + + .. autodata:: Property + :no-value: + + .. class:: SolverT + + Top-level abstract :py:class:`~pyxu.abc.Solver` interface exposed to users. + + .. class:: SolverM + + Solver run-mode(s). + + .. class:: Real + + Alias of :py:class:`numbers.Real`. + + .. data:: DType + + :py:attr:`~pyxu.info.ptype.NDArray` dtype specifier.