Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add gallery of examples to documentation #4734

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
wants to merge 64 commits into from

Conversation

adrn
Copy link
Member

@adrn adrn commented Mar 24, 2016

Work in progress

This is the result of discussions at Python in Astronomy 2016 about the state of astropy-tutorials. We decided to implement a trial version of a sphinx-gallery of examples in the astropy documentation similar to the scikit-learn examples gallery.

Here's a live demo of the gallery in the astropy docs

Outstanding issues / tasks:

Some strange issues with sphinx-gallery:

TODO items to be handled after this PR:

  • When sphinx-gallery 0.1.3 or 0.2 is released, use the new thumbnail image selection feature to show the 2nd plot from the observing example.
  • Replace the default sphinx-gallery placeholder image (this requires adding the functionality to sphinx-gallery)
  • Some functions resolve automatically to API links, some don't...This is a known issue and needs to be fixed in sphinx-gallery (Some external functions / classes don't resolve into links sphinx-gallery/sphinx-gallery#113)

cc @kelle

@Cadair
Copy link
Member

Cadair commented Mar 24, 2016

Have you tested this on readthedocs? I am having memory consumption issues on their build service.

@adrn
Copy link
Member Author

adrn commented Mar 24, 2016

@Cadair I haven't, but we also haven't asked those nice people yet for more resources

@adrn
Copy link
Member Author

adrn commented Apr 5, 2016

BTW: to anyone following, my thesis is due next week so I haven't worked on this since getting back from PyAstro16. It's not far from being complete -- there are a few remaining issues for me to solve / submit PR's to sphinx-gallery itself but those shouldn't take too much time.

@astrofrog
Copy link
Member

Dr @adrn (congrats! 🎉 ) - do you think it would be possible to finish this up by the end of this week so that we can include it in the 1.2 docs? (feature freeze is this Friday)

@astrofrog astrofrog added this to the v1.2.0 milestone May 10, 2016
@adrn
Copy link
Member Author

adrn commented May 10, 2016

Thanks @astrofrog!

Yea, totally -- I'm back at my desk today.

@adrn adrn force-pushed the sphinx-gallery branch from a60b84d to 21e2171 Compare May 10, 2016 19:18
@adrn
Copy link
Member Author

adrn commented May 10, 2016

OK, I think this is almost ready for final review. I ran out of time to write a model fitting example but maybe @pllim or @nden would be willing to help with that once this PR is merged?

@pllim
Copy link
Member

pllim commented May 10, 2016

My feeling from PyAstro16 is that people don't like Astropy fitters and want to use Sherpa fitters (or something like that). I thought someone wrote an example like that using MCMC during PyAstro16, no? I cannot seem to find it in the Google doc but I remember hearing about it. That would be a good example to include here.

@adrn
Copy link
Member Author

adrn commented May 10, 2016

Hm, I thought @Cadair's PR to astropy-helpers to check for "build succeeded" got merged? cc @eteq

@bsipocz
Copy link
Member

bsipocz commented May 10, 2016

@adrn - But there wasn't any new helpers release yet.

@adrn
Copy link
Member Author

adrn commented May 10, 2016

Oh right - sorry I thought I remembered seeing a 1.1.3 release. oops!

@adrn
Copy link
Member Author

adrn commented May 10, 2016

In that case, I think this is ready for review. cc @astrofrog @kelle

@astrofrog
Copy link
Member

@adrn - could you rebase this and add a changelog entry?

@@ -58,6 +58,7 @@ User Documentation
overview
install
getting_started
auto_examples/index
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to put it here, it should only add one entry to the TOC called 'Tutorials' or 'Gallery of Tutorials'. At the moment it adds two obscure astropy.coordinates and astropy.io entries.

@taldcroft
Copy link
Member

@adrn - just had a look at this. Awesome work! I really hope this will open the floodgates for user-contributed examples now. It makes it really easy to add examples and makes the results highly visible in a nice format.

@adrn adrn force-pushed the sphinx-gallery branch from 21e2171 to 4d9b018 Compare May 13, 2016 15:49
@adrn
Copy link
Member Author

adrn commented May 13, 2016

@astrofrog RE: changelog, should I add to "Other changes and additions" or make a new category for documentation changes?

@taldcroft Thanks! Yea, I'm really hoping this makes examples more visible and easier for people to contribute.

@astrofrog astrofrog changed the title [WIP] Add gallery of examples to documentation Add gallery of examples to documentation May 13, 2016
@astrofrog
Copy link
Member

@adrn - 'other changes' is fine, I can see if there is enough to make a new section when I tidy up the changelog

@eteq
Copy link
Member

eteq commented May 13, 2016

@adrn - can you try just adding a commit to this PR to update the helpers submodule to the latest helpers? I think that will fix the build_succeeded issue (astropy/astropy-helpers#223) without forcing us to do a helpers release now just for that.

@eteq
Copy link
Member

eteq commented May 13, 2016

(To check this I just started a quick run on my travis: https://travis-ci.org/eteq/astropy/builds/130121818)

@eteq
Copy link
Member

eteq commented May 13, 2016

Note that it all worked on my branch where I just added one more "update the helpers to master" commit: https://travis-ci.org/eteq/astropy/builds/130121818 .

@adrn, if you can get to this now (and the changelog entry) I'm happy with merging once those are in and not waiting for this to run.

eteq added a commit that referenced this pull request May 14, 2016
Add gallery of examples to documentation
@eteq
Copy link
Member

eteq commented May 14, 2016

Alright, this is now merged in 660b91f ! (github doesn't recognize it as "merged" because I had to rebase on master... but I'm closing this because it's in, I promise.) Nice work @adrn and @kelle!

@eteq eteq closed this May 14, 2016
@astrofrog
Copy link
Member

Thanks @adrn and @kelle!

@adrn
Copy link
Member Author

adrn commented May 14, 2016

Thanks @eteq for finishing up the final steps (I was busy last night) and thanks @astrofrog for reviewing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants