Skip to content
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

configure / mention sphinx reference prefix #90

Closed
amueller opened this issue Jan 14, 2016 · 6 comments
Closed

configure / mention sphinx reference prefix #90

amueller opened this issue Jan 14, 2016 · 6 comments

Comments

@amueller
Copy link
Contributor

It seems like the version currently on pypi prepends _sphx_glr_auto_examples_ to the example filename (though I'm not sure) when generating the sphinx/rst ref.
This doesn't seem to be documented (or I couldn't find it). I also couldn't find a way to change that.
I just upgraded my sphinx_gallery, and I'm wondering if I now need to change all the references.

@Titan-C
Copy link
Member

Titan-C commented Jan 14, 2016

Yes the prefix of examples and images was set to this long ago while introducing the notebook styled examples in PR #36 to properly give a namespace to the gallery examples and images and to support multiple galleries at the same time. There was a large wait period since that change an the release containing it v0.0.11 in mid-november I certainly forgot to specify this also as API breaking, same as PR #66 that renames the module to sphinx_gallery.

reference to examples are prefixed with sphx_glr then the full path to the example with os.sep replaced by underscore is appended. Yes you need to change your references. I do think we shall not be changing this any more, we discussed for quite a long time when planing the adoption of the gallery by NiLearn.

I'm not sure if we should expose this as something to be configurable by the user

@amueller
Copy link
Contributor Author

ok, fair enough. It would be good to mention this somewhere in the docs though.
I needed to generate docs and grep to find out how I can link to the examples.

@amueller
Copy link
Contributor Author

if we use sphinx gallery for scikit-learn, as we should, this will break all external links to examples -- unless we add a script creating symbolic links from the old version...
@GaelVaroquaux any opinions about that?

@Titan-C
Copy link
Member

Titan-C commented Jan 14, 2016

Yes this namespace change of the images and references is indeed what delayed the adoption of sphinx-gallery in scikit-learn scikit-learn/scikit-learn#4658 (comment), and to be honest for that PR I already did the rename. But that rename is not valid as it only was for images @lesteve was wise to put the merge on delay. As in the end the naming was changed again.

@GaelVaroquaux
Copy link
Contributor

GaelVaroquaux commented Jan 14, 2016 via email

@amueller
Copy link
Contributor Author

yeah I'm fine with it.

Titan-C added a commit to Titan-C/sphinx-gallery that referenced this issue Jan 14, 2016
Sphinx Gallery introduces a namespace for all its generated files,
images, thumbnail and even in the internal cross references to the
example scripts. This new namespace conflicts with the historical way
things where named with in the gallery.

A more extensive comment will be rephrased in the documentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants