Skip to content

Commit 15d4f84

Browse files
committed
Workaround docs build problem.
Include alternative index workaround.
1 parent c6fcf51 commit 15d4f84

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

lib/iris/experimental/ugrid.py

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,35 @@
2828

2929
from .._deprecation import warn_deprecated
3030
from ..ugrid.load import PARSE_UGRID_ON_LOAD, load_mesh, load_meshes
31-
from ..ugrid.mesh import Connectivity, Mesh, MeshCoord
31+
from ..ugrid.mesh import Connectivity as _Connectivity
32+
from ..ugrid.mesh import Mesh as _Mesh
33+
from ..ugrid.mesh import MeshCoord as _MeshCoord
3234
from ..ugrid.save import save_mesh
3335
from ..ugrid.utils import recombine_submeshes
3436

37+
38+
# NOTE: publishing the original Mesh, MeshCoord and Connectivity here causes a Sphinx
39+
# Sphinx warning, E.G.:
40+
# "WARNING: duplicate object description of iris.ugrid.mesh.Mesh, other instance
41+
# in generated/api/iris.experimental.ugrid, use :no-index: for one of them"
42+
# For some reason, this only happens for the classes, and not the functions.
43+
#
44+
# This is a fatal problem, i.e. breaks the build since we are building with -W.
45+
# We couldn't fix this with "autodoc_suppress_warnings", so the solution for now is to
46+
# wrap the classes. Which is really ugly.
47+
# TODO: remove this when we remove iris.experimental.ugrid
48+
class Mesh(_Mesh):
49+
pass
50+
51+
52+
class MeshCoord(_MeshCoord):
53+
pass
54+
55+
56+
class Connectivity(_Connectivity):
57+
pass
58+
59+
3560
__all__ = [
3661
"Connectivity",
3762
"Mesh",

0 commit comments

Comments
 (0)