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

Include a link in PyNEST examples to run them as notebooks #2605

Merged
merged 14 commits into from
Mar 21, 2023

Conversation

jessica-mitchell
Copy link
Contributor

This PR adds a link (see nbgitpuller) to the PyNEST examples so they can run as a notebook - using the EBRAINS JupyterHub as service.

The link is added at build time so it is not in the source repository.
It is added to the reStructuredText files in auto_examples generated by sphinx_gallery.
The notebooks are located in nest/nest-simulator-examples/ repository.
This PR also includes a file that explains how to run the notebooks and some basic troubleshooting.
The Python download button generated by sphinx_gallery remains but the notebook button is removed.

This PR only deals with the sphinx-build of the link.
The notebooks are already available but the automated generation/maintenance of the notebooks will be dealt with in another PR.

See sample: https://nest-test.readthedocs.io/en/add-link-examples/auto_examples/one_neuron.html

@jessica-mitchell jessica-mitchell added T: Enhancement New functionality, model or documentation S: Normal Handle this with default priority I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) labels Feb 6, 2023
@terhorstd terhorstd requested a review from med-ayssar February 13, 2023 11:10
@heplesser heplesser requested a review from janskaar February 13, 2023 11:59
Copy link
Contributor

@janskaar janskaar left a comment

Choose a reason for hiding this comment

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

The documentation builds for me locally, and everything looks the same as in your example, and the links to the ebrains notebooks work. The user guide looks great.

I'm getting a few warnings when building the documentation that are not present when I build from the master branch:

/home/janeirik/nest_repository/2605/nest-simulator-build/doc/htmldoc/auto_examples/compartmental_model/receptors_and_current.rst:34: WARNING: Explicit markup ends without a blank line; unexpected unindent. /home/janeirik/nest_repository/2605/nest-simulator-build/doc/htmldoc/auto_examples/compartmental_model/two_comps.rst:34: WARNING: Explicit markup ends without a blank line; unexpected unindent. /home/janeirik/nest_repository/2605/nest-simulator-build/doc/htmldoc/auto_examples/pong/generate_gif.rst:34: WARNING: Explicit markup ends without a blank line; unexpected unindent. /home/janeirik/nest_repository/2605/nest-simulator-build/doc/htmldoc/auto_examples/pong/networks.rst:34: WARNING: Explicit markup ends without a blank line; unexpected unindent. /home/janeirik/nest_repository/2605/nest-simulator-build/doc/htmldoc/auto_examples/pong/pong.rst:34: WARNING: Explicit markup ends without a blank line; unexpected unindent. /home/janeirik/nest_repository/2605/nest-simulator-build/doc/htmldoc/auto_examples/pong/run_simulations.rst:34: WARNING: Explicit markup ends without a blank line; unexpected unindent. /home/janeirik/nest_repository/2605/nest-simulator-build/doc/htmldoc/auto_examples/sudoku/plot_progress.rst:34: WARNING: Explicit markup ends without a blank line; unexpected unindent. /home/janeirik/nest_repository/2605/nest-simulator-build/doc/htmldoc/auto_examples/sudoku/sudoku_net.rst:34: WARNING: Explicit markup ends without a blank line; unexpected unindent. /home/janeirik/nest_repository/2605/nest-simulator-build/doc/htmldoc/faqs

I'm also getting some warnings that are also present when building it from the master branch, mostly related to HillTononiModels.ipynb and hl_api_*.py.

doc/htmldoc/examples/running_notebooks.rst Outdated Show resolved Hide resolved
doc/htmldoc/examples/running_notebooks.rst Outdated Show resolved Hide resolved
doc/htmldoc/conf.py Show resolved Hide resolved
doc/htmldoc/conf.py Outdated Show resolved Hide resolved
doc/htmldoc/conf.py Outdated Show resolved Hide resolved
@jessica-mitchell
Copy link
Contributor Author

@janskaar Thanks for the review, I addressed your comments. As for the sphinx warnings you see at build time, we are aware of them and you can ignore them as they need to be dealt with in separate issues.

@jessica-mitchell
Copy link
Contributor Author

@med-ayssar @janskaar Can you please take another look? thanks!

Copy link
Contributor

@med-ayssar med-ayssar left a comment

Choose a reason for hiding this comment

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

Otherwise, the rest looks good

doc/htmldoc/conf.py Outdated Show resolved Hide resolved
doc/htmldoc/conf.py Outdated Show resolved Hide resolved
doc/htmldoc/conf.py Outdated Show resolved Hide resolved
doc/htmldoc/conf.py Outdated Show resolved Hide resolved
doc/htmldoc/conf.py Show resolved Hide resolved
@jessica-mitchell
Copy link
Contributor Author

@med-ayssar I made the changes you suggested

doc/htmldoc/conf.py Outdated Show resolved Hide resolved
@med-ayssar
Copy link
Contributor

Could you post the new link to see it works fine with these new changes?

@jessica-mitchell
Copy link
Contributor Author

@med-ayssar
Copy link
Contributor

@jessica-mitchell
Copy link
Contributor Author

@heplesser
Copy link
Contributor

@med-ayssar @janskaar Could you please resolve all conversations that you opened so that we can merge? Our general policy is that the person who started a conversation should mark it as resolved.

@janskaar janskaar closed this Mar 21, 2023
@med-ayssar
Copy link
Contributor

Done!

@heplesser heplesser reopened this Mar 21, 2023
@janskaar
Copy link
Contributor

janskaar commented Mar 21, 2023 via email

@med-ayssar
Copy link
Contributor

I can't find any resolve button for my conversations. Is there a special permission or something needed that I don't have?

On Tue, 21 Mar 2023, 09:25 Hans Ekkehard Plesser, @.> wrote: @med-ayssar https://github.com/med-ayssar @janskaar https://github.com/janskaar Could you please resolve all conversations that you opened so that we can merge? Our general policy is that the person who started a conversation should mark it as resolved. — Reply to this email directly, view it on GitHub <#2605 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHACQZN76KHMTZNYPS6AQOTW5FQXVANCNFSM6AAAAAAUSPZ5ZI . You are receiving this because you were mentioned.Message ID: @.>

Just go back to your comments, and you will see the resolve button.

Screenshot from 2023-03-21 12-52-55

@janskaar
Copy link
Contributor

janskaar commented Mar 21, 2023 via email

@med-ayssar
Copy link
Contributor

@janskaar I think you forgot to post the photo, but if you don't mind, I can resolve your threads instead.

@janskaar
Copy link
Contributor

janskaar commented Mar 21, 2023 via email

@heplesser heplesser merged commit 51fbe63 into nest:master Mar 21, 2023
@jessica-mitchell jessica-mitchell deleted the add-link-examples branch September 13, 2024 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: Normal Handle this with default priority T: Enhancement New functionality, model or documentation
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants