-
Notifications
You must be signed in to change notification settings - Fork 437
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
Fixes #720 : Auto generate ipython notebooks #1022
Conversation
1a5befa
to
f0d45b5
Compare
This is definitely going in the right direction. Would it be possible to do this as a separate instruction in the doc Makefile, rather than part of running the examples? https://github.com/nipy/dipy/blob/master/doc/Makefile I think it will be cleaner that way. |
9880737
to
f0d45b5
Compare
@arokem Sorry for the long intervals, is this what you suggested ? I added the code to make ipython notebooks to the dipy/tools/make_examples.py file and as such whenever the valid python examples are built, the notebooks will be built automatically. I still have some cleaning up to do but, is this a good way to put the notebook conversion code? Or should I have a separate make_notebooks.py file in tools, which is called in a similar fashion as make_examples.py |
@sahmed95 is this stalled for now? |
Need to find the right place to run the code during a build that auto-generates the Ipython notebooks. Also, need to find a way to implement and update gists as @arokem suggested.
Finally, maybe add the links to download the Ipython notebooks in the examples in tutorials. Will look into it |
Would be good to see what sphinx-gallery On Sun, May 22, 2016 at 9:08 AM, Shahnawaz Ahmed notifications@github.com
|
d5cb8ec
to
53b5bd5
Compare
This is languishing as I haven't really worked with Sphinx. I separated the code to generate Ipython notebooks from the standard examples. The function is documented now. read_example gets the text from a valid example in doc/examples/ and make_notebook converts it into a notebook which can be written using write_notebook |
I think it would make sense to integrate a call to this into the Makefile, in a similar manner to the way that things currently work for converting from |
Yes. Even I initially started towards that and had put the code inside the make_examples.py file. I can put a call there to make_notebooks.py which will build the examples. So where do we put the notebooks (as a separate folder in docs "example_notebooks") I couldn't follow your last suggestion about Sphinx and nbconvert @arokem. Since dipy doesn't use readthedocs. Do you suggest that we have our own readthedocs and publish examples such as : Similarly, http://nbconvert.readthedocs.io/en/latest/nbconvert_library.html#Extracting-Figures-using-the-RST-Exporter also looks great. I could setup a readthedocs for Dipy following : http://read-the-docs.readthedocs.io/en/latest/getting_started.html#in-rst I am in favour of nbconvert rather than sphinx-gallery since it also has interleaved text. |
No - I don't think we want to set up readthedocs for this. For two reasons: the first is that our documentation will have a hard time building on a free/automated platform like readthedocs, because our examples require large amounts of data and take a long time to run. The second is that @ghoshbishakh is already working on a new version of the website as a GSoC project over here: https://github.com/nipy/dipy_web, so it would be a duplicated effort. For now, all I am suggesting is to automate things so that when we run |
@arokem Thanks for clearing that out. I have the py ->> ipynb conversion script now and added it to the Makefile under "ipynbexamples" Running "make ipynbexamples" from the /doc folder generates all the valid_examples in the folder "ipython_notebooks". The notebooks aren't executed though and all that this script does is convert the .py files in the "examples" directory to Ipython notebooks. Now, do we convert the notebooks to rst and then add the rst filenames so that make html builds it just like the python examples? @Garyfallidis Any pointers on where this should go from here ?(Or maybe @ghoshbishakh can take over) Making a ipynb ->> rst conversion seems simple. [http://sphinx-ipynb.readthedocs.io/en/latest/howto.html] But I 'm not sure where they should be put and how to get them published. A nice way maybe to make an example gallery : http://sphinx-gallery.readthedocs.io/en/latest/auto_examples/just_code.html#sphx-glr-auto-examples-just-code-py |
Can this be closed now? |
Yes. Closing. |
Hello @sahmed95, Thank you for updating !
|
We should follow up on this one and finish this up! |
It would be cool to host the notebooks on a service like binder or Colaboratory so beginning users can start playing with things in their web browser. I don't think interactive VTK windows are going to happen, but maybe we could show renders. |
That would be cool, but we might also run into the limitations (compute,
disk) of these platforms. For the notebooks with VTK, we’ll need to make
sure that the notebook is run under xvfb. I think that’s doable.
…On Tue, Jun 19, 2018 at 5:17 PM David Reagan ***@***.***> wrote:
It would be cool to host the notebooks on a service like binder
<https://mybinder.org/> or Colaboratory
<https://colab.research.google.com/> so beginning users can start playing
with things in their web browser. I don't think interactive VTK windows are
going to happen, but maybe we could show renders.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#1022 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAHPNl1YANE5iG1y11IA0LoYCG9Y5F_Gks5t-RLsgaJpZM4H5SKx>
.
|
Good idea! :) |
This doesn't currently do anything (as in, the code doesn't run when |
This is superseded by #1778 |
Simple Hack to get ipython notebooks out of examples. Needs a little work with markup and equations but other wise should be fine.
@arokem Check sample here