diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f4fd04f175..11a31bc9d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -138,3 +138,35 @@ jobs: run: | cd build ninja test_clang_format + documentation: + name: Documentation + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - name: Check out libCellML + uses: actions/checkout@v4 + - name: Install CMake and Ninja + uses: lukka/get-cmake@latest + - name: Install buildcache + uses: mikehardy/buildcache-action@v2 + - name: Install dot + run: | + sudo apt update + sudo apt install graphviz + - name: Install Doxygen + run: | + sudo apt update + sudo apt install doxygen + - name: Install Sphinx + run: | + pip3 install sphinx + - name: Configure libCellML + run: | + mkdir build + cd build + cmake -G Ninja -DBINDINGS_PYTHON=OFF .. + - name: Documentation + run: | + cd build + ninja docs diff --git a/cmake/environmentchecks.cmake b/cmake/environmentchecks.cmake index 071e33682c..59c61a3baf 100644 --- a/cmake/environmentchecks.cmake +++ b/cmake/environmentchecks.cmake @@ -45,6 +45,7 @@ else () endif() find_program(CLANG_FORMAT_EXE NAMES ${PREFERRED_CLANG_FORMAT_NAMES} clang-format) find_program(CLANG_TIDY_EXE NAMES ${PREFERRED_CLANG_TIDY_NAMES} clang-tidy) + find_program(DOT_EXE NAMES ${PREFERRED_FIND_NAMES} dot) find_program(FIND_EXE NAMES ${PREFERRED_FIND_NAMES} find) find_program(GCOV_EXE NAMES ${PREFERRED_GCOV_NAMES} gcov) find_program(LLVM_COV_EXE NAMES ${PREFERRED_LLVM_COV_NAMES} llvm-cov HINTS ${LLVM_BIN_DIR} /Library/Developer/CommandLineTools/usr/bin/) @@ -93,6 +94,7 @@ else () BUILDCACHE_EXE CLANG_TIDY_EXE CLANG_FORMAT_EXE + DOT_EXE FIND_EXE GCC_COVERAGE_COMPILER_FLAGS_OK GCOV_EXE diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 6795596e50..8498fc7b4a 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -49,7 +49,7 @@ if(SPHINX_FOUND) COMMENT "Building HTML documentation with Sphinx") endif() -if(DOXYGEN_FOUND) +if(DOXYGEN_FOUND AND DOT_EXE) set(DOXYGEN_DOCS_TARGET api_docs) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in.config ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY) add_custom_target(${DOXYGEN_DOCS_TARGET} @@ -76,7 +76,7 @@ if(LIBCELLML_COVERAGE) COMMENT "Running coverage tests with html output") endif() -if(SPHINX_FOUND OR DOXYGEN_FOUND OR LIBCELLML_COVERAGE) +if(SPHINX_FOUND AND DOXYGEN_FOUND AND LIBCELLML_COVERAGE) add_custom_target(docs DEPENDS ${SPHINX_DOCS_TARGET} ${DOXYGEN_DOCS_TARGET} ${COVERAGE_DOCS_TARGET} ${DOXYGEN_API_XML_DOCS_TARGET} COMMENT "Generating documentation") @@ -86,4 +86,3 @@ if(SPHINX_FOUND OR DOXYGEN_FOUND OR LIBCELLML_COVERAGE) COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_CURRENT_BINARY_DIR}/_doctrees COMMENT "Cleaning documentation") endif() - diff --git a/docs/conf.in.py b/docs/conf.in.py index 1fad261573..b671f63111 100644 --- a/docs/conf.in.py +++ b/docs/conf.in.py @@ -47,42 +47,42 @@ # These are the shorthand for external links. Use them in the other pages as: # :shortcut:`Shortcut text ` NB space before < # Declare below as: -# 'shortcut': ('http://linkhere/%s',''), NB have to put the string insertion %s to make it work +# 'shortcut': ('http://linkhere/%s', None), NB have to put the string insertion %s to make it work extlinks = { # NB for deployment outside of the libcellml.org domain, you will need to include the root of the href for the # :api: shortcut here. This only works internally. - 'api': ('/documentation/latest/api/classlibcellml_1_1%s', ''), - 'buildbot': ('https://buildbot.net/%s',''), - 'cellml': ('https://www.cellml.org/%s',''), - 'cellml2spec': ('https://www.cellml.org/specifications/cellml_2.0%s', ''), - 'clang': ('https://clang.llvm.org/%s',''), - 'cmake': ('https://cmake.org/%s',''), - 'doxygen': ('http://www.doxygen.nl/%s',''), - 'forcescheduler': ('http://docs.buildbot.net/latest/developer/cls-forcesched.html%s',''), - 'gcc': ('https://gcc.gnu.org/%s',''), - 'gcovr': ('https://gcovr.com/%s',''), - 'git': ('https://git-scm.com/%s',''), - 'github': ('https://github.com/%s',''), - 'github_desktop': ('https://desktop.github.com/%s',''), - 'github_help': ('https://help.github.com%s',''), - 'github_rtd': ('https://github.com/rtfd/readthedocs.org/issues%s',''), - 'google_style_guide': ('https://google.github.io/styleguide/cppguide.html%s',''), - 'graphviz': ('http://graphviz.org%s',''), - 'htpasswd': ('https://httpd.apache.org/docs/current/programs/htpasswd.html%s',''), - 'libcellml_repo': ('https://github.com/cellml/libcellml/%s',''), - 'libcellml_buildbot': ('https://autotest.bioeng.auckland.ac.nz/buildbot/libcellml/#/builders%s',''), - 'libxml2': ('http://xmlsoft.org/%s',''), - 'mathml': ('https://www.w3.org/Math/%s',''), - 'msvs': ('https://visualstudio.microsoft.com%s',''), - 'opencmiss_libxml2_repo': ('https://github.com/OpenCMISS-Dependencies/libxml2/releases%s',''), - 'opencmiss_zlib_repo': ('https://github.com/OpenCMISS-Dependencies/zlib/releases%s',''), - 'python': ('https://www.python.org/%s',''), - 'sphinx': ('http://www.sphinx-doc.org/en/master/%s',''), - 'swig':('http://swig.org%s',''), - 'swigwin_download': ('https://sourceforge.net/projects/swig/files/swigwin/%s',''), - 'wikipedia': ('https://en.wikipedia.org/wiki%s',''), - 'xml': ('https://www.w3.org/XML/%s',''), - 'zlib': ('https://www.zlib.net/%s',''), + 'api': ('/documentation/latest/api/classlibcellml_1_1%s', None), + 'buildbot': ('https://buildbot.net/%s', None), + 'cellml': ('https://www.cellml.org/%s', None), + 'cellml2spec': ('https://www.cellml.org/specifications/cellml_2.0%s', None), + 'clang': ('https://clang.llvm.org/%s', None), + 'cmake': ('https://cmake.org/%s', None), + 'doxygen': ('http://www.doxygen.nl/%s', None), + 'forcescheduler': ('http://docs.buildbot.net/latest/developer/cls-forcesched.html%s', None), + 'gcc': ('https://gcc.gnu.org/%s', None), + 'gcovr': ('https://gcovr.com/%s', None), + 'git': ('https://git-scm.com/%s', None), + 'github': ('https://github.com/%s', None), + 'github_desktop': ('https://desktop.github.com/%s', None), + 'github_help': ('https://help.github.com%s', None), + 'github_rtd': ('https://github.com/rtfd/readthedocs.org/issues%s', None), + 'google_style_guide': ('https://google.github.io/styleguide/cppguide.html%s', None), + 'graphviz': ('http://graphviz.org%s', None), + 'htpasswd': ('https://httpd.apache.org/docs/current/programs/htpasswd.html%s', None), + 'libcellml_repo': ('https://github.com/cellml/libcellml/%s', None), + 'libcellml_buildbot': ('https://autotest.bioeng.auckland.ac.nz/buildbot/libcellml/#/builders%s', None), + 'libxml2': ('http://xmlsoft.org/%s', None), + 'mathml': ('https://www.w3.org/Math/%s', None), + 'msvs': ('https://visualstudio.microsoft.com%s', None), + 'opencmiss_libxml2_repo': ('https://github.com/OpenCMISS-Dependencies/libxml2/releases%s', None), + 'opencmiss_zlib_repo': ('https://github.com/OpenCMISS-Dependencies/zlib/releases%s', None), + 'python': ('https://www.python.org/%s', None), + 'sphinx': ('http://www.sphinx-doc.org/en/master/%s', None), + 'swig':('http://swig.org%s', None), + 'swigwin_download': ('https://sourceforge.net/projects/swig/files/swigwin/%s', None), + 'wikipedia': ('https://en.wikipedia.org/wiki%s', None), + 'xml': ('https://www.w3.org/XML/%s', None), + 'zlib': ('https://www.zlib.net/%s', None), } # The master toctree document. diff --git a/src/api/libcellml/generatorprofile.h b/src/api/libcellml/generatorprofile.h index 10335d24d8..fb9c90510c 100644 --- a/src/api/libcellml/generatorprofile.h +++ b/src/api/libcellml/generatorprofile.h @@ -2587,7 +2587,7 @@ class LIBCELLML_EXPORT GeneratorProfile * Set the @c std::string for the name of the state variable type that is * used in a differential model. * - * @param stateTypeString The @c std::string to use for the name of the + * @param stateVariableTypeString The @c std::string to use for the name of the * state variable type. */ void setStateVariableTypeString(const std::string &stateVariableTypeString);