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
DOC: get docs to build on Windows #8502
Conversation
The code used to combine url parts using `os.path.join` which on Windows adds '\' instead of '/' leading to an invalid url.
Unlike `/tmp`, `tempfile.gettempdir()` should work on any OS
It depends on which shell one is using. The problem arises because conda-based graphviz installation only exposes `dot.bat` and git-bash, for example, does not know what to do with it.
Actually it looks like the fourth problem can be solved here: https://github.com/mne-tools/mne-python/blob/master/mne/viz/_brain/_scraper.py#L82 We probably do not need the leading And can you add a |
doc/install/contributing.rst
Outdated
WARNING: dot command 'dot' cannot be run (needed for graphviz output), check the graphviz_dot setting | ||
|
||
you might have to install `graphviz`_ manually. | ||
Make sure to agree to add graphviz to path during installation. |
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.
Or it looks like you could also do:
export PATH=~/Miniconda3/Library/bin/graphviz:$PATH
or the equivalent for your system/env. Not sure if this is better, though.
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, adding graphviz to path is a much saner solution than a separate install! I'll fix it.
I'll assume that graphviz has been installed into the conda environment and make use of the CONDA_PREFIX
variable.
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.
fixed by 2bc392e
Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
@kalenkovich did you try the fix above for brain-scraped examples? You should be able to check by making the change then running:
It should only run the mne_dspm_solutions example in tutorials/source-modeling, then you can check the RST output. It's best to be on the latest |
Not yet :( I think removing the forward slash will make unix-based systems to treat the path as relative. So, it will work on Windows but break on other systems. Adding |
Only if the original path is relative. Based on what you see on Windows it might already be absolute. And |
Okay I looked at the sphinx-gallery source code: https://github.com/sphinx-gallery/sphinx-gallery/blob/master/sphinx_gallery/scrapers.py#L372-L374 Will push a fix that fixes things on Windows for me |
bb5b58a
to
3a77997
Compare
@kalenkovich feel free to add an entry to |
I added a line to Docs now build without errors on my pc. I'll mark this PR as ready for review then. |
Co-authored-by: Daniel McCloy <dan@mccloy.info>
Travis is unrelated, thanks @kalenkovich ! |
thx @kalenkovich ! |
Reference issue
Fixes #8501
What does this implement/fix?
There are a few problems preventing docs from building on Windows. This PR is intended to fix them. As of now, it solves three out of four problems described in #8501.