Skip to content

Commit

Permalink
Workaround docs build problem.
Browse files Browse the repository at this point in the history
Include alternative index workaround.
  • Loading branch information
pp-mo committed Jul 22, 2024
1 parent fa06ae3 commit 19fbc9f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,12 @@ def _dotv(version):
autopackage_name = ["iris"]
autoclass_content = "both"
modindex_common_prefix = ["iris"]
# Note: the iris.ugrid mesh classes currently have multiple API references, due to
# "cross-linked" references in the legacy "iris.experimental.ugrid" API.
# This causes an index warning, which breaks the build due to building with -W.
# So turn that warning off.
# TODO: remove this when we remove iris.experimental.ugrid
autodoc_suppress_warnings = ["index"]

# -- apidoc extension ---------------------------------------------------------
# See https://github.com/sphinx-contrib/apidoc
Expand Down
10 changes: 10 additions & 0 deletions lib/iris/experimental/ugrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@
from ..ugrid.save import save_mesh
from ..ugrid.utils import recombine_submeshes

# NOTE: the duplicate API references for Mesh, MeshCoord and Connectivity here cause
# Sphinx to issue a warning about duplicate index entries.
# (e.g. "WARNING: duplicate object description of iris.ugrid.mesh.Mesh, other instance
# in generated/api/iris.experimental.ugrid, use :no-index: for one of them"
# )
# For some reason, this only happens for the classes, and not the functions.
# Currently ignored, by setting autodoc_suppress_warnings = ["index"] in conf.py
# TODO: remove that when this module is removed.


__all__ = [
"Connectivity",
"Mesh",
Expand Down

0 comments on commit 19fbc9f

Please sign in to comment.