From a470d283795311b3489b98e1f3f34ab5a45b7da1 Mon Sep 17 00:00:00 2001 From: Ivan Ogasawara Date: Fri, 3 May 2024 10:54:43 -0400 Subject: [PATCH] fix: Add nodejs-wheel as a dependency (#276) --- poetry.lock | 16 +++++++++++++++- pyproject.toml | 2 ++ src/scicookie/hooks/post_gen_project.py | 21 ++++++++++----------- 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/poetry.lock b/poetry.lock index 57051476..446c6353 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1740,6 +1740,20 @@ files = [ [package.dependencies] setuptools = "*" +[[package]] +name = "nodejs-wheel" +version = "20.12.2" +description = "unoffical Node.js package" +optional = false +python-versions = ">=3.7" +files = [ + {file = "nodejs_wheel-20.12.2-py2.py3-none-macosx_10_9_x86_64.whl", hash = "sha256:5c9f7bd4f2149d2d17c9d19e8878c69ac97e0da71d1e4ed7250b15adf31fca70"}, + {file = "nodejs_wheel-20.12.2-py2.py3-none-macosx_11_0_arm64.whl", hash = "sha256:5b93fe06341d1130dbf6ab9b458cb5983d6a9cf8e8ebc14e496b78aa9ae36c4e"}, + {file = "nodejs_wheel-20.12.2-py2.py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9099b220d99b35bb139e1155b0a9552600ade0e7a91cc5c68d70234e579bd5ce"}, + {file = "nodejs_wheel-20.12.2-py2.py3-none-win_amd64.whl", hash = "sha256:fc1e7591cb856e5d06b4f2be4b331b83809da82942cd7701c65092ac26a137c1"}, + {file = "nodejs_wheel-20.12.2.tar.gz", hash = "sha256:4219b35f95c265faa08606b22df885ab7b68cc6c0bfa9c90058698f8099acc46"}, +] + [[package]] name = "packaging" version = "24.0" @@ -3113,4 +3127,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = ">=3.8.1,<4" -content-hash = "55203a528d163329b93cfd4eccbc0084cab4b5ab46847da55c76a49325f04859" +content-hash = "681b815a09502d43b60e7af56e0236af61273e14277d7fd34bc1d526f2af66a2" diff --git a/pyproject.toml b/pyproject.toml index a2c3c552..7b4b29cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,6 +22,8 @@ sh = ">=2.0.4" colorama = ">=0.4.6" inquirer = ">=3.1.3" pyyaml = ">=6.0.1" +nodejs-wheel = ">=20.12" + [tool.poetry.group.dev.dependencies] pytest = ">=7" diff --git a/src/scicookie/hooks/post_gen_project.py b/src/scicookie/hooks/post_gen_project.py index 1e3e8743..568015e3 100644 --- a/src/scicookie/hooks/post_gen_project.py +++ b/src/scicookie/hooks/post_gen_project.py @@ -284,21 +284,20 @@ def clean_up_linter(): if not USE_PRE_COMMIT: remove_project_file(".pre-commit-config.yaml") + # Auto format files with prettier + subprocess.call([ + "npx", + "--yes", + "prettier", + "--write", + "--ignore-unknown", + PROJECT_DIRECTORY + ]) + if not USE_PRETTIER: remove_project_file(".prettierrc.yaml") remove_project_file(".prettierignore") - # keep this one at the end - if USE_PRETTIER: - subprocess.call([ - "npx", - "--yes", - "prettier", - "--write", - "--ignore-unknown", - PROJECT_DIRECTORY - ]) - def prepare_git() -> None: git_https_origin = http2ssh("{{cookiecutter.git_https_origin}}")