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

DOC, BUG: Fix error in heading remapping for custom scipy.optimize:function domain directive #15443

Merged
merged 3 commits into from Mar 25, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/azure-travis-template.yaml
Expand Up @@ -82,7 +82,7 @@ steps:
- script: pip install pytest-cov coverage codecov
displayName: 'Install coverage dependencies'
- ${{ if eq(parameters.refguide_check, true) }}:
- script: pip install matplotlib sphinx==3.1 numpydoc==1.1 "Jinja2<=3.0.3"
- script: pip install matplotlib sphinx==3.1 numpydoc "Jinja2<=3.0.3"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ark it would have been good to test if we could then remove the pin on Jinja2. This is why I pinged you on the other issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad, I missed this somehow "/. FWIW I tried this locally without the Jinja pin and everything worked.

displayName: 'Install documentation dependencies'
- script: sudo apt-get install -y wamerican-small
displayName: 'Install word list (for csgraph tutorial)'
Expand Down
1 change: 1 addition & 0 deletions doc/source/conf.py
Expand Up @@ -155,6 +155,7 @@
r"OpenSSL\.rand is deprecated", # OpenSSL package in linkcheck
r"Using or importing the ABCs from", # 3.5 importlib._bootstrap
r"'contextfunction' is renamed to 'pass_context'", # Jinja
r"distutils Version", # distutils
):
warnings.filterwarnings( # deal with other modules having bad imports
'ignore', message=".*" + key, category=DeprecationWarning)
Expand Down
6 changes: 4 additions & 2 deletions doc/source/scipyoptdoc.py
Expand Up @@ -135,10 +135,12 @@ def remove_arg(arg):
# Change "Options" to "Other Parameters", run numpydoc, reset
new_lines = []
for line in lines:
# Remap Options to the "Other Parameters" numpydoc section
# along with correct heading length
if line.strip() == 'Options':
line = "Other Parameters"
elif line.strip() == "-"*len('Options'):
line = "-"*len("Other Parameters")
new_lines.extend([line, "-"*len(line)])
continue
new_lines.append(line)
# use impl_name instead of name here to avoid duplicate refs
mangle_docstrings(env.app, 'function', impl_name,
Expand Down
2 changes: 1 addition & 1 deletion doc_requirements.txt
Expand Up @@ -3,5 +3,5 @@
Sphinx!=3.1.0, !=4.1.0
pydata-sphinx-theme>=0.6.1
sphinx-panels>=0.5.2
numpydoc==1.1
numpydoc
matplotlib>2
2 changes: 1 addition & 1 deletion pyproject.toml
Expand Up @@ -100,7 +100,7 @@ doc = [
"pydata-sphinx-theme>=0.6.1",
"sphinx-panels>=0.5.2",
"matplotlib>2",
"numpydoc==1.1.0",
"numpydoc",
]
dev = [
"mypy",
Expand Down