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

Pairing in subfolders? #1122

Open
Siniara opened this issue Aug 28, 2023 · 2 comments
Open

Pairing in subfolders? #1122

Siniara opened this issue Aug 28, 2023 · 2 comments

Comments

@Siniara
Copy link

Siniara commented Aug 28, 2023

I have a scripts folder and I'd like all the paired notebooks to be in a notebooks folder, I have a jupytext.toml file in my project root. Just copy pasting the code from the readme has no effect.

jupytext=1.15.0

My dev environment is VS Code if that might affect something. I use the jupyter extension there. The config file seems to be read as if I change the script format from percent to light it registers that change, but not the folder structure.

Folder structure:

project
    -/scripts
    -jupytext.toml 

jupytext.toml contents:

[formats]
"notebooks/" = "ipynb"
"scripts/" = "py:percent"

then run

jupytext --set-formats py,ipynb scripts/*.py

This creates paired notebooks in the scripts folder. I would have expected the notebooks folder to be created. I also tried creating it on my own to no effect.

@hectormz
Copy link
Contributor

hectormz commented Oct 19, 2023

Hi @Siniara I use a similar jupytext.toml and it works fine. I'm not sure if the issue is due to using Jupyter in VS Code. I use normal Jupyter Lab that runs in my browser. I have never had to run your jupytext command.

I believe I have always made the subfolders myself. I'm not sure jupytext will create the subfolders in your config file.

@mwouts
Copy link
Owner

mwouts commented Mar 26, 2024

Hey @Siniara , sorry I missed this one. Maybe you meant to use jupytext --sync rather than --set-formats (which sets a configuration per notebook)?

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

3 participants