Skip to content

Commit

Permalink
cleaning up last dev dregs
Browse files Browse the repository at this point in the history
  • Loading branch information
john-science committed Mar 6, 2025
1 parent b6ca40e commit 324b525
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 36 deletions.
1 change: 0 additions & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
- name: Make html/pdf Docs
continue-on-error: true
run: |
# Some of these installs are hopefully obsolete. JOHN TODO
sudo apt-get install texlive-xetex
sudo apt-get install texlive-latex-base
sudo apt-get install texlive-fonts-recommended
Expand Down
52 changes: 17 additions & 35 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,13 @@
# limitations under the License.

"""
ARMI documentation build configuration file, created by
sphinx-quickstart on Wed Apr 02 11:36:09 2014.
ARMI documentation build configuration file.
This file is execfile()d with the current directory set to its containing dir.
Note that not all possible configuration values are present in this
autogenerated file.
Note that not all possible configuration values are present in this autogenerated file.
All configuration values have a default; values that are commented out
serve to show the default.
All configuration values have a default; values that are commented out serve to show the default.
"""

# ruff: noqa: E402
Expand Down Expand Up @@ -129,9 +126,9 @@ class PyReverse(Directive):
The directive accepts the same arguments as pyreverse, except you should not specify
``--project`` or ``-o`` (output format). These are automatically specified.
If you pass ``-c`` to this, the figure generated is forced to be the className.png
like ``BurnMatrix.png``. For .gitignore purposes, this is a pain. Thus, we
auto-prefix ALL images generated by this directive with ``pyrev_``.
If you pass ``-c`` to this, the figure generated is forced to be the className.png like
``BurnMatrix.png``. For .gitignore purposes, this is a pain. Thus, we auto-prefix ALL images
generated by this directive with ``pyrev_``.
"""

has_content = True
Expand All @@ -157,8 +154,8 @@ def run(self):
command = [sys.executable, "-m", "pylint.pyreverse.main"]
print("Running {}".format(command + args))
env = dict(os.environ)
# apply any runtime path mods to the pythonpath env variable (e.g. sys.path
# mods made during doc confs)
# apply any runtime path mods to the pythonpath env variable (e.g. sys.path mods made
# during doc confs)
env["PYTHONPATH"] = os.pathsep.join(sys.path)
subprocess.check_call(command + args, env=env)

Expand All @@ -175,7 +172,7 @@ def run(self):
)
new_content = [f".. figure:: /{APIDOC_REL}/pyr_{fig_name}"]

# assume we don't need the packages_, and delete.
# assume we don't need the packages, and delete.
try:
os.remove("packages_{}.png".format(args[0]))
except OSError:
Expand Down Expand Up @@ -254,8 +251,6 @@ def setup(app):
extensions = [
"nbsphinx",
"nbsphinx_link",
# "sphinx_pdf_generate",
#'rst2pdf.pdfbuilder',
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.doctest",
Expand All @@ -270,18 +265,14 @@ def setup(app):
"sphinx.ext.viewcode",
"sphinx_gallery.gen_gallery",
"sphinx_needs", # needed for requirements tracking
"sphinxcontrib.test_reports",
"sphinx_rtd_theme", # needed here for loading jquery in sphinx 6
# "sphinx_simplepdf",
"sphinxcontrib.apidoc",
"sphinxcontrib.jquery", # see https://github.com/readthedocs/sphinx_rtd_theme/issues/1452
"sphinxcontrib.plantuml",
"sphinxcontrib.test_reports",
"sphinxext.opengraph",
]

# extensions = ['rst2pdf.pdfbuilder']
# pdf_documents = [('index', u'rst2pdf', u'Sample rst2pdf doc', u'Your Name'),]

# Our API should make sense without documenting private/special members.
autodoc_default_options = {
"members": True,
Expand Down Expand Up @@ -374,8 +365,8 @@ def setup(app):
# The theme to use for HTML and HTML Help pages. See the documentation for a list of builtin themes.
html_theme = "sphinx_rtd_theme"

# (Optional) Logo. Should be small enough to fit the navbar (ideally 24x24).
# Path should be relative to the ``_static`` files directory.
# (Optional) Logo. Should be small enough to fit the navbar (ideally 24x24). Path should be relative
# to the ``.static`` files directory.
html_logo = os.path.join(STATIC_DIR, "armiicon_24x24.ico")

# Theme options are theme-specific and customize the look and feel of a theme further.
Expand All @@ -401,13 +392,13 @@ def setup(app):
# be a Windows icon file (.ico) being 16x16 or 32x32 pixels large.
html_favicon = os.path.join(STATIC_DIR, "armiicon_16x16.ico")

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# Add any paths that contain custom static files (such as style sheets) here, relative to this
# directory. They are copied after the builtin static files, so a file named "default.css" will
# overwrite the builtin "default.css".
html_static_path = [STATIC_DIR]

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, using the given
# strftime format.
html_last_updated_fmt = "%Y-%m-%d"

# Output file base name for HTML help builder.
Expand Down Expand Up @@ -509,15 +500,6 @@ def setup(app):
image_converter = "magick"
image_converter_args = ["convert"]

# PDF-only settings
# simplepdf_debug = True
# simplepdf_use_weasyprint_api = True
# simplepdf_weasyprint_flags = ["-v"]
# simplepdf_vars = {
# "links": "#FF3333",
# "primary": "#333333",
# }

# sphinx-needs settings
needs_statuses = [
dict(name=None, description="No status yet; not in any reviews"),
Expand Down

0 comments on commit 324b525

Please sign in to comment.