Skip to content

Commit

Permalink
Fix up docs linking (#1499)
Browse files Browse the repository at this point in the history
* Fix up docs linking

* Missed a colon

* Update changelog
  • Loading branch information
jsignell authored Jan 21, 2025
1 parent 312a081 commit bc5eae4
Show file tree
Hide file tree
Showing 62 changed files with 499 additions and 275 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,4 @@ jobs:
- name: Install pystac
run: uv sync --no-dev && uv sync --package pystac-docs --inexact
- name: Check docs
run: uv run make -C docs html SPHINXOPTS="-W --keep-going"
run: uv run make -C docs html SPHINXOPTS="-W --keep-going -n"
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

- Use `application/geo+json` for `item` links ([#1495](https://github.com/stac-utils/pystac/pull/1495))
- Includes the scientific extension in Item's ext interface ([#1496](https://github.com/stac-utils/pystac/pull/1496))
- Fixes all broken documentation links and adds check to CI ([#1499](https://github.com/stac-utils/pystac/pull/1499))

## [v1.11.0] - 2024-09-26

Expand Down
4 changes: 1 addition & 3 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,7 @@ Serialization
The ``pystac.serialization`` sub-package contains tools used internally by PySTAC to
identify, serialize, and migrate STAC objects:

* :mod:`pystac.serialization.identify`: Tools for identifying STAC objects
* :mod:`pystac.serialization.migrate`: Tools for migrating STAC objects from a previous
STAC Spec version.
* :mod:`pystac.serialization`: Tools for identifying and migrating STAC objects


Validation
Expand Down
7 changes: 6 additions & 1 deletion docs/api/asset.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
pystac.asset
============

.. automodule:: pystac.asset
.. autoclass:: pystac.asset.Asset
:members:
:undoc-members:
:noindex:

.. automodule:: pystac.asset
:members:
:undoc-members:
:exclude-members: Asset
7 changes: 6 additions & 1 deletion docs/api/catalog.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
pystac.catalog
==============

.. automodule:: pystac.catalog
.. autoclass:: pystac.catalog.Catalog
:members:
:undoc-members:
:noindex:

.. automodule:: pystac.catalog
:members:
:undoc-members:
:exclude-members: Catalog
7 changes: 6 additions & 1 deletion docs/api/collection.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
pystac.collection
=================

.. automodule:: pystac.collection
.. autoclass:: pystac.collection.Collection
:members:
:undoc-members:
:noindex:

.. automodule:: pystac.collection
:members:
:undoc-members:
:exclude-members: Collection
3 changes: 2 additions & 1 deletion docs/api/extensions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ pystac.extensions

.. autosummary::

datacube.DatacubeExtension
classification.ClassificationExtension
datacube.DatacubeExtension
eo.EOExtension
file.FileExtension
grid.GridExtension
Expand All @@ -23,6 +23,7 @@ pystac.extensions
pointcloud.PointcloudExtension
projection.ProjectionExtension
raster.RasterExtension
render.RenderExtension
sar.SarExtension
sat.SatExtension
scientific.ScientificExtension
Expand Down
7 changes: 7 additions & 0 deletions docs/api/extensions/ext.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pytac.extensions.ext
====================

.. automodule:: pystac.extensions.ext
:members:
:inherited-members:
:undoc-members:
6 changes: 6 additions & 0 deletions docs/api/extensions/render.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pystac.extensions.render
========================

.. automodule:: pystac.extensions.render
:members:
:undoc-members:
7 changes: 6 additions & 1 deletion docs/api/item.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
pystac.item
===========

.. automodule:: pystac.item
.. autoclass:: pystac.item.Item
:members:
:undoc-members:
:noindex:

.. automodule:: pystac.item
:members:
:undoc-members:
:exclude-members: Item
7 changes: 6 additions & 1 deletion docs/api/item_collection.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
pystac.item_collection
======================

.. automodule:: pystac.item_collection
.. autoclass:: pystac.item_collection.ItemCollection
:members:
:undoc-members:
:noindex:

.. automodule:: pystac.item_collection
:members:
:undoc-members:
:exclude-members: ItemCollection
7 changes: 6 additions & 1 deletion docs/api/link.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
pystac.link
===========

.. automodule:: pystac.link
.. autoclass:: pystac.link.Link
:members:
:undoc-members:
:noindex:

.. automodule:: pystac.link
:members:
:undoc-members:
:exclude-members: Link
16 changes: 16 additions & 0 deletions docs/api/pystac.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Catalog

.. autoclass:: pystac.Catalog
:members:
:inherited-members:
:undoc-members:

CatalogType
Expand All @@ -59,6 +60,7 @@ Collection

.. autoclass:: pystac.Collection
:members:
:inherited-members:
:undoc-members:

Extent
Expand Down Expand Up @@ -108,6 +110,7 @@ Item

.. autoclass:: pystac.Item
:members:
:inherited-members:
:undoc-members:

Asset
Expand Down Expand Up @@ -137,12 +140,14 @@ ItemCollection

.. autoclass:: pystac.ItemCollection
:members:
:inherited-members:

Link
----

.. autoclass:: pystac.Link
:members:
:inherited-members:
:undoc-members:

MediaType
Expand Down Expand Up @@ -208,3 +213,14 @@ STACValidationError
~~~~~~~~~~~~~~~~~~~

.. autoclass:: pystac.STACValidationError

TemplateError
~~~~~~~~~~~~~

.. autoclass:: pystac.TemplateError


DeprecatedWarning
~~~~~~~~~~~~~~~~~

.. autoclass:: pystac.DeprecatedWarning
15 changes: 14 additions & 1 deletion docs/api/serialization/identify.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
pystac.serialization.identify
=============================


.. automodule:: pystac.serialization.identify
:members: STACVersionRange, identify_stac_object, identify_stac_object_type
:undoc-members:
:noindex:


.. autoclass:: pystac.serialization.identify.STACVersionRange
:members:
:undoc-members:
:noindex:


.. automodule:: pystac.serialization.identify
:members:
:undoc-members:
:noindex:
:exclude-members: STACVersionRange, identify_stac_object, identify_stac_object_type
14 changes: 13 additions & 1 deletion docs/api/stac_object.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
pystac.stac_object
==================

.. automodule:: pystac.stac_object
.. autoclass:: pystac.stac_object.STACObject
:members:
:undoc-members:
:noindex:

.. autoclass:: pystac.stac_object.STACObjectType
:members:
:undoc-members:
:noindex:

.. automodule:: pystac.stac_object
:members:
:undoc-members:
:exclude-members: STACObject, STACObjectType

.. autoclass:: pystac.stac_object.S
7 changes: 6 additions & 1 deletion docs/api/summaries.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
pystac.summaries
================

.. automodule:: pystac.summaries
.. autoclass:: pystac.summaries.Summaries
:members:
:undoc-members:
:noindex:

.. automodule:: pystac.summaries
:members:
:undoc-members:
:exclude-members: Summaries
4 changes: 4 additions & 0 deletions docs/api/utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ pystac.utils
.. automodule:: pystac.utils
:members:
:undoc-members:

.. autoclass:: pystac.utils.T

.. autoclass:: pystac.utils.U
1 change: 1 addition & 0 deletions docs/api/validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ pystac.validation

.. automodule:: pystac.validation
:members:
:undoc-members:
6 changes: 6 additions & 0 deletions docs/api/validation/local_validator.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pystac.validation.local\_validator
==================================

.. automodule:: pystac.validation.local_validator
:members:
:undoc-members:
6 changes: 6 additions & 0 deletions docs/api/validation/stac_validator.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
pystac.validation.stac\_validator
=================================

.. autoclass:: pystac.validation.stac_validator.JsonSchemaSTACValidator
:members:
:undoc-members:
:noindex:

.. automodule:: pystac.validation.stac_validator
:members:
:undoc-members:
:exclude-members: JsonSchemaSTACValidator
36 changes: 18 additions & 18 deletions docs/concepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ in the catalog will produce a relative link, based on the self link of the paren
object.

You can make all the links of a catalog relative or absolute by setting the
:func:`Catalog.catalog_type` field then resaving the entire catalog.
:func:`~pystac.Catalog.catalog_type` field then resaving the entire catalog.

.. _rel vs abs asset:

Expand Down Expand Up @@ -312,7 +312,7 @@ that you see all API calls.
If you require more custom logic for I/O operations or would like to use a
3rd-party library for I/O operations (e.g. ``requests``),
you can create a sub-class of :class:`pystac.StacIO`
(or :class:`pystac.DefaultStacIO`) and customize the methods as
(or :class:`pystac.stac_io.DefaultStacIO`) and customize the methods as
you see fit. You can then pass instances of this custom sub-class into the ``stac_io``
argument of most object-specific I/O methods. You can also use
:meth:`pystac.StacIO.set_default` in your client's ``__init__.py`` file to make this
Expand Down Expand Up @@ -573,7 +573,7 @@ PySTAC package) or older versions (which are hosted at https://schemas.stacspec.
This validation includes any extensions that the object extends (these are always
accessed remotely based on their URIs).

If there are validation errors, a :class:`~pystac.validation.STACValidationError`
If there are validation errors, a :class:`~pystac.STACValidationError`
is raised.

You can also call :meth:`~pystac.Catalog.validate_all` on a Catalog or Collection to
Expand All @@ -587,7 +587,7 @@ Validating STAC JSON
--------------------

You can validate STAC JSON represented as a ``dict`` using the
:meth:`pystac.validation.validate_dict` method:
:func:`pystac.validation.validate_dict` method:

.. code-block:: python
Expand All @@ -599,7 +599,7 @@ You can validate STAC JSON represented as a ``dict`` using the
validate_dict(js)
You can also recursively validate all of the catalogs, collections and items across STAC
versions using the :meth:`pystac.validation.validate_all` method:
versions using the :func:`pystac.validation.validate_all` method:

.. code-block:: python
Expand All @@ -615,15 +615,16 @@ Using your own validator

By default PySTAC uses the :class:`~pystac.validation.JsonSchemaSTACValidator`
implementation for validation. Users can define their own implementations of
:class:`~pystac.validation.STACValidator` and register it with pystac using
:meth:`pystac.validation.set_validator`.
:class:`~pystac.validation.stac_validator.STACValidator` and register it with pystac
using :func:`pystac.validation.set_validator`.

The :class:`~pystac.validation.JsonSchemaSTACValidator` takes a
:class:`~pystac.validation.SchemaUriMap`, which by default uses the
:class:`~pystac.validation.schema_uri_map.DefaultSchemaUriMap`. If desirable, users cn
create their own implementation of :class:`~pystac.validation.SchemaUriMap` and register
:class:`~pystac.validation.schema_uri_map.SchemaUriMap`, which by default uses the
:class:`~pystac.validation.schema_uri_map.DefaultSchemaUriMap`. If desirable, users can
create their own implementation of
:class:`~pystac.validation.schema_uri_map.SchemaUriMap` and register
a new instance of :class:`~pystac.validation.JsonSchemaSTACValidator` using that schema
map with :meth:`pystac.validation.set_validator`.
map with :func:`pystac.validation.set_validator`.

Extensions
==========
Expand Down Expand Up @@ -673,7 +674,8 @@ Extension <eo>`, you can access the fields associated with that extension using
the `Adding an Extension`_ section below for details on adding an extension to an
object.

If you don't want to raise an error you can use :meth:`~pystac.Item.ext.has`
If you don't want to raise an error you can use
:meth:`Item.ext.has <pystac.extensions.ext.ItemExt.has>`
to first check if the extension is implemented on your pystac object:

.. code-block:: python
Expand Down Expand Up @@ -726,11 +728,9 @@ Adding an Extension
-------------------

You can add an extension to a STAC object that does not already implement that extension
using the :meth:`~pystac.Item.ext.add` method. Any concrete
extension implementations that extend existing STAC objects should have
this method available. The :meth:`~pystac.Item.ext.add` method adds the correct schema
URI to the :attr:`~pystac.Item.stac_extensions` list for the object being
extended.
using the :meth:`Item.ext.add <pystac.extensions.ext.ItemExt.add>` method.
The :meth:`Item.ext.add <pystac.extensions.ext.ItemExt.add>` method adds the correct
schema URI to the :attr:`~pystac.Item.stac_extensions` list for the STAC object.

.. code-block:: python
Expand Down Expand Up @@ -927,7 +927,7 @@ in the catalog to have a unique identifier, which is unique across the entire ST
When a link is being resolved from a STACObject that has it's root set, that root is
passed into the :func:`Link.resolve_stac_object <pystac.Link.resolve_stac_object>` call.
That root's :class:`~pystac.resolved_object_cache.ResolvedObjectCache` will be used to
That root's :class:`~pystac.cache.ResolvedObjectCache` will be used to
ensure that if the link is pointing to an object that has already been resolved, then
that link will point to the same, single instance in the cache. This ensures working
with STAC objects in memory doesn't create a situation where multiple copies of the same
Expand Down
8 changes: 8 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,3 +248,11 @@
# -- Substutition variables

rst_epilog = f".. |stac_version| replace:: {STACVersion.DEFAULT_STAC_VERSION}"

nitpick_ignore = [
("py:class", "Datetime"),
("py:class", "L"),
("py:class", "pystac.summaries.T"),
("py:class", "HREF"), # this one partially works
("py:class", "jsonschema.validators.Draft7Validator"),
]
Loading

0 comments on commit bc5eae4

Please sign in to comment.