-
Notifications
You must be signed in to change notification settings - Fork 39
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
feat: use jupytext for demonstrator notebooks #92
Conversation
Nice. :) You have the pre-commit hook, but if you also wanted to have files be autopaired you could also add the following to a [tool.jupytext]
# Always pair ipynb notebooks to py:percent files
formats = ["ipynb", "py:percent"]
notebook_metadata_filter = "all,-jupytext.text_representation.jupytext_version" That may or may not be of interest though. |
Thanks! Yes I did want to do this as well, although I think that @oshadura wanted to avoid creating paired files for the notebooks in the |
Yeah, you can't do exclude patterns (AFAIK) so you either would need to specify the directories that you do want paired notebooks to be generated for in the config (c.f. mwouts/jupytext#1033) or have a |
@matthewfeickert when does this auto-pairing happen? I am trying to understand the following scenarios:
|
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.
Looks good to me, thank you! I re-synced the ttbar notebook with the current HEAD version to avoid changing anything else in this PR.
Sorry @alexander-held missed these. The auto-pairing happens at creation time if you're using a
Hm that's a good question about the pre-commit hook. I assume yes, but I'd have to try it myself (I hadn't used the pre-commit hook yet). I'm assuming that @ekauffma knows given they added the pre-commit hook. I can try this out on another project though tonight at report back.
I would assume that here the |
Paired markdown and py:percent files are added for the ATLAS analysis notebook (via Jupytext). A pre-commit config file is also included. In order to run using the pre-commit hook (which ensures all files are synced via Jupytext when committing), the developer must make sure the pre-commit hook is installed by running "pre-commit install" while in the repository. Instructions for this are also included in Markdown in the file itself.