-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
fix doc build on windows #12950
base: main
Are you sure you want to change the base?
fix doc build on windows #12950
Conversation
Pretty sure it's sphinx-gallery. SG probably shouldn't create any |
@drammock thank you for looking into it. I tested your branch and I now get a new error:
|
This new error comes after all the galleries are generated. More specifically, it comes after |
Looks to me like a likely bug in |
I think that it's not that simple: it's a crossref to an SG-created gallery example not a cross-ref to an API element. So for generic |
Not sure if this matters too much. I think any
in an example I suspect it would probably cause the same issue. And what you have so far works around the issue by moving the colon out of the backticks, which is what I think SG uses to decide what to call the So it seems like the more general fix is to stop SG from creating |
ah, yeah, you're right. the |
A couple of contributors have reported doc build failures on Windows:
The direct problem (IIUC) seems to be that the file name
mne-gui-addons:sphx_glr_auto_examples_evoked_ers_source_power.py.examples.new
contains a colon, which is not allowed by the Windows filesystem.This PR should hopefully make it possible again to build our docs on windows. Since I don't have a windows machine I'm hoping either @contsili or @CarinaFo can test this branch (or anyone else with access to a MNE dev environment on a windows machine).
The fix (🤞🏻) is to explicitly mark the intersphinx cross-reference as an external crossref so that Sphinx (or Sphinx-Gallery? not sure) won't generate that file with the colon in its filename in the first place. TBH I haven't dug into why this works, I just tried it on a hunch and it seems to have the desired effect: it does prevent that file-that-contains-a-colon from getting generated, no alternatively-named file exists in its place, and yet in the locally-built docs the crossref is correctly resolved to https://mne.tools/mne-gui-addons/auto_examples/evoked_ers_source_power.html#sphx-glr-auto-examples-evoked-ers-source-power-py
cc @lucyleeow, do you know whether it's Sphinx or Sphinx-gallery that generates that file, and if it's Sphinx Gallery, do you think it's worth adding a note to the sphinx-gallery docs about avoiding using crossref syntax that contains a colon?