Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/sunpy/package-template",
"commit": "c0e51ac3283d88346534da0aac441f37f624b283",
"commit": "7b0225e0a206b7b6249752991334dea7e9ffcfd4",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.6.4"
rev: "v0.6.9"
hooks:
- id: ruff
args: ['--fix', '--unsafe-fixes']
Expand Down
100 changes: 74 additions & 26 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,23 @@

from sunpy_sphinx_theme import PNG_ICON

from packaging.version import Version

# -- Project information -----------------------------------------------------

# The full version, including alpha/beta/rc tags
from drms import __version__

release = __version__
_version = Version(__version__)
version = release = str(_version)
# Avoid "post" appearing in version string in rendered docs
if _version.is_postrelease:
version = release = _version.base_version
# Avoid long githashes in rendered Sphinx docs
elif _version.is_devrelease:
version = release = f"{_version.base_version}.dev{_version.dev}"
is_development = _version.is_devrelease
is_release = not(_version.is_prerelease or _version.is_devrelease)

project = "drms"
author = "The SunPy Community"
Expand Down Expand Up @@ -64,14 +74,75 @@
# Treat everything in single ` as a Python reference.
default_role = "py:obj"

# -- Options for intersphinx extension ---------------------------------------

intersphinx_mapping = {
"python": (
"https://docs.python.org/3/",
(None, "http://www.astropy.org/astropy-data/intersphinx/python3.inv"),
),
"numpy": (
"https://numpy.org/doc/stable/",
(None, "http://www.astropy.org/astropy-data/intersphinx/numpy.inv"),
),
"scipy": (
"https://docs.scipy.org/doc/scipy/reference/",
(None, "http://www.astropy.org/astropy-data/intersphinx/scipy.inv"),
),
"matplotlib": ("https://matplotlib.org/stable", None),
"astropy": ("https://docs.astropy.org/en/stable/", None),
"pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
"sunpy": ("https://docs.sunpy.org/en/stable/", None),
}

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

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = "sunpy"

# Render inheritance diagrams in SVG
graphviz_output_format = "svg"

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",
]

# 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"] # NOQA: ERA001

# By default, when rendering docstrings for classes, sphinx.ext.autodoc will
# make docs with the class-level docstring and the class-method docstrings,
# but not the __init__ docstring, which often contains the parameters to
# class constructors across the scientific Python ecosystem. The option below
# will append the __init__ docstring to the class-level docstring when rendering
# the docs. For more options, see:
# https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autoclass_content
autoclass_content = "both"

# -- Other options ----------------------------------------------------------

# JSOC email os env
# see https://github.com/sunpy/sunpy/wiki/Home:-JSOC
os.environ["JSOC_EMAIL"] = "jsoc@sunpy.org"

# -- Options for hoverxref -----------------------------------------------------

if os.environ.get("READTHEDOCS"):
hoverxref_api_host = "https://readthedocs.org"
if os.environ.get("PROXIED_API_ENDPOINT"):
# Use the proxied API endpoint
# - A RTD thing to avoid a CSRF block when docs are using a
# custom domain
hoverxref_api_host = "/_"

hoverxref_tooltip_maxwidth = 600 # RTD main window is 696px
hoverxref_auto_ref = True
hoverxref_mathjax = True
Expand All @@ -95,36 +166,13 @@
}

# -- Options for sphinx-copybutton ---------------------------------------------

# Python Repl + continuation, Bash, ipython and qtconsole + continuation, jupyter-console + continuation
copybutton_prompt_text = r">>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: "
copybutton_prompt_is_regexp = True

# -- Options for intersphinx extension ---------------------------------------
intersphinx_mapping = {
"python": (
"https://docs.python.org/3/",
(None, "http://www.astropy.org/astropy-data/intersphinx/python3.inv"),
),
"numpy": (
"https://numpy.org/doc/stable/",
(None, "http://www.astropy.org/astropy-data/intersphinx/numpy.inv"),
),
"scipy": (
"https://docs.scipy.org/doc/scipy/reference/",
(None, "http://www.astropy.org/astropy-data/intersphinx/scipy.inv"),
),
"matplotlib": ("https://matplotlib.org/stable", None),
"astropy": ("https://docs.astropy.org/en/stable/", None),
"pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
"sunpy": ("https://docs.sunpy.org/en/stable/", None),
}
# -- Sphinx Gallery ------------------------------------------------------------

# -- Options for HTML output -------------------------------------------------
html_theme = "sunpy"
# JSOC email os env
# see https://github.com/sunpy/sunpy/wiki/Home:-JSOC
os.environ["JSOC_EMAIL"] = "jsoc@sunpy.org"
graphviz_output_format = "svg"
sphinx_gallery_conf = {
"backreferences_dir": Path("generated") / "modules",
"filename_pattern": "^((?!skip_).)*$",
Expand Down
2 changes: 1 addition & 1 deletion drms/_dev/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
This package contains utilities that are only used when developing drms in a
This package contains utilities that are only used when developing in a
copy of the source repository.

These files are not installed, and should not be assumed to exist at
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ docs = [
"sphinxext-opengraph",
"sunpy-sphinx-theme",
"sphinx-automodapi",
"packaging",
]
[project.urls]
repository = "https://sunpy.org"
Expand Down