-
Notifications
You must be signed in to change notification settings - Fork 393
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
Configure notebook pairing using regex/fnmatch/glob patterns #974
Comments
This is something I need too. To be able to specify the config in |
@abhishekmittal15 , that PR was on the repository I work on, mentioning that we can't add jupytext as a pre-commit until this issue is resolved. |
Hi @Jacob-Stevens-Haas , sorry for not answering this before. The following did work in my test:
The first "examples" is the root folder where you require paired files to be, and the second "example" is the required name prefix. I do agree that we should give more details about this the documentation, I'll keep a note of that on my todo list. Regarding your second question, local configuration files do work (and if you don't need to filter the root folder then the syntax is just |
Thanks @mwouts, works better, but is there a way to exclude files like I also get warnings for extraneous files that are not paired:
I tried silencing these with
no longer appears. Also, I tried to run |
FWIW, I think the |
Hello @Jacob-Stevens-Haas , thank you for your previous remarks
No, there is no way to do so. The filtering is only on the folder / prefix or suffix (and I don't have the bandwidth to change that)
The warning on unpaired files was also noticed at #986. Maybe we could remove that warning and simply issue a warning if
Yes, as you probably found out, it's jupytext/.pre-commit-hooks.yaml Line 5 in 12964ef
Do you mean the warning does not appear at the command line? If so yes sure a |
I have a library with examples in the
examples
folder. Each example is its own subfolder, containing:In pyproject.toml, I tried setting:
However, jupytext would not find & correct my file either with
pre-commit run --all
orjupytext --pre-commit --sync
Failing the above, I also can't seem to set pairings individually in pyproject.toml or in .pre-commit-config.yaml. For the latter, I tried:
But I got the error:
How do I achieve this?
The text was updated successfully, but these errors were encountered: