-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
RTD: fix savefig dir creation #1155
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
clean: | ||
rm -rf $(BUILDDIR)/* | ||
rm -rf generated/* |
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 this is still useful for clearing pages generated by sphinx for API docs.
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.
Yes, will put it back again
|
||
# Monkey patch inspect.findsource to work around a Python bug that manifests on | ||
# RTD. Copied from IPython.core.ultratb. | ||
# Reference: https://github.com/ipython/ipython/issues/1456 |
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.
see this page for the reference -- it's quite likely that this is no longer an issue now that we've updated ipython for our RTD builds.
('index', 'xarray', u'xarray Documentation', | ||
u'xarray Developers', 'xarray', 'One line description of project.', | ||
('index', 'xarray', 'xarray Documentation', | ||
'xarray Developers', 'xarray', 'N-D labeled arrays and datasets in Python.', |
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.
Last time I tried (quite a while ago), the tex build did not work.
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.
Yes, it does not appear as download option on RTD either. It's not very useful anyway...
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.
That's because I disabled that build on RTD :)
OK, so this fix worked locally but not on RTD because RTD uses another build directory:
This is really annoying. I'll try to dig into another possible fix mentioned here: ipython/ipython#8733 (comment) |
I've had a hard time finding out what was going on with missing RTD plots since we updated the packages until I came across this: ipython/ipython#8733
The proposed fix creates the
@savefig
directory if not there. It works locally but I'm not sure if it will work on RTD (they might use a custom build directory).The other changes are minor tweaks to remove some build warnings and/or making use of the latest sphinx Makefile. I also removed a part of the conf.py which I think is not needed anymore.
@shoyer do you remember what the
inspect.findsource
monkeypatch was good for?