Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
timhoffm merged 2 commits intomatplotlib:masterfromanntzer:confpy
Feb 6, 2018

Conversation

anntzer
Copy link
Contributor

@anntzeranntzer commentedNov 6, 2017
edited
Loading

Split out extensions to their own files.

Emit the latex symbol tables without breaks.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@anntzeranntzerforce-pushed theconfpy branch 4 times, most recently from08d3351 tocf0106dCompareNovember 6, 2017 23:27
@@ -1,173 +0,0 @@
"""
Copy link
Member

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.

Copy link
Member

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? 🐑

Copy link
Member

Choose a reason for hiding this comment

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

The importable stuff is inlib/matplotlib/sphinxext.

@tacaswell
Copy link
Member

👍 conditional ongen_rst not being importable by anyone else.

@tacaswelltacaswell added this to thev2.2 milestoneNov 7, 2017
@anntzer
Copy link
ContributorAuthor

I can't see how it would be. For example it is not included in a (default) wheel.
(Note that the conf.py explicitly has

# If your extensions are in another directory, add it here. If the directory# is relative to the documentation root, use os.path.abspath to make it# absolute, like shown here.sys.path.append(os.path.abspath('.'))

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',
Copy link
Member

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 inhttp://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

Copy link
Member

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?

Copy link
Member

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

Copy link
Member

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?

Copy link
Contributor

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 :)

Copy link
Contributor

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)

Copy link
ContributorAuthor

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 betypes (so that we can subclass them) orcallables 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).

Copy link
Member

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 has1.1.3 sphinx (https://packages.debian.org/search?keywords=python-sphinx) =\

Copy link
Contributor

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

Copy link
Member

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

@anntzer
Copy link
ContributorAuthor

I think the mocking would be better resolved in a separate PR that strips out all thebackend_foo individual doc pages (which are incomplete anyways) in favor of a single, hand-written doc for all the backends that lists the common public API of all backends.

@anntzer
Copy link
ContributorAuthor

Also got rid of the mpl_examples symlink, which is now unneeded.

@QuLogic
Copy link
Member

A tangentially related request; can you move thesphinx_gallery import to aftercheck_deps so sphinx doesn't fail with an import error instead of our proper error message?

@anntzer
Copy link
ContributorAuthor

done

@jklymak
Copy link
Member

This needs a rebase and tests to pass....

@anntzeranntzerforce-pushed theconfpy branch 2 times, most recently fromae39a7a to9597c9aCompareJanuary 20, 2018 09:31
@anntzer
Copy link
ContributorAuthor

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
Copy link
Member

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?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

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.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

done

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
Copy link
Member

Choose a reason for hiding this comment

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

as

anntzer reacted with thumbs up emoji
referencewhen the documentation is built.
Note that the python script that generates the plot is referred to, rather than
any plot that is created; sphinx-gallerywill provide thecorrect reference
when the documentation is built.
Copy link
Member

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 ;

anntzer reacted with thumbs up emoji
@QuLogic
Copy link
Member

Needs a rebase now, too.

@anntzeranntzerforce-pushed theconfpy branch 2 times, most recently from55ce5fd to8f4fd73CompareFebruary 6, 2018 08:16
@anntzer
Copy link
ContributorAuthor

done

@timhoffmtimhoffm merged commitb7d87d9 intomatplotlib:masterFeb 6, 2018
@anntzeranntzer deleted the confpy branchFebruary 6, 2018 18:26
@QuLogicQuLogic modified the milestones:needs sorting,v2.2.0Feb 12, 2018
@tacaswelltacaswell mentioned this pull requestApr 30, 2018
6 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@tacaswelltacaswelltacaswell approved these changes

@QuLogicQuLogicQuLogic left review comments

@sandrotosisandrotosisandrotosi left review comments

@jenshnielsenjenshnielsenjenshnielsen left review comments

@KojoleyKojoleyKojoley left review comments

@timhoffmtimhoffmtimhoffm left review comments

Assignees
No one assigned
Projects
None yet
Milestone
v2.2.0
Development

Successfully merging this pull request may close these issues.

8 participants
@anntzer@tacaswell@QuLogic@jklymak@sandrotosi@jenshnielsen@Kojoley@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp