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

The Jupytext pre-commit hook fails to install when node is not available #1210

Closed
mwouts opened this issue Feb 3, 2024 · 2 comments · Fixed by #1233 · May be fixed by #1214
Closed

The Jupytext pre-commit hook fails to install when node is not available #1210

mwouts opened this issue Feb 3, 2024 · 2 comments · Fixed by #1233 · May be fixed by #1214
Milestone

Comments

@mwouts
Copy link
Owner

mwouts commented Feb 3, 2024

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.

@mwouts
Copy link
Owner Author

mwouts commented Feb 15, 2024

I can reproduce the issue with tests/external/pre_commit/test_pre_commit_1_sync.py when node is not installed.

@mwouts
Copy link
Owner Author

mwouts commented Feb 15, 2024

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. pre-commit/pre-commit#2367, but it is not yet obvious to me how we can set a variable for the hook installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant