From f2d294815e6cb2eac644d192560bfbc79ee7e906 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Mon, 23 Feb 2026 16:12:52 +0100 Subject: [PATCH] initial fix warnings and throw error on warnigns for docs. does not fix sls namespace yet --- docs/CMakeLists.txt | 6 ++++-- docs/src/Testing.rst | 3 +++ docs/src/ToString.rst | 3 ++- docs/src/container_utils.rst | 3 ++- docs/src/index.rst | 6 ++++++ docs/src/result.rst | 1 + docs/src/sls_namespace.rst | 6 ++++++ docs/src/type_traits.rst | 3 ++- python/slsdet/detector.py | 3 ++- slsDetectorSoftware/src/CallerSpecial.cpp | 5 +++-- 10 files changed, 31 insertions(+), 8 deletions(-) create mode 100644 docs/src/sls_namespace.rst diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 129ed8e69..ae8bb1a88 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -72,6 +72,8 @@ set(SPHINX_SOURCE_FILES src/softwarearchitecture.rst src/configcommands.rst src/Versioning.rst + src/Testing.rst + src/sls_namespace.rst ) foreach(filename ${SPHINX_SOURCE_FILES}) @@ -105,7 +107,7 @@ add_custom_target(docs gendoc COMMAND python gen_server_doc.py COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT} - COMMAND ${SPHINX_EXECUTABLE} -a -b html + COMMAND ${SPHINX_EXECUTABLE} -a -b html -W -Dbreathe_projects.slsDetectorPackage=${CMAKE_CURRENT_BINARY_DIR}/xml -c "${SPHINX_BUILD}" ${SPHINX_BUILD}/src @@ -113,7 +115,7 @@ add_custom_target(docs COMMENT "Generating documentation with Sphinx") add_custom_target(rst - COMMAND ${SPHINX_EXECUTABLE} -a -b html + COMMAND ${SPHINX_EXECUTABLE} -a -b html -W -Dbreathe_projects.slsDetectorPackage=${CMAKE_CURRENT_BINARY_DIR}/xml -c "${SPHINX_BUILD}" ${SPHINX_BUILD}/src diff --git a/docs/src/Testing.rst b/docs/src/Testing.rst index 515571788..fbd773575 100644 --- a/docs/src/Testing.rst +++ b/docs/src/Testing.rst @@ -67,12 +67,14 @@ This runs all tests marked with the tag ``[.detectorintegration]`` for all detec If you want to run them for a specific virtual detector or a specific test use the following command: .. code-block:: console + cd build python bin/test_simulators.py --servers jungfrau --test "[.rx]" You can exclude specific tests by adding the option ``~[]``. Again, we assume that this marker is added to the tests that you want to exclude. .. code-block:: console + cd build python bin/test_simulators.py --servers eiger jungfrau moench --test "[detectorintegration]~[disable_check_data_file]" @@ -98,6 +100,7 @@ If a test requires a detector mark them with the pytest marker ``@pytest.mark.de To run only tests requiring virtual detectors use the following command: .. code-block:: console + #in build python -m pytest -m detectorintegration ../python/tests/ diff --git a/docs/src/ToString.rst b/docs/src/ToString.rst index cfb02e799..fbf5c09cd 100644 --- a/docs/src/ToString.rst +++ b/docs/src/ToString.rst @@ -3,4 +3,5 @@ ToString String conversion -.. doxygenfile:: ToString.h \ No newline at end of file +.. doxygenfile:: ToString.h + :no-link: \ No newline at end of file diff --git a/docs/src/container_utils.rst b/docs/src/container_utils.rst index 1f87108ff..219e781b5 100644 --- a/docs/src/container_utils.rst +++ b/docs/src/container_utils.rst @@ -11,4 +11,5 @@ guarantees as for Detector etc. Any reoccurring container operation should probably be added to this file. -.. doxygenfile:: container_utils.h \ No newline at end of file +.. doxygenfile:: container_utils.h + :no-link: \ No newline at end of file diff --git a/docs/src/index.rst b/docs/src/index.rst index 035167215..ea71e8b6c 100644 --- a/docs/src/index.rst +++ b/docs/src/index.rst @@ -11,6 +11,12 @@ slsDetectorPackage This is the documentation for the latest development version of slsDetectorPackage. For further detector specific documentation, visit `this page `__. +.. toctree:: + :maxdepth: 2 + :hidden: + + sls_namespace + .. toctree:: :maxdepth: 3 :caption: Installation: diff --git a/docs/src/result.rst b/docs/src/result.rst index c1af431cd..883b4f925 100644 --- a/docs/src/result.rst +++ b/docs/src/result.rst @@ -4,3 +4,4 @@ Result ============================================== .. doxygenfile:: Result.h + :noindex: diff --git a/docs/src/sls_namespace.rst b/docs/src/sls_namespace.rst new file mode 100644 index 000000000..edd6e3b72 --- /dev/null +++ b/docs/src/sls_namespace.rst @@ -0,0 +1,6 @@ +sls Namespace +============= + +.. cpp:namespace:: sls + :members: + :undoc-members: \ No newline at end of file diff --git a/docs/src/type_traits.rst b/docs/src/type_traits.rst index da8c3c5de..791b5e9d3 100644 --- a/docs/src/type_traits.rst +++ b/docs/src/type_traits.rst @@ -4,4 +4,5 @@ TypeTraits Template meta functions in the same spirit as type_traits from the standard library. -.. doxygenfile:: TypeTraits.h \ No newline at end of file +.. doxygenfile:: TypeTraits.h + :no-link: \ No newline at end of file diff --git a/python/slsdet/detector.py b/python/slsdet/detector.py index ad6e23a3b..dd91d7ec5 100755 --- a/python/slsdet/detector.py +++ b/python/slsdet/detector.py @@ -2396,7 +2396,8 @@ class Detector(CppDetectorApi): ---- To change settings as well or set threshold without trimbits, use setThresholdEnergy. - :setter: It loads trim files from settingspath.\n [Mythen3] An energy of -1 will pick up values from detector. + :setter: It loads trim files from settingspath.\n + [Mythen3] An energy of -1 will pick up values from detector. """ if self.type == detectorType.MYTHEN3: diff --git a/slsDetectorSoftware/src/CallerSpecial.cpp b/slsDetectorSoftware/src/CallerSpecial.cpp index 7b376ef31..1681b2980 100644 --- a/slsDetectorSoftware/src/CallerSpecial.cpp +++ b/slsDetectorSoftware/src/CallerSpecial.cpp @@ -1565,7 +1565,7 @@ std::string Caller::define_bit(int action) { std::string Caller::definelist_reg(int action) { std::ostringstream os; if (action == defs::HELP_ACTION) { - os << "List of user-defined register definitions in shared memory." + os << "\n\tList of user-defined register definitions in shared memory." << '\n'; } else if (action == defs::PUT_ACTION) { throw RuntimeError("cannot put"); @@ -1584,7 +1584,8 @@ std::string Caller::definelist_reg(int action) { std::string Caller::definelist_bit(int action) { std::ostringstream os; if (action == defs::HELP_ACTION) { - os << "List of user-defined bit definitions in shared memory." << '\n'; + os << "\n\tList of user-defined bit definitions in shared memory." + << '\n'; } else if (action == defs::PUT_ACTION) { throw RuntimeError("cannot put"); } else if (action == defs::GET_ACTION) {