Skip to content

Commit

Permalink
Turn Sphinx warnings into errors in CI (#2754)
Browse files Browse the repository at this point in the history
  • Loading branch information
yut23 authored Feb 13, 2024
1 parent fe6ff48 commit 62193e9
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 8 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/docs-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
branches:
- development

env:
# enable color output from Sphinx
FORCE_COLOR: "1"

jobs:
docs:
runs-on: ubuntu-latest
Expand All @@ -33,7 +37,10 @@ jobs:
- name: Build docs
run: |
cd Docs/
make SPHINXOPTS=-v NO_DOXYGEN=TRUE html
# remove missing TOC entries that would otherwise be generated by
# doxygen to avoid warnings about missing references
sed -i -e 's/^ filelist$//; s/^ classlist$//' source/index.rst
make SPHINXOPTS='-v -W --keep-going' NO_DOXYGEN=TRUE html
- name: Check links
run: |
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ Docs/source/namespacelist.rst
Docs/source/runtime_parameters.rst
Docs/source/*_files.rst
Docs/source/preprocessed_files
Docs/source/yt_example.rst
Docs/source/yt_example_files/


amr_diag.out
Expand Down
10 changes: 5 additions & 5 deletions Docs/rp.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
from more_itertools import unique_everseen

MAIN_HEADER = """
+--------------------------------------------+-------------------------------------------------------------+---------------+
| parameter | description | default value |
+============================================+=============================================================+===============+
+--------------------------------------------+-------------------------------------------------------------+-----------------------------+
| parameter | description | default value |
+============================================+=============================================================+=============================+
"""

SEPARATOR = """
+--------------------------------------------+-------------------------------------------------------------+---------------+
+--------------------------------------------+-------------------------------------------------------------+-----------------------------+
"""

ENTRY = """
| {:42} | {:59} | {:13} |
| {:42} | {:59} | {:27} |
"""

WRAP_LEN = 59
Expand Down
2 changes: 1 addition & 1 deletion Docs/source/FlowChart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ In the code, the objective is to evolve the state from the old time,
A. Create ``Sborder``, initialized from ``S_old``

B. Call ``clean_state()`` to make sure the thermodynamics are in
sync, in particular, compute the temperature.
sync, in particular, compute the temperature.

C. [``SHOCK_VAR``] zero out the shock flag.

Expand Down
2 changes: 2 additions & 0 deletions Docs/source/docutils.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[parsers]
line_length_limit = 1000000
2 changes: 1 addition & 1 deletion Docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ https://github.com/amrex-astro/Castro

filelist
classlist
.. namespacelist
.. namespacelist
.. toctree::
:caption: References
Expand Down

0 comments on commit 62193e9

Please sign in to comment.