-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Cleanup doc/conf.py & local sphinx extensions #9708
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
Conversation
08d3351
to
cf0106d
Compare
doc/sphinxext/gen_rst.py
Outdated
@@ -1,173 +0,0 @@ | |||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am concerned that someone is depending on this. There is not much harm in carrying this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On second thought, was this even importable outside of our docs build? 🐑
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The importable stuff is in lib/matplotlib/sphinxext
.
👍 conditional on |
I can't see how it would be. For example it is not included in a (default) wheel.
which is what made it importable in the docs build.) |
doc/conf.py
Outdated
'matplotlib.sphinxext.plot_directive', | ||
'sphinxext.github', | ||
'sphinxext.math_symbol_table', | ||
'sphinxext.mock_gui_toolkits', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we drop support for sphinx older than 1.3 we can probably replace this with the build in autodoc_mock_imports in http://www.sphinx-doc.org/en/stable/ext/autodoc.html#confval-autodoc_mock_imports If we drop versions below 1.6 we can make it simpler by only mocking the top level modules. As I recall it I added the mocking here predates Sphinx 1.3 which is why its done manually
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the argument for not requiring 1.6?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only one I can think of is building with Sphinx from apt-get/yum but I am not sure we need to support that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think debian does build our docs as part of the build process. @sandrotosi How much pain would it cause you to bump to sphinx 1.6?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be no problem at all, actually it would be really helpful as in Debian we're migrating to sphinx 1.6 and the current doc cannot be built with that version, so thanks for pushing to use 1.6 :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope, what i really should do is updating matplotlib in debian (which i'll do as soon as i find time for it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that's going to work because we need some mocked objects to be types (so that we can subclass them) or callables with specific return values (sip.getapi
), rather than just "existing" (in other words, because we are running code at the toplevel rather than just defining a bunch of functions).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debian 7 “Wheezy” is still supported (https://wiki.debian.org/LTS) and it has 1.1.3
sphinx (https://packages.debian.org/search?keywords=python-sphinx) =\
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH i wouldnt worry about wheezy (nor jessie) - if anyone will want to get an updated mpl on that release, they'll have to take care of backporting a tons of other deps (numpy in primis) before caring about sphinx and missing documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, but even stretch does not have 1.6
I think the mocking would be better resolved in a separate PR that strips out all the |
Also got rid of the mpl_examples symlink, which is now unneeded. |
A tangentially related request; can you move the |
done |
This needs a rebase and tests to pass.... |
ae39a7a
to
9597c9a
Compare
done (well, OSX is backlogged...) |
doc/conf.py
Outdated
# Use IPython's console highlighting by default | ||
extensions.extend(['IPython.sphinxext.ipython_console_highlighting', | ||
'IPython.sphinxext.ipython_directive']) | ||
from sphinx_gallery.sorting import ExplicitOrder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why move the import from the head of the file here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. IMO this could use a short comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
doc/devel/documenting_mpl.rst
Outdated
This is rendered as :doc:`/tutorials/introductory/customizing` (see the | ||
bottom of the page. Note that this is in a tutorial; See | ||
:ref:`writing-examples-and-tutorials` below) | ||
This is rendered as at the bottom of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as
doc/devel/documenting_mpl.rst
Outdated
reference when the documentation is built. | ||
Note that the python script that generates the plot is referred to, rather than | ||
any plot that is created; sphinx-gallery will provide the correct reference | ||
when the documentation is built. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would leave the . instead of the ;
Needs a rebase now, too. |
55ce5fd
to
8f4fd73
Compare
done |
Emit the latex symbol tables without breaks.
Split out extensions to their own files.
Emit the latex symbol tables without breaks.
PR Summary
PR Checklist