diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 000000000..c5ceca992 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,31 @@ +name: Docs + +# Docs build check is defined once, centrally, in PyAutoHeart's reusable +# workflow (Heart owns all health/readiness checking). This thin caller +# builds the Sphinx docs on PRs and fails on warning-count regression +# against docs/sphinx_warning_baseline.txt. + +on: + push: + branches: [main] + paths: + - "docs/**" + - "autolens/**" + - "pyproject.toml" + - ".readthedocs.yaml" + - ".github/workflows/docs.yml" + pull_request: + paths: + - "docs/**" + - "autolens/**" + - "pyproject.toml" + - ".readthedocs.yaml" + - ".github/workflows/docs.yml" + workflow_dispatch: + +jobs: + docs: + uses: PyAutoLabs/PyAutoHeart/.github/workflows/docs-build.yml@main + with: + package: autolens + secrets: inherit diff --git a/.gitignore b/.gitignore index e5f27da06..184ed2074 100644 --- a/.gitignore +++ b/.gitignore @@ -66,3 +66,4 @@ docs/_templates docs/generated docs/api/generated autolens_workspace_test/ +docs/api/_autosummary diff --git a/docs/conf.py b/docs/conf.py index d6b4dd528..7549d313e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -90,7 +90,7 @@ numpydoc_show_class_members = False numpydoc_show_inherited_class_members = False -nnumpydoc_class_members_toctree = True +numpydoc_class_members_toctree = True # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. @@ -122,18 +122,8 @@ pygments_dark_style = "monokai" add_function_parentheses = False -html_context = { - "menu_links_name": "Repository", - "doc_path": "docs", - "github_project": "pyautolens", - "github_repo": "pyautolens", - "github_version": "master", -} language = "en" -html_static_path = ["_static"] -html_css_files = ["pied-piper-admonition.css"] - html_theme_options = { "light_css_variables": { "color-brand-primary": "#7C4DFF", diff --git a/docs/sphinx_warning_baseline.txt b/docs/sphinx_warning_baseline.txt new file mode 100644 index 000000000..405e2afe8 --- /dev/null +++ b/docs/sphinx_warning_baseline.txt @@ -0,0 +1 @@ +134