Add `required` option to `git filter`
Closed this issue · 2 comments
Thanks for writing such a convenient tool!
I personally would like it if we could have an option to add required = True
to the git filter option.
Optionally, I want to decide whether I want to get the output with:
[filter "nb-clean"]
clean = nb-clean clean --preserve-cell-metadata
required = True
Instead of
[filter "nb-clean"]
clean = nb-clean clean --preserve-cell-metadata
required = False # Could also use the empty line like before
The main use-case for me is that I use VSCode for quick edits (also to edit jupyter-notebooks) and when I use the vscode git-cli and have nb-clean installed in a conda/mamba environment then vscode will not use the correct environment and the cleaning is silently skipped (as vscode doesn't find the binary)
I know that there are many possible options to fix it (not use conda/mamba, install nb-clean via pipx, etc.) but since it should be a minor change, maybe it could add some more convenience for similar use-cases?
I am also happy to add a tiny PR :)
Thanks!
That use case sounds valuable, so I'd be happy to add this. Do you want to make a PR to add a --required
flag to the add-filter
subcommand? Let me know if you want any guidance!
This issue was closed due to inactivity. Please reopen if still relevant.