Skip to content

Commit

Permalink
Fix OMG Spec Links Page
Browse files Browse the repository at this point in the history
[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 OpenDDS#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.
  • Loading branch information
iguessthislldo committed Sep 17, 2024
1 parent fc3720b commit e7162d2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 7 additions & 2 deletions docs/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 2 additions & 1 deletion docs/sphinx_extensions/links.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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]
Expand Down

0 comments on commit e7162d2

Please sign in to comment.