jupytext
jupytext copied to clipboard
The Jupytext pre-commit hook fails to install when node is not available
The Jupytext pre-commit hook documented here fails to install when selecting v1.16.0 or above.
This is because node is required to build the JupyterLab extension for Jupytext.
We need to figure out how to not build the extension (e.g. set HATCH_BUILD_HOOKS_ENABLE=false) when jupytext is installed by pre-commit.
The current workaround is to use Jupytext in version v1.15.2 in the pre-commit hooks.
I can reproduce the issue with tests/external/pre_commit/test_pre_commit_1_sync.py when node is not installed.
What I think we could do is set HATCH_BUILD_HOOKS_ENABLE=false for when the jupytext pre-commit hook is installed. There are many similar questions on the pre-commit project, see e.g. https://github.com/pre-commit/pre-commit/issues/2367, but it is not yet obvious to me how we can set a variable for the hook installation.