Skip to content

DOC: fix references in docs #13104

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

Merged
merged 2 commits into from
Mar 13, 2019
Merged

DOC: fix references in docs #13104

merged 2 commits into from
Mar 13, 2019

Conversation

mattip
Copy link
Member

@mattip mattip commented Mar 10, 2019

Turning on -n in sphinx-build results in over 1000 warnings about bad references in docs. Trying to break these down with various grep statements, it seems about 200 are from numpy.ma, about 150 from polynomial and about 150 from c:type. That is under half of the WARNINGS.

My workflow is to run

(cd ..; pip install .); make clean; make html 2>&1 |tee /tmp/build.txt
less /tmp/build.txt

and look for the most common lines. Unfortunately this takes quite a while.

Anyone who wishes to contribute can issue PRs against the doc-references branch in numpy/mattip. I have marked this as Easy since many of the WARNINGS are quite easy to fix. The first commit gives an idea of some of the problems in the c-api documentation.

Reviewers can get an idea of how bad things are by looking at the circle-ci devdoc build step.

@ayushi1998
Copy link

Hey can I work on this?

@mattip
Copy link
Member Author

mattip commented Mar 12, 2019

Anyone is welcome to work on this. You should read up on building the documentation and then

  • modify the code by adding -n as in the changes in this PR
  • open a separate PR to fix some of the warnings about bad references. Choose a class of warnings (ma, polynomial, c-api.*.rst) and post a note here which class you are working on, to prevent duplicate work.
  • read my top comment here for a suggested path to working through the warnings.

@mattip mattip marked this pull request as ready for review March 13, 2019 20:49
@rgommers
Copy link
Member

This pull request is still a work in progress.

can you get rid of that somehow @mattip?

@mattip
Copy link
Member Author

mattip commented Mar 13, 2019

We should merge this as-is, it improves the current situation. I opened #13114 with the content of the first comment for more work.

@rgommers rgommers merged commit 8ba1ca5 into numpy:master Mar 13, 2019
@rgommers
Copy link
Member

Merged, thanks @mattip

@rgommers
Copy link
Member

for the record, TravisCI did complete, it just failed to report its status back to this PR

@tylerjereddy
Copy link
Contributor

it just failed to report its status back to this PR

I've observed that in a few places when using the official Draft Status mode for PRs.

@mattip mattip deleted the doc-references branch May 20, 2019 13:43
@tinaoberoi
Copy link
Contributor

Turning on -n in sphinx-build results in over 1000 warnings about bad references in docs. Trying to break these down with various grep statements, it seems about 200 are from numpy.ma, about 150 from polynomial and about 150 from c:type. That is under half of the WARNINGS.

My workflow is to run

(cd ..; pip install .); make clean; make html 2>&1 |tee /tmp/build.txt
less /tmp/build.txt

I followed the steps written, but I got error in conf.py

Configuration error:
There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "/home/user/cop/opensource/numpy_new/env/lib/python3.7/site-packages/sphinx/config.py", line 319, in eval_config_file
    execfile_(filename, namespace)
  File "/home/user/cop/opensource/numpy_new/env/lib/python3.7/site-packages/sphinx/util/pycompat.py", line 81, in execfile_
    exec(code, _globals)
  File "/home/user/cop/opensource/numpy_new/numpy/doc/sphinxext/doc/conf.py", line 132, in <module>
    raise RuntimeError("Get the scipy-sphinx-theme first, "
RuntimeError: Get the scipy-sphinx-theme first, via git submodule init && git submodule update
 

I guess I know what the error is about. On line 132 in conf.py
Replacing

if not os.path.isdir(themedir):
     raise RuntimeError("Get the scipy-sphinx-theme first, "
                        "via git submodule init && git submodule update")

with this helps.

try:
    os.path.isdir(themedir)
except:
     raise RuntimeError("Get the scipy-sphinx-theme first, "
                        "via git submodule init && git submodule update")

@rossbar
Copy link
Contributor

rossbar commented May 8, 2020

The error here is supposed to guide you how to solve the problem: try running git submodule update --init

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

clean work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants