X Tutup
Skip to content

Update doc build.#8536

Merged
QuLogic merged 1 commit intomatplotlib:masterfrom
anntzer:update-doc-build
Apr 29, 2017
Merged

Update doc build.#8536
QuLogic merged 1 commit intomatplotlib:masterfrom
anntzer:update-doc-build

Conversation

@anntzer
Copy link
Copy Markdown
Contributor

@anntzer anntzer commented Apr 26, 2017

PR Summary

  • Add copied depsy_badge to gitignore.
  • In conf.py, move all dependency checks together.
  • In conf.py and doc-requirements.txt, added dependency on scipy (for
    animation/bayes_update.py, animation/double_pendulum_animated.py).
  • In conf.py, update copyright years.
  • Fix error when invoking make.py without a target.

@anntzer anntzer force-pushed the update-doc-build branch 2 times, most recently from 35a64ba to a4e82e9 Compare April 26, 2017 03:24
@QuLogic
Copy link
Copy Markdown
Member

QuLogic commented Apr 26, 2017

Some of this is covered in #8525, I think.

@QuLogic
Copy link
Copy Markdown
Member

QuLogic commented Apr 26, 2017

Oh, I see that they're skipped there; this might be a better choice. @choldgraf

@choldgraf
Copy link
Copy Markdown
Contributor

@QuLogic I agree! I didn't wanna complicate that PR any more than necessary so instead of adding the scipy dependency I skipped the examples and was gonna open an issue. Looks like you're one step in front of me :)

copyright = ('2002 - 2012 John Hunter, Darren Dale, Eric Firing, '
'Michael Droettboom and the Matplotlib development '
'team; 2012 - 2016 The Matplotlib development team')
'team; 2012 - 2017 The Matplotlib development team')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe overkill but we could always use

"...2012 - %s The Matplotlib development team" % day.year

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Somehow automatically generating copyright years feels wrong to me...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

hehe fair enough, just a thought :)

Copy link
Copy Markdown
Contributor

@choldgraf choldgraf Apr 26, 2017

Choose a reason for hiding this comment

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

I can imagine in 3 years someone would realize it's showing "2012 - NULL_VALUE" or something

except ImportError:
raise ImportError("No module named mock - you need to install "
"mock to build the documentation")
from mock import MagicMock
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should mock now be in the list of dependencies on L43?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

unittest.mock is part of the stdlib in py3.3+; we check for mock for py2.

doc/make.py Outdated
func()
else:
all()
raise SystemExit("Missing target.")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What does this mean/when is it thrown?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

"You ran ./make.py instead of ./make.py html or ./make.py pdf or ./make.py $whatevertarget" (cf https://grox.net/doc/unix/unix_shell_humor.html).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this should be clarified in this case...something like "You must supply a target after make.py"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

@dstansby dstansby added this to the 2.1 (next point release) milestone Apr 27, 2017
- Add copied depsy_badge to gitignore.
- In conf.py, move all dependency checks together.
- In conf.py and doc-requirements.txt, added dependency on scipy (for
animation/bayes_update.py, animation/double_pendulum_animated.py).
- In conf.py, update copyright years.
- Fix error when invoking make.py without a target.
@choldgraf
Copy link
Copy Markdown
Contributor

This reminds me - I had ran into issues getting the documentation to build and I opened an issue about it a while back:

#7412

I don't think that changing the documentation contribution guidelines is w/in the scope of this PR, but do you have any idea as to the two dependency problems I ran into? They were for:

  • type1cm (in general getting the latex libraries installed was a PITA)
  • graphviz

@anntzer
Copy link
Copy Markdown
Contributor Author

anntzer commented Apr 27, 2017

graphviz ("dot") is now documented as a dependency.
No idea what the latex dependencies are exactly and I don't plan to go down that rabbit hole right now (I think I have opened a similar issue a while ago).

@choldgraf
Copy link
Copy Markdown
Contributor

haha fair enough - I just checked the dev docs and you're right, that's in there now! ok cool disregard my comment then :)

@choldgraf
Copy link
Copy Markdown
Contributor

ah - though it looks like graphviz is not in the doc-requirements.txt file. Could you add it there?

@anntzer
Copy link
Copy Markdown
Contributor Author

anntzer commented Apr 27, 2017

it's a binary, not pip installable

@choldgraf
Copy link
Copy Markdown
Contributor

huh - I just installed graphviz on a fresh anaconda environment w/ pip...

@anntzer
Copy link
Copy Markdown
Contributor Author

anntzer commented Apr 27, 2017

It's a thin Python wrapper which is useless for our purposes.

@choldgraf
Copy link
Copy Markdown
Contributor

I'll update the dev docs to reflect this fact. This is the kind of stuff that a new user will end up wasting an hour trying to figure out so it needs to be documented.

Copy link
Copy Markdown
Member

@dstansby dstansby left a comment

Choose a reason for hiding this comment

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

👍 I've restarted the failing CI jobs, happy for this to be merged if they pass

@QuLogic QuLogic merged commit 6a49856 into matplotlib:master Apr 29, 2017
@anntzer anntzer deleted the update-doc-build branch April 29, 2017 04:50
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.

4 participants

X Tutup