diff --git a/asdf/schema.py b/asdf/schema.py index 5fd6d5278..683023c23 100644 --- a/asdf/schema.py +++ b/asdf/schema.py @@ -575,7 +575,7 @@ def validate(instance, ctx=None, schema=None, validators=None, reading=False, *a tag on the instance. The additional ``*args`` and ``**kwargs`` are passed along to - `~jsonschema.protocols.Validator.validate`. + the validator. Parameters ---------- diff --git a/docs/asdf/arrays.rst b/docs/asdf/arrays.rst index 8236458fa..07ab3a189 100644 --- a/docs/asdf/arrays.rst +++ b/docs/asdf/arrays.rst @@ -209,7 +209,7 @@ of the data in memory as an intermediate step. Consider the following example that streams a large CSV file containing rows of integer data and converts it to numpy arrays stored in ASDF: -.. doctest-skip:: +.. code:: import csv import numpy as np diff --git a/docs/conf.py b/docs/conf.py index 5cf496b93..0537845bc 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -7,8 +7,6 @@ else: import tomllib -from sphinx_asdf.conf import * # noqa: F403 - # The standard library importlib.metadata returns duplicate entrypoints # for all python versions up to and including 3.11 # https://github.com/python/importlib_metadata/issues/410#issuecomment-1304258228 @@ -59,10 +57,15 @@ ] # Add intersphinx mappings -intersphinx_mapping["semantic_version"] = ("https://python-semanticversion.readthedocs.io/en/latest/", None) -intersphinx_mapping["jsonschema"] = ("https://python-jsonschema.readthedocs.io/en/stable/", None) -intersphinx_mapping["stdatamodels"] = ("https://stdatamodels.readthedocs.io/en/latest/", None) -intersphinx_mapping["pytest"] = ("https://docs.pytest.org/en/latest/", None) +intersphinx_mapping = { + "numpy": ("https://numpy.org/doc/stable/", None), + "pypa-packaging": ("https://packaging.python.org/en/latest/", None), + "pytest": ("https://docs.pytest.org/en/latest/", None), + "python": ("https://docs.python.org/3/", None), + "semantic_version": ("https://python-semanticversion.readthedocs.io/en/latest/", None), + "stdatamodels": ("https://stdatamodels.readthedocs.io/en/latest/", None), +} + # Docs are hosted as a "subproject" under the main project's domain: https://www.asdf-format.org/projects # This requires including links to main project (asdf-website) and the other asdf subprojects @@ -77,19 +80,63 @@ "asdf-wcs-schemas": ("https://www.asdf-format.org/projects/asdf-wcs-schemas/en/latest/", None), } -intersphinx_mapping.update(subprojects) # noqa: F405 -extensions += ["sphinx_inline_tabs", "sphinx.ext.intersphinx", "sphinx.ext.extlinks"] # noqa: F405 +intersphinx_mapping.update(subprojects) + +extensions = [ + # TODO clean these up, do we need them all? + "sphinx_inline_tabs", + "sphinx.ext.intersphinx", + "sphinx.ext.extlinks", + "sphinx_asdf", + "sphinx.ext.autodoc", + "sphinx.ext.coverage", + "sphinx.ext.inheritance_diagram", + "sphinx.ext.intersphinx", + "sphinx.ext.mathjax", + "sphinx.ext.todo", + "sphinx.ext.viewcode", + "sphinxcontrib.jquery", + "numpydoc", + "sphinx_automodapi.automodapi", + "sphinx_automodapi.smart_resolver", +] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ["_build"] + +# The suffix of source filenames. +source_suffix = ".rst" + +# The master toctree document. +master_doc = "index" + +# The reST default role (used for this markup: `text`) to use for all +# documents. Set to the "smart" one. +default_role = "obj" + +# Don't show summaries of the members in each class along with the +# class' docstring +numpydoc_show_class_members = False + +autosummary_generate = True + +automodapi_toctreedirnm = "api" + +# Class documentation should contain *both* the class docstring and +# the __init__ docstring +autoclass_content = "both" html_theme = "furo" html_static_path = ["_static"] -# Override default settings from sphinx_asdf / sphinx_astropy (incompatible with furo) html_sidebars = {} # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. html_favicon = "_static/images/favicon.ico" html_logo = "" +html_last_updated_fmt = "%d %b %Y" globalnavlinks = { "ASDF Projects": "https://www.asdf-format.org", diff --git a/docs/rtd_environment.yaml b/docs/rtd_environment.yaml index 31aa96589..f4194e813 100644 --- a/docs/rtd_environment.yaml +++ b/docs/rtd_environment.yaml @@ -1,9 +1,8 @@ name: rtd311 channels: - conda-forge - - defaults dependencies: - - python=3.11 + - python=3.13 - pip - graphviz - furo