Skip to content

Commit a50580d

Browse files
authored
Merge pull request #1998 from braingram/rtd_py313
build docs on python 3.13
2 parents d603820 + ab89f93 commit a50580d

4 files changed

Lines changed: 59 additions & 13 deletions

File tree

asdf/schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ def validate(instance, ctx=None, schema=None, validators=None, reading=False, *a
575575
tag on the instance.
576576
577577
The additional ``*args`` and ``**kwargs`` are passed along to
578-
`~jsonschema.protocols.Validator.validate`.
578+
the validator.
579579
580580
Parameters
581581
----------

docs/asdf/arrays.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ of the data in memory as an intermediate step. Consider the following example
209209
that streams a large CSV file containing rows of integer data and converts it
210210
to numpy arrays stored in ASDF:
211211

212-
.. doctest-skip::
212+
.. code::
213213
214214
import csv
215215
import numpy as np

docs/conf.py

Lines changed: 56 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
else:
88
import tomllib
99

10-
from sphinx_asdf.conf import * # noqa: F403
11-
1210
# The standard library importlib.metadata returns duplicate entrypoints
1311
# for all python versions up to and including 3.11
1412
# https://github.com/python/importlib_metadata/issues/410#issuecomment-1304258228
@@ -59,10 +57,15 @@
5957
]
6058

6159
# Add intersphinx mappings
62-
intersphinx_mapping["semantic_version"] = ("https://python-semanticversion.readthedocs.io/en/latest/", None)
63-
intersphinx_mapping["jsonschema"] = ("https://python-jsonschema.readthedocs.io/en/stable/", None)
64-
intersphinx_mapping["stdatamodels"] = ("https://stdatamodels.readthedocs.io/en/latest/", None)
65-
intersphinx_mapping["pytest"] = ("https://docs.pytest.org/en/latest/", None)
60+
intersphinx_mapping = {
61+
"numpy": ("https://numpy.org/doc/stable/", None),
62+
"pypa-packaging": ("https://packaging.python.org/en/latest/", None),
63+
"pytest": ("https://docs.pytest.org/en/latest/", None),
64+
"python": ("https://docs.python.org/3/", None),
65+
"semantic_version": ("https://python-semanticversion.readthedocs.io/en/latest/", None),
66+
"stdatamodels": ("https://stdatamodels.readthedocs.io/en/latest/", None),
67+
}
68+
6669

6770
# Docs are hosted as a "subproject" under the main project's domain: https://www.asdf-format.org/projects
6871
# This requires including links to main project (asdf-website) and the other asdf subprojects
@@ -77,19 +80,63 @@
7780
"asdf-wcs-schemas": ("https://www.asdf-format.org/projects/asdf-wcs-schemas/en/latest/", None),
7881
}
7982

80-
intersphinx_mapping.update(subprojects) # noqa: F405
8183

82-
extensions += ["sphinx_inline_tabs", "sphinx.ext.intersphinx", "sphinx.ext.extlinks"] # noqa: F405
84+
intersphinx_mapping.update(subprojects)
85+
86+
extensions = [
87+
# TODO clean these up, do we need them all?
88+
"sphinx_inline_tabs",
89+
"sphinx.ext.intersphinx",
90+
"sphinx.ext.extlinks",
91+
"sphinx_asdf",
92+
"sphinx.ext.autodoc",
93+
"sphinx.ext.coverage",
94+
"sphinx.ext.inheritance_diagram",
95+
"sphinx.ext.intersphinx",
96+
"sphinx.ext.mathjax",
97+
"sphinx.ext.todo",
98+
"sphinx.ext.viewcode",
99+
"sphinxcontrib.jquery",
100+
"numpydoc",
101+
"sphinx_automodapi.automodapi",
102+
"sphinx_automodapi.smart_resolver",
103+
]
104+
105+
# List of patterns, relative to source directory, that match files and
106+
# directories to ignore when looking for source files.
107+
exclude_patterns = ["_build"]
108+
109+
# The suffix of source filenames.
110+
source_suffix = ".rst"
111+
112+
# The master toctree document.
113+
master_doc = "index"
114+
115+
# The reST default role (used for this markup: `text`) to use for all
116+
# documents. Set to the "smart" one.
117+
default_role = "obj"
118+
119+
# Don't show summaries of the members in each class along with the
120+
# class' docstring
121+
numpydoc_show_class_members = False
122+
123+
autosummary_generate = True
124+
125+
automodapi_toctreedirnm = "api"
126+
127+
# Class documentation should contain *both* the class docstring and
128+
# the __init__ docstring
129+
autoclass_content = "both"
83130

84131
html_theme = "furo"
85132
html_static_path = ["_static"]
86-
# Override default settings from sphinx_asdf / sphinx_astropy (incompatible with furo)
87133
html_sidebars = {}
88134
# The name of an image file (within the static path) to use as favicon of the
89135
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
90136
# pixels large.
91137
html_favicon = "_static/images/favicon.ico"
92138
html_logo = ""
139+
html_last_updated_fmt = "%d %b %Y"
93140

94141
globalnavlinks = {
95142
"ASDF Projects": "https://www.asdf-format.org",

docs/rtd_environment.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
name: rtd311
22
channels:
33
- conda-forge
4-
- defaults
54
dependencies:
6-
- python=3.11
5+
- python=3.13
76
- pip
87
- graphviz
98
- furo

0 commit comments

Comments
 (0)