From 1002d6645e028a77f7a99e235e9ac1688e2a46fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francis=20Clairicia-Rose-Claire-Jos=C3=A9phine?= Date: Wed, 1 Nov 2023 15:03:41 +0100 Subject: [PATCH] Added .readthedocs.yaml file (#140) skip-checks: true --- .github/workflows/build.yml | 2 ++ .readthedocs.yaml | 18 ++++++++++++++++++ docs/source/conf.py | 11 ++++++++--- pyproject.toml | 1 + 4 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 .readthedocs.yaml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4b6db6d8..e4e6feb4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,6 +12,7 @@ on: - '.bumpversion.cfg' - '.flake8' - '.pre-commit-config.yaml' + - '.readthedocs.yaml' - '**.md' - '!README.md' - '.github/**' @@ -28,6 +29,7 @@ on: - '.bumpversion.cfg' - '.flake8' - '.pre-commit-config.yaml' + - '.readthedocs.yaml' - '**.md' - '!README.md' - '.github/**' diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..d5555beb --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,18 @@ +version: 2 + +build: + os: ubuntu-22.04 + tools: + python: "3.11" + jobs: + post_create_environment: + - pip install pdm + - pdm config python.use_venv false + - pdm config check_update false + post_install: + - pdm sync --no-self --dev --group=doc + pre_build: + - python -m sphinx -b linkcheck -D docs/source/ $READTHEDOCS_OUTPUT/linkcheck + +sphinx: + configuration: docs/source/conf.py diff --git a/docs/source/conf.py b/docs/source/conf.py index 1cfe82af..2597fd22 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -52,7 +52,7 @@ exclude_patterns = ["_include", "_extensions"] -# -- sphinx.ext.autodoc configuration ------------------------------------------- +# -- sphinx.ext.autodoc configuration ---------------------------------------- # https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html autoclass_content = "both" @@ -92,7 +92,7 @@ } -# -- sphinx.ext.napoleon configuration ------------------------------------------- +# -- sphinx.ext.napoleon configuration --------------------------------------- # https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html napoleon_numpy_docstring = False @@ -131,9 +131,14 @@ html_theme = "sphinx_rtd_theme" html_static_path = [] -# -- sphinx-rtd-theme configuration ------------------------------------- +# -- sphinx-rtd-theme configuration ------------------------------------------ # https://sphinx-rtd-theme.readthedocs.io/en/stable/configuring.html html_theme_options = { "navigation_depth": -1, # Unlimited } + +# -- Options for the linkcheck builder --------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-the-linkcheck-builder + +linkcheck_timeout = 1 diff --git a/pyproject.toml b/pyproject.toml index 035244ed..23bf1005 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -116,6 +116,7 @@ exclude = [ ".github/", ".vscode/", ".bumpversion.cfg", + ".readthedocs.yaml", ] [tool.hatch.build.targets.wheel]