From ea7844b6c38f5fe54efe29a2c405c95955e693e7 Mon Sep 17 00:00:00 2001 From: Kalyan Dutia Date: Tue, 13 Feb 2024 16:07:30 +0000 Subject: [PATCH 1/5] change pyproject email to dsci; python constraint to ~3.10 --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5276e0e..002c676 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,12 +2,12 @@ name = "experiment-template" version = "0.1.0" description = "" -authors = ["CPR tech "] +authors = ["CPR Data Science "] readme = "README.md" packages = [{include = "experiment_template"}] [tool.poetry.dependencies] -python = "^3.9" +python = "~3.10" pre-commit = "^3.0.4" @@ -52,4 +52,4 @@ line-length = 88 # Ignore `E402` (import violations) in all `__init__.py` files, and in `path/to/file.py`. [tool.ruff.per-file-ignores] "__init__.py" = ["F401"] -"tests/*" = ["E501"] \ No newline at end of file +"tests/*" = ["E501"] From a89ab37237a99b67f5485f4556000a139d708770 Mon Sep 17 00:00:00 2001 From: Kalyan Dutia Date: Tue, 13 Feb 2024 16:21:09 +0000 Subject: [PATCH 2/5] new poetry.lock file --- poetry.lock | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index ac883a3..6120920 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.7.0 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. [[package]] name = "cfgv" @@ -124,6 +124,7 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, @@ -196,5 +197,5 @@ test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess [metadata] lock-version = "2.0" -python-versions = "^3.9" -content-hash = "4ed2ac71a577cf2f23213c6744e3c7d302f6a275478df3fd74c1e5ad35610cd9" +python-versions = "~3.10" +content-hash = "e18b39644b41a59d02759338e79b423f23ec6359c10c4e0d30a7af1f4466a8aa" From b96fca86f37700e4f9c37bf5fbeb4370ea30eba2 Mon Sep 17 00:00:00 2001 From: Kalyan Dutia Date: Tue, 13 Feb 2024 16:30:52 +0000 Subject: [PATCH 3/5] poetry lock hook doesn't try to update dependencies --- .pre-commit-config.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0de8e39..cdc350c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,3 +22,8 @@ repos: files: ^src/ types: [python] additional_dependencies: ['pyright@1.1.294'] + - repo: https://github.com/python-poetry/poetry + rev: '1.7.0' + hooks: + - id: poetry-lock + args: ["--no-update"] \ No newline at end of file From 8c8b40f448cc29f297597444d674d036ce288fac Mon Sep 17 00:00:00 2001 From: Kalyan Dutia Date: Tue, 13 Feb 2024 16:33:33 +0000 Subject: [PATCH 4/5] CI only runs on python 3.11 --- .github/workflows/build_template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_template.yml b/.github/workflows/build_template.yml index cbd7713..f1909d4 100644 --- a/.github/workflows/build_template.yml +++ b/.github/workflows/build_template.yml @@ -15,7 +15,7 @@ jobs: matrix: # TODO: Fix R pre-commit hook issues with Windows os: [ ubuntu-latest, macos-latest ] - python: [3.9, '3.10'] + python: ['3.10'] steps: - name: Checkout the revision From 4344d311e76a9a62f5eca6b3ffe9f5be244b94f7 Mon Sep 17 00:00:00 2001 From: Kalyan Dutia Date: Tue, 13 Feb 2024 16:34:43 +0000 Subject: [PATCH 5/5] also add --no-update flag to poetry lock in parametrised repo --- {{ cookiecutter.repo_name }}/.pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/{{ cookiecutter.repo_name }}/.pre-commit-config.yaml b/{{ cookiecutter.repo_name }}/.pre-commit-config.yaml index 92ccbcc..d44b97c 100644 --- a/{{ cookiecutter.repo_name }}/.pre-commit-config.yaml +++ b/{{ cookiecutter.repo_name }}/.pre-commit-config.yaml @@ -24,3 +24,4 @@ repos: rev: '1.7.0' hooks: - id: poetry-lock + args: ["--no-update"] \ No newline at end of file