From 162286f6d13cb18f4da00e1e3238e491edd0e874 Mon Sep 17 00:00:00 2001 From: Christopher Moussa Date: Wed, 9 Oct 2024 11:18:17 -0700 Subject: [PATCH 1/3] doc: add .readthedocs.yaml Problem: flux-accounting does not have a configuration file for ReadTheDocs support. Add the configuration file for ReadTheDocs. --- .readthedocs.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..3803a410 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,22 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.11" + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: doc/conf.py + +# We recommend specifying your dependencies to enable reproducible builds: +# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +python: + install: + - requirements: doc/requirements.txt From 3fc022548e4d63e2a165242cd99327bc0d9700b0 Mon Sep 17 00:00:00 2001 From: Christopher Moussa Date: Wed, 9 Oct 2024 11:26:37 -0700 Subject: [PATCH 2/3] index: add link to flux-accounting guide Problem: The home page for flux-accounting does not have a link to the flux-accounting guide. Add a link. --- doc/index.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/index.rst b/doc/index.rst index 5e2d4b29..5f21743f 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -1,9 +1,13 @@ Documentation for flux-accounting ================================= +This site contains documentation for flux-accounting configuration and +management. + .. toctree:: :maxdepth: 2 - :caption: Contents: + + guide/accounting-guide .. _man-pages: From 81148446bc9e53b4721fb6eab1735a7da0806c04 Mon Sep 17 00:00:00 2001 From: cmoussa1 Date: Thu, 10 Oct 2024 09:19:30 -0700 Subject: [PATCH 3/3] doc: add man1 to reference setup Problem: The links to flux-core's man1 pages do not work properly because the setup() function does not add man1 pages as a role during setup. Add man1 as a section during setup of the docs. --- doc/conf.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/conf.py b/doc/conf.py index 00739726..8d5bead9 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -54,6 +54,10 @@ extensions = ["sphinx.ext.intersphinx", "sphinx.ext.napoleon", "domainrefs"] domainrefs = { + "core:man1": { + "text": "%s(1)", + "url": "https://flux-framework.readthedocs.io/projects/flux-core/en/latest/man1/%s.html", + }, "core:man5": { "text": "%s(5)", "url": "https://flux-framework.readthedocs.io/projects/flux-core/en/latest/man5/%s.html", @@ -118,7 +122,7 @@ def man_role(name, rawtext, text, lineno, inliner, options={}, content=[]): # launch setup def setup(app): app.connect("builder-inited", run_apidoc) - for section in [5]: + for section in [1, 5]: app.add_role(f"man{section}", man_role)