Skip to content

Provide links to API docs in examples #2222

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

Closed
drevicko opened this issue Jul 17, 2013 · 11 comments
Closed

Provide links to API docs in examples #2222

drevicko opened this issue Jul 17, 2013 · 11 comments
Labels
Difficulty: Hard https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues Documentation New feature
Milestone

Comments

@drevicko
Copy link
Contributor

It would be very useful to provide links to matplotlib API docs for methods/objects/etc.. used in examples. This could be a part of MEP12.

An intuitive approach could be to automatically render links in displayed code. If that sort of thing is not already in Sphynx, I guess I'm suggesting a sphynx extension (and should go over there to suggest it ;)

Some (not so good) alternatives could be to associate links to API docs with certain tags or to include a few hand-coded links in each example page. Not so good as it would be incomplete (many methods/... used would not be linked) and would lead to inconsistencies (some examples much better linked than others).

@drevicko
Copy link
Contributor Author

Likewise, links from the API docs to examples containing/using the said method/object etc.. would be useful.

@pelson
Copy link
Member

pelson commented Aug 12, 2013

I'd love to see this. Sounds like some hard work, but it'd be well worth it IMHO.

@tacaswell tacaswell added this to the v1.5.x milestone Aug 17, 2014
@petehuang
Copy link
Contributor

This would still be useful, and a Sphinx extension would be nice, but wondering if it would ever get done. Could turn this into a larger doc project.

@tacaswell
Copy link
Member

@NelleV is this something sphinx-gallery can already do?

@dopplershift
Copy link
Contributor

Yes, though in brief attempts I've not made it work for my own stuff. See for example:
https://sphinx-gallery.readthedocs.io/en/latest/auto_examples/plot_exp.html#sphx-glr-auto-examples-plot-exp-py

@tacaswell tacaswell added new-contributor-friendly Difficulty: Hard https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues labels Dec 29, 2016
@tacaswell
Copy link
Member

Tagged as new-contributor friendly as this is self-contained from the rest of the library, but hard as it involves learning how to write / modify sphinx extensions

@NelleV
Copy link
Member

NelleV commented Dec 30, 2016

Yes, that feature is in sphinx-gallery

@NelleV
Copy link
Member

NelleV commented Dec 30, 2016

@tacaswell is the ticket to migrate to sphinx gallery or to reimplement the feature ? If it is to migrate to sphinx-gallery, we already have a ticket opened.

@petehuang
Copy link
Contributor

petehuang commented Dec 30, 2016

@NelleV Wow this is cool!

I believe this is to migrate

@choldgraf
Copy link
Contributor

This issue is now taken care of with the migration to sphinx-gallery. There are still some kinks to work out, but the general functionality is there and should be spot-checked with subsequent issues / PRs. I think we should close this

@WeatherGod
Copy link
Member

Agreed, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: Hard https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues Documentation New feature
Projects
None yet
Development

No branches or pull requests

8 participants