-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
ENH doc is now built with the new sphinx build #6663
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
Unlike before, the -W option is not set. This option makes the build fail with sphinx 1.4.1 with the following error:
|
👍 but this will need an update to travis.yml to not call make.py and an option to build the documents with warnings as errors on Travis so we can ensure that warnings don't creep back into the documentation. |
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." | ||
|
||
|
||
prepare: mpl_examples mpl_toolkits/axes_grid1/examples \ |
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.
Could we not just add these symlinks in git?
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.
symlinks + git + windows do not always play nice
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.
Actually, this is what I did. It is much more robust than relying on python code or makefiles to them.
I don't remember ever having a problem with symlinks and windows: is that a recent issue?
Another problem if we do not rely on symlinks is that we'll have to change the make.bat, which is the window's makefile. I am not familiar with those.
And admittedly old link to the symlink issue is https://stackoverflow.com/questions/5917249/git-symlinks-in-windows @JanSchulz @jbmohler Can either of you confirm that the docs can still be built in windows? |
Should I remove the symlinks and reintegrate automatically symlinking/copying those in the makefile? |
I agree symlinks are better, lets wait to hear back from a windows user before reverting anything. |
First problem (because I have sphinx in my root env and matplotlib in a special build env -> shinx doesn't see the env matplotlib... :-/): c:\data\external\pydata\matplotlib\doc (pr/6663)
[matplotlib_build] λ make.bat html
Running Sphinx v1.3.1
Configuration error:
The configuration file (or one of the modules it imports) called sys.exit() -> Could you change the After installing sphinx and all the stuff in my env: c:\data\external\pydata\matplotlib\doc (pr/6663)
[matplotlib_build] λ make.bat html
Running Sphinx v1.3.1
here
Initializing GitHub plugin
loading pickled environment... not yet created
[autosummary] generating autosummary for: api\afm_api.rst, api\animation_api.rst, api\api_changes.rst, api\artist_api.rst, api\axes_api.rst, api\axis_api.rst, api\backend_bases_api.rst, api\backend_gtkagg_api.rst, api\backend_managers_api.rst, api\backend_pdf_api.rst, ..., users\recipes.rst, users\screenshots.rst, users\shell.rst, users\style_sheets.rst, users\text_intro.rst, users\text_props.rst, users\tight_layout_guide.rst, users\transforms_tutorial.rst, users\usetex.rst, users\whats_new.rst
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 161 source files that are out of date
updating environment: 162 added, 0 changed, 0 removed
reading sources... [ 3%] api/axes_api
Exception occurred:
File "C:\portabel\miniconda\envs\matplotlib_build\lib\site-packages\matplotlib-2.0.0b1+1728.g068cd16.dirty-py3.5-win-amd64.egg\matplotlib\sphinxext\plot_directive.py", line 699, in run
with io.open(source_file_name, 'r', encoding='utf-8') as fd:
FileNotFoundError: [Errno 2] No such file or directory: 'c:\\data\\external\\pydata\\matplotlib\\doc\\mpl_examples/pylab_examples/xcorr_demo.py'
The full traceback has been saved in C:\Users\jschulz\AppData\Local\Temp\sphinx-err-kbnsomyu.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks! Is that the expected error or should I dig deeper? |
|
||
Since there is no canonical Windows package manager, the methods for building | ||
freetype, zlib, and libpng from source code are documented as a build script | ||
at `matplotlib-winbuild <https://github.com/jbmohler/matplotlib-winbuild>`_. |
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 is also a build_alllocal.cmd
which has some comments on adding a conda env and then builds it in such an env.
Hi @JanSchulz |
-> It exists, but it is a textfile? [Update] This seems to be a git problem on windows: http://stackoverflow.com/questions/5917249/git-symlinks-in-windows Symlink support for windows seems to be disabled per default: http://stackoverflow.com/a/11664406/1380673 |
Having read a bit about it, I think for windows users, the best would be to not check in the |
@JanSchulz sounds good. I'll do that. |
Instead of relying on make.py which is the antiquated way of building sphinx documentation, the build now relies on sphinx-build through a makefile (or make.bat for windows). closes #5798
- typing make html-small-images now generates low resolution images in the documentation. - makefile now creates symlinks and others
The encoding of files (both when reading and writing) was not specified. This caused the documentation build to fail on systems not configured to use utf8 by default. Now, the sphinx-extension gen_gallery specifies the encoding when reading and writing to files and the documention builds properly on all systems.
@@ -0,0 +1,333 @@ | |||
.. The source of this document is INSTALL. During the doc build process, |
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.
probably should not commit this file.
I am having trouble with the symlink on windows (more exactly, I am having problems with the make.bat file). The reason we need to copy/symlink examples to the matplotlib folder is to be able to link to the documentation example. We could decide to switch to sphinx-gallery to build the gallery, which would allow this feature out of the box. It would also allow to have text displayed in addition to the code when displaying a gallery example, and have a title displayed in the gallery instead of the filename, and generate an ipython notebook in addition to the python file. If I am not mistaken, this is the sort of things sphinx-gallery can do: http://scikit-image.org/docs/dev/auto_examples/color_exposure/plot_ihc_color_separation.html#sphx-glr-auto-examples-color-exposure-plot-ihc-color-separation-py Else I'll resign myself to booting under windows to test this, though I am unsure whether I'll even be able to install matplotlib there (or code). |
Is there a way to do it without a symlink? I think we tried that on another PR and it just wouldn't work for Windows. Long term, switching to sphinx-gallery is probably a good idea; if you wanted to start that, it might be best to do that before this PR. |
On windows, without sphinx-gallery, the folder that is symlinked on linux should be copied at every build. |
I am going to close for now, as this is going to take a while to get all the examples sphinx-gallery compatible. |
Instead of relying on make.py which is the antiquated way of building sphinx
documentation, the build now relies on sphinx-build through a makefile (or
make.bat for windows).
closes #5798