Open yasirroni opened 2 years ago
Hello @yasirroni , thanks for reaching out.
I have a few comments/questions on the above
jupytext --sync notebooks/*.ipynb
- it should not revert the .py
file!jupytext --sync notebooks/*
when non-paired files are present? I would expect the command to do nothing on non-paired filesjupytext.toml
file with formats = "ipynb,py:percent"
? (It would make the first command unnecessary)Thank you @yasirroni for your prompt reply.
For 2, does the --quiet option remove the warning? If not, would you like to use --quiet or would you prefer another option like --ignore-unpaired-files?
Re 3 yes the value in the confit file override "formats" for notebooks that don't have a value, so you won't need the --set-formats command any more
For me, --ignore or --except following with list of file is preferred to abstract wildcard (since Jupytext support wildcard).
An ignore parameters will also help config file, for example someone what to pair all .py files except init.py
Hi @yasirroni , I tried to implement a new ignore
argument, but I am not sure if globs are a good fit here, as they seem strongly linked to the underlying file system. Do you see how to answer the "TODO list" on the PR #988 ? If not, do you think using regular expressions for ignore
, rather than globs, would be a good option?
I'm using this commands for my workflow:
It works well. Sadly, there is another file in
notebooks/
that is not .ipynb and .py, like folders or whatever extensions.The
jupytext --set-formats ipynb,py:percent notebooks/*.ipynb
is great for initiate the sync, whilejupytext --sync notebooks/*
is great for syncing.Changing the
jupytext --sync notebooks/*
tojupytext --sync notebooks/*.ipynb
make the sync only work one way (if the.py
files updated, jupytext revert the update).A solution is to support exclude list: