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

Notebook file not updated by generate #79

Open
stephane-caron opened this issue Nov 9, 2023 · 0 comments
Open

Notebook file not updated by generate #79

stephane-caron opened this issue Nov 9, 2023 · 0 comments

Comments

@stephane-caron
Copy link

My understanding of what gepetuto does may be wrong. I'm expecting the source notebook files will be re-generated when e.g. a snippet script changes.

Reproduction steps

  • Create a notebook
  • Add a cell with %load my_snippet
  • Run gepetuto -vvca all
    • The notebook file is updated, the %load line becomes #%load and the content is added properly.
  • Modify my_snippet
  • Run gepetuto -vvca all

Expected outcome

The notebook file is updated.

Current outcome

The notebook file stays as it is, the cell starting with #%load has not been updated.

Additional info

$ gepetuto -vvca all
Python 3.11.6
DEBUG:gepetuto:parsed arguments: Namespace(verbose=2, action='all', file=[], filter=[], tp_id=[1], python='python3', check=True, directory='', version=False)
DEBUG:gepetuto:no action specified, running all 3.
INFO:gepetuto.lint:linting tutorial sources.
DEBUG:gepetuto.lint:Checking tp1/tutorial.py
All done! ✨ 🍰 ✨
1 file would be left unchanged.
INFO:gepetuto.lint:lint done.
INFO:gepetuto.test:testing tutorial sources.
DEBUG:gepetuto.test:Checking tp1/tutorial.py
gepetuto=<module 'gepetuto' from '/home/scaron/.micromamba/envs/robotics-rl-tutorial/lib/python3.11/site-packages/gepetuto/__init__.py'>
INFO:gepetuto.generate:processing '/tmp/gepetuto-m85wg28z/1-test.ipynb' with scripts in 'tp1'
INFO:gepetuto.generate: processing 'tp1/tutorial.py'
[NbConvertApp] Converting notebook /tmp/gepetuto-m85wg28z/1-test.ipynb to script
[NbConvertApp] Writing 227 bytes to /tmp/gepetuto-m85wg28z/1-test.py
DEBUG:gepetuto.test:Checking temporary file /tmp/gepetuto-m85wg28z/1-test.py
didn't found function get_ipython()
NB: as for all the tutorials, a magic command %do_not_load is introduced to hide
    the solutions to some questions. Change it for %load if you want to see (and
    execute) the solution.
updated gepetuto=<module 'gepetuto' from '/home/scaron/.micromamba/envs/robotics-rl-tutorial/lib/python3.11/site-packages/gepetuto/__init__.py'>
INFO:gepetuto.test:test passed.
INFO:gepetuto.generate:generating snippets from tutorial sources.
DEBUG:gepetuto.generate:Looking for tp 1
INFO:gepetuto.generate:processing '1-test.ipynb' with scripts in 'tp1'
INFO:gepetuto.generate: processing 'tp1/tutorial.py'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant