Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve some sphinx build warnings #550

Merged
merged 2 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ help:
@echo " doctest to run all doctests embedded in the documentation (if enabled)"

clean:
rm $(AUTOSUMMARYDIR)/*
rm -f $(AUTOSUMMARYDIR)/*
rm -rf $(BUILDDIR)/*

html:
Expand Down
8 changes: 4 additions & 4 deletions docs/source/conf/80-scico_numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# Improve formatting of jax.numpy warning
f.__doc__ = re.sub(
r"^\*\*\* This function is not yet implemented by jax.numpy, and will "
"raise NotImplementedError \*\*\*",
r"raise NotImplementedError \*\*\*",
"**WARNING**: This function is not yet implemented by jax.numpy, "
" and will raise :exc:`NotImplementedError`.",
f.__doc__,
Expand All @@ -52,14 +52,14 @@
flags=re.M,
)
scico.numpy.testing.break_cycles.__doc__ = re.sub(
" __del__\) inside", "__del__\) inside", scico.numpy.testing.break_cycles.__doc__, flags=re.M
r" __del__\) inside", r"__del__\) inside", scico.numpy.testing.break_cycles.__doc__, flags=re.M
)
scico.numpy.testing.assert_raises_regex.__doc__ = re.sub(
"\*args,\n.*\*\*kwargs",
r"\*args,\n.*\*\*kwargs",
"*args, **kwargs",
scico.numpy.testing.assert_raises_regex.__doc__,
flags=re.M,
)
scico.numpy.BlockArray.global_shards.__doc__ = re.sub(
"`Shard`s", "`Shard`\ s", scico.numpy.BlockArray.global_shards.__doc__, flags=re.M
r"`Shard`s", r"`Shard`\ s", scico.numpy.BlockArray.global_shards.__doc__, flags=re.M
)
4 changes: 2 additions & 2 deletions docs/source/conf/81-scico_scipy.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
# Remove entire numpydoc references section
f.__doc__ = re.sub(r"References\n----------\n.*\n", "", f.__doc__, flags=re.DOTALL)
# Remove problematic citation
f.__doc__ = re.sub("See \[dlmf\]_ for details.", "", f.__doc__, re.M)
f.__doc__ = re.sub("\[dlmf\]_", "NIST DLMF", f.__doc__, re.M)
f.__doc__ = re.sub(r"See \[dlmf\]_ for details.", "", f.__doc__, re.M)
f.__doc__ = re.sub(r"\[dlmf\]_", "NIST DLMF", f.__doc__, re.M)

# Fix indentation problems
scico.scipy.special.sph_harm.__doc__ = re.sub(
Expand Down
6 changes: 3 additions & 3 deletions docs/source/conf/85-dtype_typehints.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ def typehints_formatter_function(annotation, config):
DType: ":obj:`~scico.typing.DType`",
# Compound types involving DType must be added here to avoid their DType
# component being expanded in the docs.
Optional[DType]: ":obj:`~typing.Optional`\ [\ :obj:`~scico.typing.DType`\ ]",
Optional[DType]: r":obj:`~typing.Optional`\ [\ :obj:`~scico.typing.DType`\ ]",
Union[DType, Sequence[DType]]: (
":obj:`~typing.Union`\ [\ :obj:`~scico.typing.DType`\ , "
":obj:`~typing.Sequence`\ [\ :obj:`~scico.typing.DType`\ ]]"
r":obj:`~typing.Union`\ [\ :obj:`~scico.typing.DType`\ , "
r":obj:`~typing.Sequence`\ [\ :obj:`~scico.typing.DType`\ ]]"
),
AxisIndex: ":obj:`~scico.typing.AxisIndex`",
ArrayIndex: ":obj:`~scico.typing.ArrayIndex`",
Expand Down
Loading