Skip to content

Commit

Permalink
Merge pull request #77 from pllim/fix-sphinxdev-ci
Browse files Browse the repository at this point in the history
Fix sphinxdev ci
  • Loading branch information
bsipocz authored Feb 3, 2025
2 parents 41b35e6 + da8398d commit f593235
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
11 changes: 8 additions & 3 deletions sphinx_astropy/conf/v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
from os import path

import astropy_sphinx_theme
import sphinx
from packaging.version import Version

try:
import astropy
Expand All @@ -33,7 +35,7 @@
# specific version check, call check_sphinx_version("x.y.z.") from
# your project's conf.py
needs_sphinx = '3.0'

SPHINX_LT_8_2 = Version(sphinx.__version__) < Version("8.2.dev")

on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

Expand Down Expand Up @@ -238,14 +240,17 @@ def check_sphinx_version(expected_version):
# Render inheritance diagrams in SVG
graphviz_output_format = "svg"

graphviz_dot_args = [
graphviz_dot_args = (
'-Nfontsize=10',
'-Nfontname=Helvetica Neue, Helvetica, Arial, sans-serif',
'-Efontsize=10',
'-Efontname=Helvetica Neue, Helvetica, Arial, sans-serif',
'-Gfontsize=10',
'-Gfontname=Helvetica Neue, Helvetica, Arial, sans-serif',
]
)

if SPHINX_LT_8_2:
graphviz_dot_args = list(graphviz_dot_args)

# -- Options for HTML output -------------------------------------------------

Expand Down
11 changes: 9 additions & 2 deletions sphinx_astropy/conf/v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
from collections import ChainMap
from os import path

import sphinx
from packaging.version import Version

try:
import astropy
except ImportError:
Expand All @@ -28,6 +31,7 @@
# The version check in Sphinx itself can only compare the major and
# minor parts of the version number, not the micro.
needs_sphinx = '4.2'
SPHINX_LT_8_2 = Version(sphinx.__version__) < Version("8.2.dev")

on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

Expand Down Expand Up @@ -228,14 +232,17 @@
# Render inheritance diagrams in SVG
graphviz_output_format = "svg"

graphviz_dot_args = [
graphviz_dot_args = (
'-Nfontsize=10',
'-Nfontname=Helvetica Neue, Helvetica, Arial, sans-serif',
'-Efontsize=10',
'-Efontname=Helvetica Neue, Helvetica, Arial, sans-serif',
'-Gfontsize=10',
'-Gfontname=Helvetica Neue, Helvetica, Arial, sans-serif',
]
)

if SPHINX_LT_8_2:
graphviz_dot_args = list(graphviz_dot_args)

# For sphinx-copybutton
copybutton_prompt_text = r">>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: "
Expand Down

0 comments on commit f593235

Please sign in to comment.