From e7162d2a4cb4860ef3f2bd10049d5328184e92fb Mon Sep 17 00:00:00 2001 From: Fred Hornsey Date: Tue, 17 Sep 2024 17:32:20 -0500 Subject: [PATCH] Fix OMG Spec Links Page [This page](https://opendds.readthedocs.io/en/master/internal/omg_spec_links.html) was causing a lot of output in the link checker, so I made it conditional in https://github.com/OpenDDS/OpenDDS/pull/4669. Unfortunately it looks like I also broke the page so it never lists all the possible spec section links. Also added `--nitpicky', `--keep-going', and `--show-traceback' to the `sphinx-build` command of `build.py strict` to make output more useful. --- docs/build.py | 9 +++++++-- docs/sphinx_extensions/links.py | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/build.py b/docs/build.py index 661c0e28c36..3a1914dfebf 100755 --- a/docs/build.py +++ b/docs/build.py @@ -118,11 +118,16 @@ def do_test(self): def do_strict(self): self.do(['test'], because_of='strict') - self.sphinx_build('dummy', '-W') + self.sphinx_build('dummy', + '--nitpicky', + '--fail-on-warning', + '--keep-going', + '--show-traceback', + ) return None def do_linkcheck(self): - self.sphinx_build('linkcheck', defines=['gen_all_omg_spec_links=False']) + self.sphinx_build('linkcheck', defines=['gen_all_omg_spec_links=0']) return None def do_html(self): diff --git a/docs/sphinx_extensions/links.py b/docs/sphinx_extensions/links.py index 63d321f39c8..dd9e08a3a89 100644 --- a/docs/sphinx_extensions/links.py +++ b/docs/sphinx_extensions/links.py @@ -365,6 +365,7 @@ def spec_sections(self, spec, node, sections): node += section_list def run(self): + debug_links = 'debug-links' in self.options and self.env.app.config.gen_all_omg_spec_links specs_node = nodes.bullet_list() for spec_name, spec in self.env.app.config.omg_specs.items(): spec_node = nodes.list_item() @@ -375,7 +376,7 @@ def run(self): p += nodes.literal('', spec_name) p += nodes.inline('', ')') spec_node += p - if 'debug-links' in self.options and not self.env.app.config.gen_all_omg_spec_links: + if debug_links: self.spec_sections(spec, spec_node, spec['sections']) specs_node += spec_node return [specs_node]