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
Explain how to add new examples to the gallery #137
Conversation
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.
Awesome!
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.
@melissawm super great, thank you! 😊
Do you think we should also point out that napari.run()
needs to be under a __main__
guard or things won't work? That won't be obvious to most users.
docs/developers/contributing.md
Outdated
comma. | ||
|
||
Note that the examples are the `.py` source files, and any outputs and images | ||
will be autogenerated when the documentation site is built. |
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.
Do we also want to add a note that napari.run()
has to be under the __main__
guard?
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.
Oh, yes. That's a good point I think. For people who use mostly notebooks and interactive environments the __main__
and napari.run()
could be a bit of a mystery?
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.
Good point! I will explain that.
Let me know if this is enough explanation - here's the relevant section: https://output.circle-artifacts.com/output/job/4f7e2cae-c069-4177-8bd7-506fe3230502/artifacts/0/docs/_build/developers/contributing.html#adding-examples-to-the-gallery |
Just to be clear: when contributing an example, for the example to be in our gallery though, the main is required, right? Also, I think ipython behaves same as jupiter, so copy paste the code just works, without the main |
@psobolewskiPhD you are of course right - let me know if this rephrasing reads better? |
@melissawm I made some small suggestions, based on my understanding. |
Co-authored-by: Peter Sobolewski <76622105+psobolewskiPhD@users.noreply.github.com>
# Description Adds some explanation on how to add new examples to the gallery. ## Type of change <!-- Please delete options that are not relevant. --> - [x] Fixes or improves existing content # References Closes napari#92 ## Final checklist: - [x] My PR is the minimum possible work for the desired functionality --------- Co-authored-by: Peter Sobolewski <76622105+psobolewskiPhD@users.noreply.github.com>
Description
Adds some explanation on how to add new examples to the gallery.
Type of change
References
Closes #92
Final checklist: