-
Notifications
You must be signed in to change notification settings - Fork 34
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
Automatizing the conversion of jupyter examples to rst #105
Conversation
when an example is updated in jupyter notebook files, the script can be used to automatically convert the jupyter files in notebooks folder to rst files saved to source/examples for the documentaiton changes: 1. docs/notebooks_convert.py: the script to read the jupyter files, convert them to rst and save them into example folder 2. docs-requirements.py: updating the requirements with nbformat and nbconvert needed for the conversion
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.
Nice work @mohammadamint, I like it
I only suggested to use os.path.join
instead of building the path with /
as os.path.join
is cross platforms, but this is a minor correction you might ignore if you want :)
In the "Files changed" tab you can add all the suggestion to a batch and commit them as one commit if you want
replacing f"{}/{}" with ps.path.join Co-authored-by: Pierre Francois <[email protected]>
Done! |
The tests are failing because maybe you don't have the same |
I would merge it, are you waiting for @FLomb's approval @mohammadamint ? |
We can go ahead! I am traveling, that is why I was a little bit silent! |
No we dont need this. The script wont automatically run. Every time we update something in Jupyter files, we need to run the script to replicate all the changes into rst files. When merging, we need to just be careful that all the new changes on jupyter files will be implemented on top of this. |
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.
Ok, I've tested this locally, and it worked without issues. I'm merging this already
Fix #104
Closes #104
To address the concern raised in the tedious work of converting the Jupyter Notebook files into .rst for documentation.
The new script will automatically convert the files into the right directory, however, the inclusion of the examples in the doc should be always controlled in docs/source/examples.rst by specifying the path of the example in the toctree