From 027650afa61a46677bdd99a2589bbfacf9c00f85 Mon Sep 17 00:00:00 2001 From: Joseph Edwards Date: Mon, 16 Jun 2025 20:19:22 +0100 Subject: [PATCH 1/6] Doc: move repoter and runner into core classes --- docs/source/data-structures/misc/index.rst | 2 -- docs/source/index.rst | 1 + .../main-algorithms/core-classes/index.rst | 23 +++++++++++++++++++ .../core-classes}/reporter.rst | 0 .../core-classes}/runner.rst | 0 5 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 docs/source/main-algorithms/core-classes/index.rst rename docs/source/{data-structures/misc => main-algorithms/core-classes}/reporter.rst (100%) rename docs/source/{data-structures/misc => main-algorithms/core-classes}/runner.rst (100%) diff --git a/docs/source/data-structures/misc/index.rst b/docs/source/data-structures/misc/index.rst index 010cc9559..c1f4d4203 100644 --- a/docs/source/data-structures/misc/index.rst +++ b/docs/source/data-structures/misc/index.rst @@ -17,8 +17,6 @@ In this section we describe some miscellaneous functionality in constants obvinf libsemigroups-error - runner - reporter tril types diff --git a/docs/source/index.rst b/docs/source/index.rst index 3f701a895..0c6b11319 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -129,6 +129,7 @@ you encounter any errors with unclear messages, please raise this on the main-algorithms/action/index main-algorithms/congruence/index + main-algorithms/core-classes/index main-algorithms/froidure-pin/index main-algorithms/kambites/index main-algorithms/knuth-bendix/index diff --git a/docs/source/main-algorithms/core-classes/index.rst b/docs/source/main-algorithms/core-classes/index.rst new file mode 100644 index 000000000..29a2c23e6 --- /dev/null +++ b/docs/source/main-algorithms/core-classes/index.rst @@ -0,0 +1,23 @@ +.. + Copyright (c) 2025 Joseph Edwards + + Distributed under the terms of the GPL license version 3. + + The full license is in the file LICENSE, distributed with this software. + +Core classes +============ + +Many of the classes in ``libsemigroups_pybind11`` implement algorithms, and +hence are runnable. During the running of these algorithms, it is often +desirable to report the state of the algorithm. Therefore, the classes +:any:`Runner` and :any:`Reporter` exist to provide common functions to many +classes that implement the main algorithms. + +Documentation for these classes can be found on the following pages. + +.. toctree:: + :maxdepth: 1 + + reporter + runner \ No newline at end of file diff --git a/docs/source/data-structures/misc/reporter.rst b/docs/source/main-algorithms/core-classes/reporter.rst similarity index 100% rename from docs/source/data-structures/misc/reporter.rst rename to docs/source/main-algorithms/core-classes/reporter.rst diff --git a/docs/source/data-structures/misc/runner.rst b/docs/source/main-algorithms/core-classes/runner.rst similarity index 100% rename from docs/source/data-structures/misc/runner.rst rename to docs/source/main-algorithms/core-classes/runner.rst From ed21fdf210c413311771abad99261b97dc6d15be Mon Sep 17 00:00:00 2001 From: Joseph Edwards Date: Mon, 16 Jun 2025 20:58:13 +0100 Subject: [PATCH 2/6] Doc: Create a Package Info TOC section --- docs/source/index.rst | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index 0c6b11319..375a3243c 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -44,11 +44,8 @@ How to use it See the installation instructions: -.. toctree:: - :maxdepth: 1 - - install - changelog + * :doc:`install` + * :doc:`changelog` The structure of the module ~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -102,11 +99,30 @@ defined upon. These may appear in error messages. For example: Invoked with: , False -The authors of ``libsemigroups_pybind11`` have gone to a lot of effort to -try and make error messages clear, specific and intelligible; however, if there -you encounter any errors with unclear messages, please raise this on the +The :doc:`authors ` of ``libsemigroups_pybind11`` have gone to a lot of +effort to try and make error messages clear, specific and intelligible; however, +if there you encounter any errors with unclear messages, please raise this on +the `issue tracker `_. +Further Info +------------ + +For additional information about ``libsemigroups_pybind11``, see the following: + + * :doc:`authors` + * :doc:`biblio` + +.. toctree:: + :caption: Package Info + :maxdepth: 1 + :hidden: + + install + changelog + authors + biblio + .. toctree:: :caption: Data Structures :hidden: @@ -140,14 +156,3 @@ you encounter any errors with unclear messages, please raise this on the main-algorithms/stephen/index main-algorithms/todd-coxeter/index -.. toctree:: - :caption: Bibliography - :hidden: - - biblio - -.. toctree:: - :caption: Further info - :maxdepth: 1 - - authors From 0b85e5c2344adab9ffdf23f2bc727b8b68f9f764 Mon Sep 17 00:00:00 2001 From: Joseph Edwards Date: Mon, 16 Jun 2025 21:00:06 +0100 Subject: [PATCH 3/6] Doc: Create Constants TOC section --- .../data-structures/constants/index.rst | 46 +++++++++++++++++ .../source/data-structures/misc/constants.rst | 50 ------------------- docs/source/data-structures/misc/index.rst | 1 - docs/source/index.rst | 1 + 4 files changed, 47 insertions(+), 51 deletions(-) create mode 100644 docs/source/data-structures/constants/index.rst delete mode 100644 docs/source/data-structures/misc/constants.rst diff --git a/docs/source/data-structures/constants/index.rst b/docs/source/data-structures/constants/index.rst new file mode 100644 index 000000000..7d3550f72 --- /dev/null +++ b/docs/source/data-structures/constants/index.rst @@ -0,0 +1,46 @@ +.. + Copyright (c) 2024 Joseph Edwards + + Distributed under the terms of the GPL license version 3. + + The full license is in the file LICENSE, distributed with this software. + +.. currentmodule:: _libsemigroups_pybind11 + +Constants +========= + +This page describes some of the constants used in ``libsemigroups_pybind11``. + + +.. autodata:: UNDEFINED + + This variable is used to indicate that a value is undefined. + :any:`UNDEFINED` is comparable with any integral value (signed or + unsigned) or constant via ``==`` and ``!=`` but not via ``<`` or ``>``. + + +.. autodata:: POSITIVE_INFINITY + + This variable of type :class:`_libsemigroups_pybind11.PositiveInfinity` + represents :math:`\infty`. :any:`POSITIVE_INFINITY` is comparable via + ``==``, ``!=``, ``<``, ``>`` with any integral value (signed or + unsigned) and with :any:`NEGATIVE_INFINITY`, and is comparable to any + other constant via ``==`` and ``!=``, but not by ``<`` and ``>``. + + +.. autodata:: LIMIT_MAX + + This variable represents the maximum value that certain function + parameters can have. :any:`LIMIT_MAX` is comparable via ``==``, ``!=``, + ``<``, ``>`` with any integral value (signed or unsigned), and is + comparable to any other constant via ``==`` and ``!=``, but not by ``<`` + and ``>``. + + +.. autodata:: NEGATIVE_INFINITY + + This variable represents :math:`-\infty`. :any:`NEGATIVE_INFINITY` is + comparable via ``==``, ``!=``, ``<``, ``>`` with any signed integral + value and with :any:`POSITIVE_INFINITY`, and is comparable to any other + constant via ``==`` and ``!=``. diff --git a/docs/source/data-structures/misc/constants.rst b/docs/source/data-structures/misc/constants.rst deleted file mode 100644 index 1faae5306..000000000 --- a/docs/source/data-structures/misc/constants.rst +++ /dev/null @@ -1,50 +0,0 @@ -.. - Copyright (c) 2024 Joseph Edwards - - Distributed under the terms of the GPL license version 3. - - The full license is in the file LICENSE, distributed with this software. - -.. currentmodule:: _libsemigroups_pybind11 - -Constants -========= - -This page describes some of the constants used in ``libsemigroups_pybind11``. - -.. autoclass:: Undefined - - .. autodata:: UNDEFINED - - This variable is used to indicate that a value is undefined. - :any:`UNDEFINED` is comparable with any integral value (signed or - unsigned) or constant via ``==`` and ``!=`` but not via ``<`` or ``>``. - -.. autoclass:: PositiveInfinity - - .. autodata:: POSITIVE_INFINITY - - This variable of type :class:`_libsemigroups_pybind11.PositiveInfinity` - represents :math:`\infty`. :any:`POSITIVE_INFINITY` is comparable via - ``==``, ``!=``, ``<``, ``>`` with any integral value (signed or - unsigned) and with :any:`NEGATIVE_INFINITY`, and is comparable to any - other constant via ``==`` and ``!=``, but not by ``<`` and ``>``. - -.. autoclass:: LimitMax - - .. autodata:: LIMIT_MAX - - This variable represents the maximum value that certain function - parameters can have. :any:`LIMIT_MAX` is comparable via ``==``, ``!=``, - ``<``, ``>`` with any integral value (signed or unsigned), and is - comparable to any other constant via ``==`` and ``!=``, but not by ``<`` - and ``>``. - -.. autoclass:: NegativeInfinity - - .. autodata:: NEGATIVE_INFINITY - - This variable represents :math:`-\infty`. :any:`NEGATIVE_INFINITY` is - comparable via ``==``, ``!=``, ``<``, ``>`` with any signed integral - value and with :any:`POSITIVE_INFINITY`, and is comparable to any other - constant via ``==`` and ``!=``. diff --git a/docs/source/data-structures/misc/index.rst b/docs/source/data-structures/misc/index.rst index c1f4d4203..2257e6d3d 100644 --- a/docs/source/data-structures/misc/index.rst +++ b/docs/source/data-structures/misc/index.rst @@ -14,7 +14,6 @@ In this section we describe some miscellaneous functionality in .. toctree:: :maxdepth: 1 - constants obvinf libsemigroups-error tril diff --git a/docs/source/index.rst b/docs/source/index.rst index 375a3243c..2fa62f044 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -128,6 +128,7 @@ For additional information about ``libsemigroups_pybind11``, see the following: :hidden: data-structures/adapters/index + data-structures/constants/index data-structures/elements/index data-structures/misc/index data-structures/order/index From e2a6fe727189b68f5a9819123a4b0035cb23e5c2 Mon Sep 17 00:00:00 2001 From: Joseph Edwards Date: Mon, 16 Jun 2025 21:05:45 +0100 Subject: [PATCH 4/6] Action: side is not a member of action submodule --- src/libsemigroups_pybind11/action.py | 43 ++++++++++++++++------------ 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/src/libsemigroups_pybind11/action.py b/src/libsemigroups_pybind11/action.py index 26f3da1d5..6f1dce822 100644 --- a/src/libsemigroups_pybind11/action.py +++ b/src/libsemigroups_pybind11/action.py @@ -39,7 +39,7 @@ Transf2 as _Transf2, Transf4 as _Transf4, UNDEFINED as _UNDEFINED, - side, + side as _side, ) from .adapters import ( @@ -73,91 +73,96 @@ class Action(_CxxWrapper): # pylint: disable=missing-class-docstring Side = _TypeVar("Side") _py_template_params_to_cxx_type = { - (_BMat8, _BMat8, _ImageRightAction, side.right): _RightActionBMat8BMat8, - (_BMat8, _BMat8, _ImageLeftAction, side.left): _LeftActionBMat8BMat8, + ( + _BMat8, + _BMat8, + _ImageRightAction, + _side.right, + ): _RightActionBMat8BMat8, + (_BMat8, _BMat8, _ImageLeftAction, _side.left): _LeftActionBMat8BMat8, ( _PPerm1, _PPerm1, _ImageRightAction, - side.right, + _side.right, ): _RightActionPPerm1PPerm1, ( _PPerm1, _PPerm1, _ImageLeftAction, - side.left, + _side.left, ): _LeftActionPPerm1PPerm1, ( _PPerm1, list, _ImageRightAction, - side.right, + _side.right, ): _RightActionPPerm1List, ( _PPerm2, list, _ImageRightAction, - side.right, + _side.right, ): _RightActionPPerm2List, ( _PPerm4, list, _ImageRightAction, - side.right, + _side.right, ): _RightActionPPerm4List, ( _PPerm1, list, _ImageLeftAction, - side.left, + _side.left, ): _LeftActionPPerm1List, ( _PPerm2, list, _ImageLeftAction, - side.left, + _side.left, ): _LeftActionPPerm2List, ( _PPerm4, list, _ImageLeftAction, - side.left, + _side.left, ): _LeftActionPPerm4List, ( _Transf1, list, _ImageRightAction, - side.right, + _side.right, ): _RightActionTransf1List, ( _Transf2, list, _ImageRightAction, - side.right, + _side.right, ): _RightActionTransf2List, ( _Transf4, list, _ImageRightAction, - side.right, + _side.right, ): _RightActionTransf4List, ( _Transf1, list, _ImageLeftAction, - side.left, + _side.left, ): _LeftActionTransf1List, ( _Transf2, list, _ImageLeftAction, - side.left, + _side.left, ): _LeftActionTransf2List, ( _Transf4, list, _ImageLeftAction, - side.left, + _side.left, ): _LeftActionTransf4List, } @@ -318,7 +323,7 @@ def __init__(self: _Self, *args, generators=None, seeds=None) -> None: *args, generators=generators, seeds=seeds, - side=side.right, + side=_side.right, func=_ImageRightAction, ) @@ -359,6 +364,6 @@ def __init__(self: _Self, *args, generators=None, seeds=None) -> None: super().__init__( generators=generators, seeds=seeds, - side=side.left, + side=_side.left, func=_ImageLeftAction, ) From 5068964f565c227b4c1ba24566307aeb71901f4a Mon Sep 17 00:00:00 2001 From: Joseph Edwards Date: Mon, 16 Jun 2025 21:21:12 +0100 Subject: [PATCH 5/6] Doc: Add Enums section with all module level enums --- .../elements/matrix/matrix.rst | 8 ------- .../types.rst => enums/congruence-kind.rst} | 9 ++++++- docs/source/data-structures/enums/index.rst | 22 +++++++++++++++++ .../data-structures/enums/matrix-kind.rst | 24 +++++++++++++++++++ docs/source/data-structures/enums/order.rst | 19 +++++++++++++++ .../action => data-structures/enums}/side.rst | 9 +++++-- .../data-structures/{misc => enums}/tril.rst | 5 ++-- docs/source/data-structures/misc/index.rst | 2 -- docs/source/data-structures/order/index.rst | 11 +++++---- docs/source/index.rst | 1 + docs/source/main-algorithms/action/index.rst | 5 +++- src/matrix.cpp | 7 +++++- 12 files changed, 100 insertions(+), 22 deletions(-) rename docs/source/data-structures/{misc/types.rst => enums/congruence-kind.rst} (70%) create mode 100644 docs/source/data-structures/enums/index.rst create mode 100644 docs/source/data-structures/enums/matrix-kind.rst create mode 100644 docs/source/data-structures/enums/order.rst rename docs/source/{main-algorithms/action => data-structures/enums}/side.rst (62%) rename docs/source/data-structures/{misc => enums}/tril.rst (64%) diff --git a/docs/source/data-structures/elements/matrix/matrix.rst b/docs/source/data-structures/elements/matrix/matrix.rst index c4ff7df5a..99e9c1b70 100644 --- a/docs/source/data-structures/elements/matrix/matrix.rst +++ b/docs/source/data-structures/elements/matrix/matrix.rst @@ -13,14 +13,6 @@ The Matrix class .. autoclass:: Matrix :doc-only: -MatrixKind ----------- - -.. TODO move MatrixKind to the "enums" page when it exists - -.. autoclass:: MatrixKind - :show-inheritance: - Contents -------- diff --git a/docs/source/data-structures/misc/types.rst b/docs/source/data-structures/enums/congruence-kind.rst similarity index 70% rename from docs/source/data-structures/misc/types.rst rename to docs/source/data-structures/enums/congruence-kind.rst index cc80ed17c..e804e0d13 100644 --- a/docs/source/data-structures/misc/types.rst +++ b/docs/source/data-structures/enums/congruence-kind.rst @@ -10,10 +10,17 @@ The congruence_kind enum ======================== -This page describes the enum class ``congruence_kind`` in +This page describes the enum class :any:`congruence_kind` in ``libsemigroups_pybind11`` for representing the whether a congruence is one- or two-sided. +.. seealso:: + + * :any:`Congruence`, + * :any:`Kambites`, + * :any:`KnuthBendix`, + * :any:`ToddCoxeter`. + Full API -------- diff --git a/docs/source/data-structures/enums/index.rst b/docs/source/data-structures/enums/index.rst new file mode 100644 index 000000000..08ff8f919 --- /dev/null +++ b/docs/source/data-structures/enums/index.rst @@ -0,0 +1,22 @@ +.. + Copyright (c) 2025 Joseph Edwards + + Distributed under the terms of the GPL license version 3. + + The full license is in the file LICENSE, distributed with this software. + +Enums +===== + +In this section, we describe the :any:`Enum ` classes available in +``libsemigroups_pybind11``. + +.. toctree:: + :maxdepth: 1 + + congruence-kind + matrix-kind + order + side + tril + \ No newline at end of file diff --git a/docs/source/data-structures/enums/matrix-kind.rst b/docs/source/data-structures/enums/matrix-kind.rst new file mode 100644 index 000000000..4d70ce76f --- /dev/null +++ b/docs/source/data-structures/enums/matrix-kind.rst @@ -0,0 +1,24 @@ +.. + Copyright (c) 2025, Joseph Edwards + + Distributed under the terms of the GPL license version 3. + + The full license is in the file LICENSE, distributed with this software. + +.. currentmodule:: libsemigroups_pybind11 + +The MatrixKind enum +=================== + +This page describes the enum class :any:`MatrixKind` in +``libsemigroups_pybind11`` for representing the semiring of elements in a +matrix. + +.. seealso:: + + :any:`Matrix`. + +Full API +-------- + +.. autoclass:: MatrixKind diff --git a/docs/source/data-structures/enums/order.rst b/docs/source/data-structures/enums/order.rst new file mode 100644 index 000000000..474f87fa4 --- /dev/null +++ b/docs/source/data-structures/enums/order.rst @@ -0,0 +1,19 @@ +.. + Copyright (c) 2025, Joseph Edwards + + Distributed under the terms of the GPL license version 3. + + The full license is in the file LICENSE, distributed with this software. + +.. currentmodule:: libsemigroups_pybind11 + +The Order enum +=============== + +This page describes the enum class :any:`Order` in ``libsemigroups_pybind11`` +for representing the order of words. + +Full API +-------- + +.. autoclass:: Order diff --git a/docs/source/main-algorithms/action/side.rst b/docs/source/data-structures/enums/side.rst similarity index 62% rename from docs/source/main-algorithms/action/side.rst rename to docs/source/data-structures/enums/side.rst index 52b762c4f..61532c836 100644 --- a/docs/source/main-algorithms/action/side.rst +++ b/docs/source/data-structures/enums/side.rst @@ -10,8 +10,13 @@ The side enum ============= -This page describes the enum class ``side`` in ``libsemigroups_pybind11`` for -representing whether an action is a left or a right action. +This page describes the enum class :py:class:`side` in +``libsemigroups_pybind11`` for representing whether an action is a left or a +right action. + +.. seealso:: + + :any:`Action`. Full API -------- diff --git a/docs/source/data-structures/misc/tril.rst b/docs/source/data-structures/enums/tril.rst similarity index 64% rename from docs/source/data-structures/misc/tril.rst rename to docs/source/data-structures/enums/tril.rst index b09b27112..47bc8c3f6 100644 --- a/docs/source/data-structures/misc/tril.rst +++ b/docs/source/data-structures/enums/tril.rst @@ -10,8 +10,9 @@ The tril enum ============= -This page describes the enum class ``tril`` in ``libsemigroups_pybind11`` for -representing values that can either be true, false, or not currently known. +This page describes the enum class :py:class:`tril` in +``libsemigroups_pybind11`` for representing values that can either be true, +false, or not currently known. Full API -------- diff --git a/docs/source/data-structures/misc/index.rst b/docs/source/data-structures/misc/index.rst index 2257e6d3d..a16a830f0 100644 --- a/docs/source/data-structures/misc/index.rst +++ b/docs/source/data-structures/misc/index.rst @@ -16,8 +16,6 @@ In this section we describe some miscellaneous functionality in obvinf libsemigroups-error - tril - types .. ukkonen/index diff --git a/docs/source/data-structures/order/index.rst b/docs/source/data-structures/order/index.rst index bfcfd9b38..2cd7ff38c 100644 --- a/docs/source/data-structures/order/index.rst +++ b/docs/source/data-structures/order/index.rst @@ -10,8 +10,12 @@ Orders ====== -This page contains the documentation for several classes and functions for -comparing words or strings with respect to certain reduction orderings. +This page contains the documentation for several functions for comparing words +or strings with respect to certain reduction orderings. + +.. seealso:: + + :any:`Order`. Contents -------- @@ -19,7 +23,6 @@ Contents .. autosummary:: :signatures: short - Order lexicographical_compare recursive_path_compare shortlex_compare @@ -27,8 +30,6 @@ Contents Full API -------- -.. autoclass:: Order - .. autofunction:: lexicographical_compare .. autofunction:: recursive_path_compare diff --git a/docs/source/index.rst b/docs/source/index.rst index 2fa62f044..728ddae41 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -130,6 +130,7 @@ For additional information about ``libsemigroups_pybind11``, see the following: data-structures/adapters/index data-structures/constants/index data-structures/elements/index + data-structures/enums/index data-structures/misc/index data-structures/order/index data-structures/presentations/index diff --git a/docs/source/main-algorithms/action/index.rst b/docs/source/main-algorithms/action/index.rst index 8a89f8d86..0445b957d 100644 --- a/docs/source/main-algorithms/action/index.rst +++ b/docs/source/main-algorithms/action/index.rst @@ -13,10 +13,13 @@ Actions This page contains links to the documentation for the classes in ``libsemigroups_pybind11`` for semigroup actions. +.. seealso:: + + :any:`side`. + .. toctree:: :maxdepth: 1 action leftaction rightaction - side diff --git a/src/matrix.cpp b/src/matrix.cpp index c4110c472..5be087c8e 100644 --- a/src/matrix.cpp +++ b/src/matrix.cpp @@ -178,6 +178,10 @@ various ways so that the underlying semiring operations are as fast as possible. Some helper functions for :py:class:`Matrix` objects are documented in the submodule :any:`libsemigroups_pybind11.matrix`. +.. seealso:: + + :any:`MatrixKind`. + .. doctest:: >>> from libsemigroups_pybind11 import Matrix, MatrixKind @@ -489,7 +493,8 @@ submodule :any:`libsemigroups_pybind11.matrix`. [](Mat const& thing) { return thing.number_of_rows(); }); thing.def("__pow__", &matrix::pow); - thing.def("copy", [](Mat const& x) { return Mat(x); }, R"pbdoc( + thing.def( + "copy", [](Mat const& x) { return Mat(x); }, R"pbdoc( :sig=(self: Matrix) -> Matrix: Copy a :any:`Matrix` object. From cd9d22d58b843d4786dabad4b56c3a0e4229a382 Mon Sep 17 00:00:00 2001 From: Joseph Edwards Date: Mon, 16 Jun 2025 21:40:23 +0100 Subject: [PATCH 6/6] Doc: Add page for ReportGuard --- .../main-algorithms/core-classes/index.rst | 4 +++- .../core-classes/report-guard.rst | 22 +++++++++++++++++++ src/report.cpp | 2 +- 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 docs/source/main-algorithms/core-classes/report-guard.rst diff --git a/docs/source/main-algorithms/core-classes/index.rst b/docs/source/main-algorithms/core-classes/index.rst index 29a2c23e6..b382814b9 100644 --- a/docs/source/main-algorithms/core-classes/index.rst +++ b/docs/source/main-algorithms/core-classes/index.rst @@ -14,10 +14,12 @@ desirable to report the state of the algorithm. Therefore, the classes :any:`Runner` and :any:`Reporter` exist to provide common functions to many classes that implement the main algorithms. -Documentation for these classes can be found on the following pages. +Documentation for these, and associated, classes can be found on the following +pages. .. toctree:: :maxdepth: 1 reporter + report-guard runner \ No newline at end of file diff --git a/docs/source/main-algorithms/core-classes/report-guard.rst b/docs/source/main-algorithms/core-classes/report-guard.rst new file mode 100644 index 000000000..338afa52a --- /dev/null +++ b/docs/source/main-algorithms/core-classes/report-guard.rst @@ -0,0 +1,22 @@ +.. + Copyright (c) 2025, Joseph Edwards + + Distributed under the terms of the GPL license version 3. + + The full license is in the file LICENSE, distributed with this software. + +.. currentmodule:: libsemigroups_pybind11 + +The ReportGuard class +======================= + +.. autoclass:: ReportGuard + :doc-only: + :class-doc-from: class + +Full API +-------- + +.. autoclass:: ReportGuard + :members: + :class-doc-from: init diff --git a/src/report.cpp b/src/report.cpp index adde609be..8a8c3181b 100644 --- a/src/report.cpp +++ b/src/report.cpp @@ -33,7 +33,7 @@ namespace libsemigroups { R"pbdoc( Objects of this type can be used to enable printing of some information during various of the computation in ``libsemigroups_pybind11``. Reporting -is enable (or not) at construction time, and disable when the +is enabled (or not) at construction time, and disable when the :py:class:`ReportGuard` goes out of scope. )pbdoc") .def(py::init(),