From dde47febf602b827ffee894332d1e65ea87a77dc Mon Sep 17 00:00:00 2001 From: Eli Fine Date: Wed, 12 Mar 2025 21:03:00 +0000 Subject: [PATCH 1/7] copier update --- .copier-answers.yml | 3 +- .devcontainer/install-ci-tooling.sh | 6 ++-- .github/actions/install_deps_uv/action.yml | 2 +- .../install_deps_uv/install-ci-tooling.ps1 | 6 ++-- .pre-commit-config.yaml | 4 +-- README.md | 13 ++++++-- extensions/context.py | 13 ++++---- pyproject.toml | 4 +-- .../actions/install_deps_uv/action.yml | 2 +- .../install_deps_uv/install-ci-tooling.ps1 | 6 ++-- template/.pre-commit-config.yaml | 4 +-- template/README.md.jinja | 4 +-- uv.lock | 32 ++++++++++++------- 13 files changed, 60 insertions(+), 39 deletions(-) diff --git a/.copier-answers.yml b/.copier-answers.yml index 3f4c44e4..e5d860d6 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,5 +1,5 @@ # Changes here will be overwritten by Copier -_commit: v0.0.5-57-g045b3f3 +_commit: v0.0.6-2-g4ee2089 _src_path: gh:LabAutomationAndScreening/copier-base-template.git description: Copier template for creating Python libraries and executables python_ci_versions: @@ -7,6 +7,7 @@ python_ci_versions: - 3.13.1 python_version: 3.12.7 repo_name: copier-python-package-template +repo_org_name: LabAutomationAndScreening ssh_port_number: 55874 template_uses_pulumi: false template_uses_python: true diff --git a/.devcontainer/install-ci-tooling.sh b/.devcontainer/install-ci-tooling.sh index 7c9a8019..f0c4f679 100644 --- a/.devcontainer/install-ci-tooling.sh +++ b/.devcontainer/install-ci-tooling.sh @@ -2,7 +2,7 @@ # can pass in the full major.minor.patch version of python as an optional argument set -ex -curl -LsSf https://astral.sh/uv/0.5.28/install.sh | sh +curl -LsSf https://astral.sh/uv/0.6.6/install.sh | sh uv --version # TODO: add uv autocompletion to the shell https://docs.astral.sh/uv/getting-started/installation/#shell-autocompletion @@ -15,8 +15,8 @@ input="${1:-$default_version}" export UV_PYTHON="$input" export UV_PYTHON_PREFERENCE=only-system -uv tool install 'copier==9.4.1' --with 'copier-templates-extensions==0.3.0' +uv tool install 'copier==9.5.0' --with 'copier-templates-extensions==0.3.0' -uv tool install 'pre-commit==4.0.1' +uv tool install 'pre-commit==4.1.0' uv tool list diff --git a/.github/actions/install_deps_uv/action.yml b/.github/actions/install_deps_uv/action.yml index f9ceff8b..55de308c 100644 --- a/.github/actions/install_deps_uv/action.yml +++ b/.github/actions/install_deps_uv/action.yml @@ -27,7 +27,7 @@ runs: shell: bash - name: Setup python - uses: actions/setup-python@v5.3.0 + uses: actions/setup-python@v5.4.0 with: python-version: ${{ env.PYTHON_VERSION }} diff --git a/.github/actions/install_deps_uv/install-ci-tooling.ps1 b/.github/actions/install_deps_uv/install-ci-tooling.ps1 index a8643825..75d6938d 100644 --- a/.github/actions/install_deps_uv/install-ci-tooling.ps1 +++ b/.github/actions/install_deps_uv/install-ci-tooling.ps1 @@ -3,7 +3,7 @@ Set-StrictMode -Version Latest $ErrorActionPreference = "Stop" -irm https://astral.sh/uv/0.5.28/install.ps1 | iex +irm https://astral.sh/uv/0.6.6/install.ps1 | iex # Add uv to path (in github runner) $env:Path = "C:\Users\runneradmin\.local\bin;$env:Path" @@ -24,8 +24,8 @@ if ($args.Count -eq 0) { $env:UV_PYTHON = "$input" $env:UV_PYTHON_PREFERENCE="only-system" -& uv tool install 'copier==9.4.1' --with 'copier-templates-extensions==0.3.0' +& uv tool install 'copier==9.5.0' --with 'copier-templates-extensions==0.3.0' -& uv tool install 'pre-commit==4.0.1' +& uv tool install 'pre-commit==4.1.0' & uv tool list diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1d96875c..95bcf388 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -43,7 +43,7 @@ repos: # Reformatting (should generally come before any file format or other checks, because reformatting can change things) - repo: https://github.com/crate-ci/typos - rev: e59f226fadcb05a1440bd8b35ee994a9d21bf03b # frozen: typos-dict-v0.12.4 + rev: 9a11895dc3c5e1f4123ec841d08182d704593f6d # frozen: v1.30.0 hooks: - id: typos - repo: https://github.com/pre-commit/pre-commit-hooks @@ -162,7 +162,7 @@ repos: description: Runs hadolint to lint Dockerfiles - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 871f3bcae4fe473cd7109c3a068db975dc035e3b # frozen: v0.9.4 + rev: 2c8dce6094fa2b4b668e74f694ca63ceffd38614 # frozen: v0.9.9 hooks: - id: ruff name: ruff-src diff --git a/README.md b/README.md index 55eb2194..7ca72f2e 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,20 @@ [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit) +[![Copier](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/copier-org/copier/master/img/badge/badge-black.json)](https://github.com/copier-org/copier) +[![Actions status](https://www.github.com/LabAutomationAndScreening/copier-python-package-template/actions/workflows/ci.yaml/badge.svg?branch=main)](https://www.github.com/LabAutomationAndScreening/copier-python-package-template/actions) +[![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://www.github.com/LabAutomationAndScreening/copier-python-package-template) +# Usage +To create a new repository using this template: +1. Install `copier` and `copier-templates-extensions`. An easy way to do that is to copy the `.devcontainer/install-ci-tooling.sh` script in this repository into your new repo and then run it. +2. Run copier to instantiate the template: `copier copy --trust gh:LabAutomationAndScreening/copier-python-package-template.git` +3. Run `uv lock` to generate the lock file +4. Commit the changes +5. Rebuild your new devcontainer - - +# Development ## Updating from the template diff --git a/extensions/context.py b/extensions/context.py index 319ea604..3d05d64a 100644 --- a/extensions/context.py +++ b/extensions/context.py @@ -10,26 +10,27 @@ class ContextUpdater(ContextHook): @override def hook(self, context: dict[Any, Any]) -> dict[Any, Any]: - context["uv_version"] = "0.5.28" - context["pre_commit_version"] = "4.0.1" - context["pyright_version"] = "1.1.394" + context["uv_version"] = "0.6.6" + context["pre_commit_version"] = "4.1.0" + context["pyright_version"] = "1.1.396" context["pytest_version"] = "8.3.4" context["pytest_randomly_version"] = "3.16.0" context["pytest_cov_version"] = "6.0.0" - context["copier_version"] = "9.4.1" + context["copier_version"] = "9.5.0" context["copier_templates_extension_version"] = "0.3.0" context["sphinx_version"] = "8.1.3" - context["pulumi_version"] = "3.149.0" + context["pulumi_version"] = "3.155.0" context["pulumi_aws_version"] = "6.67.0" context["pulumi_aws_native_version"] = "1.25.0" context["pulumi_command_version"] = "1.0.1" + context["pulumi_github"] = "" context["boto3_version"] = "1.36.3" context["ephemeral_pulumi_deploy_version"] = "0.0.2" context["pydantic_version"] = "2.10.6" context["pyinstaller_version"] = "6.12.0" context["gha_checkout"] = "v4.2.2" - context["gha_setup_python"] = "v5.3.0" + context["gha_setup_python"] = "v5.4.0" context["gha_cache"] = "v4.2.0" context["gha_upload_artifact"] = "v4.4.3" context["gha_configure_aws_credentials"] = "v4.0.2" diff --git a/pyproject.toml b/pyproject.toml index 0cbc2726..ff66bb35 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,8 +9,8 @@ dependencies = [ "pytest>=8.3.4", "pytest-cov>=6.0.0", "pytest-randomly>=3.16.0", - "pyright[nodejs]>=1.1.394", - "copier>=9.4.1", + "pyright[nodejs]>=1.1.396", + "copier>=9.5.0", "copier-templates-extensions>=0.3.0" # Specific to this template diff --git a/template/.github/actions/install_deps_uv/action.yml b/template/.github/actions/install_deps_uv/action.yml index f9ceff8b..55de308c 100644 --- a/template/.github/actions/install_deps_uv/action.yml +++ b/template/.github/actions/install_deps_uv/action.yml @@ -27,7 +27,7 @@ runs: shell: bash - name: Setup python - uses: actions/setup-python@v5.3.0 + uses: actions/setup-python@v5.4.0 with: python-version: ${{ env.PYTHON_VERSION }} diff --git a/template/.github/actions/install_deps_uv/install-ci-tooling.ps1 b/template/.github/actions/install_deps_uv/install-ci-tooling.ps1 index a8643825..75d6938d 100644 --- a/template/.github/actions/install_deps_uv/install-ci-tooling.ps1 +++ b/template/.github/actions/install_deps_uv/install-ci-tooling.ps1 @@ -3,7 +3,7 @@ Set-StrictMode -Version Latest $ErrorActionPreference = "Stop" -irm https://astral.sh/uv/0.5.28/install.ps1 | iex +irm https://astral.sh/uv/0.6.6/install.ps1 | iex # Add uv to path (in github runner) $env:Path = "C:\Users\runneradmin\.local\bin;$env:Path" @@ -24,8 +24,8 @@ if ($args.Count -eq 0) { $env:UV_PYTHON = "$input" $env:UV_PYTHON_PREFERENCE="only-system" -& uv tool install 'copier==9.4.1' --with 'copier-templates-extensions==0.3.0' +& uv tool install 'copier==9.5.0' --with 'copier-templates-extensions==0.3.0' -& uv tool install 'pre-commit==4.0.1' +& uv tool install 'pre-commit==4.1.0' & uv tool list diff --git a/template/.pre-commit-config.yaml b/template/.pre-commit-config.yaml index 1d96875c..95bcf388 100644 --- a/template/.pre-commit-config.yaml +++ b/template/.pre-commit-config.yaml @@ -43,7 +43,7 @@ repos: # Reformatting (should generally come before any file format or other checks, because reformatting can change things) - repo: https://github.com/crate-ci/typos - rev: e59f226fadcb05a1440bd8b35ee994a9d21bf03b # frozen: typos-dict-v0.12.4 + rev: 9a11895dc3c5e1f4123ec841d08182d704593f6d # frozen: v1.30.0 hooks: - id: typos - repo: https://github.com/pre-commit/pre-commit-hooks @@ -162,7 +162,7 @@ repos: description: Runs hadolint to lint Dockerfiles - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 871f3bcae4fe473cd7109c3a068db975dc035e3b # frozen: v0.9.4 + rev: 2c8dce6094fa2b4b668e74f694ca63ceffd38614 # frozen: v0.9.9 hooks: - id: ruff name: ruff-src diff --git a/template/README.md.jinja b/template/README.md.jinja index 82ba6bf5..fe0531be 100644 --- a/template/README.md.jinja +++ b/template/README.md.jinja @@ -7,8 +7,8 @@ [![PyPI Version](https://img.shields.io/pypi/v/{% endraw %}{{ package_name }}{% raw %}.svg)](https://pypi.org/project/{% endraw %}{{ package_name }}{% raw %}/) [![Downloads](https://pepy.tech/badge/{% endraw %}{{ package_name }}{% raw %})](https://pepy.tech/project/{% endraw %}{{ package_name }}{% raw %}) [![Python Versions](https://img.shields.io/pypi/pyversions/{% endraw %}{{ package_name }}{% raw %}.svg)](https://pypi.org/project/{% endraw %}{{ package_name }}{% raw %}/) -{% endraw %}{% endif %}{% raw %}[![Codecov](https://codecov.io/gh/{% endraw %}{{ full_repo_url | replace("https://github.com/", "") }}{% raw %}/branch/main/graph/badge.svg)](https://codecov.io/gh/{% endraw %}{{ full_repo_url | replace("https://github.com/", "") }}{% raw %}) -[![Documentation Status](https://readthedocs.org/projects/{% endraw %}{{ package_name }}{% raw %}/badge/?version=latest)](https://{% endraw %}{{ package_name }}{% raw %}.readthedocs.io/en/latest/?badge=latest) +{% endraw %}{% endif %}{% raw %}[![Codecov](https://codecov.io/gh/{% endraw %}{{ full_repo_url | replace("https://github.com/", "") }}{% raw %}/branch/main/graph/badge.svg)](https://codecov.io/gh/{% endraw %}{{ full_repo_url | replace("https://github.com/", "") }}{% raw %}){% endraw %}{% if create_docs %}{% raw %} +[![Documentation Status](https://readthedocs.org/projects/{% endraw %}{{ package_name }}{% raw %}/badge/?version=latest)](https://{% endraw %}{{ package_name }}{% raw %}.readthedocs.io/en/latest/?badge=latest){% endraw %}{% endif %}{% raw %} # Usage Documentation is hosted on [ReadTheDocs](https://{% endraw %}{{ package_name }}{% raw %}.readthedocs.io/en/latest/?badge=latest). diff --git a/uv.lock b/uv.lock index 4c7fe94c..bb8b5629 100644 --- a/uv.lock +++ b/uv.lock @@ -21,7 +21,7 @@ wheels = [ [[package]] name = "copier" -version = "9.4.1" +version = "9.6.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "colorama" }, @@ -31,15 +31,16 @@ dependencies = [ { name = "jinja2-ansible-filters" }, { name = "packaging" }, { name = "pathspec" }, + { name = "platformdirs" }, { name = "plumbum" }, { name = "pydantic" }, { name = "pygments" }, { name = "pyyaml" }, { name = "questionary" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/c4/84/b99005e18cb07986a9fa1c1314c9bb461851dc115ab24d3d9ac668daad7f/copier-9.4.1.tar.gz", hash = "sha256:cc81d8204cb17fbc8c4a14996a8ce764166c34c77236de38cfbeb960c887b68f", size = 41510 } +sdist = { url = "https://files.pythonhosted.org/packages/d2/a2/b8919c3c3fe31ccfae6a16bbef0279396c0f9d4fb49dfd333ab4cc92bdb6/copier-9.6.0.tar.gz", hash = "sha256:e05a18b387b96e8d1fbd5271d37f59c9a02be5ad717f7878d0505562fd62b786", size = 45523 } wheels = [ - { url = "https://files.pythonhosted.org/packages/8d/96/5e8edaef8be1bd0a17943e6a011d4fc311f340e45733ef910a6f0b688587/copier-9.4.1-py3-none-any.whl", hash = "sha256:863385b7ba8a9090c832cd12ca072dba9153397dbe7c5f337bf8c3d8859efa32", size = 43188 }, + { url = "https://files.pythonhosted.org/packages/7b/ac/5c267efc8a34484dd470cae530fd5c50bc34b2631e0e928f0eb91d792fae/copier-9.6.0-py3-none-any.whl", hash = "sha256:aaf992600a373fa2dda9f61725916a230c210ede14a968c60dab855d524c6cf3", size = 48681 }, ] [[package]] @@ -57,9 +58,9 @@ dependencies = [ [package.metadata] requires-dist = [ - { name = "copier", specifier = ">=9.4.1" }, + { name = "copier", specifier = ">=9.5.0" }, { name = "copier-templates-extensions", specifier = ">=0.3.0" }, - { name = "pyright", extras = ["nodejs"], specifier = ">=1.1.394" }, + { name = "pyright", extras = ["nodejs"], specifier = ">=1.1.396" }, { name = "pytest", specifier = ">=8.3.4" }, { name = "pytest-cov", specifier = ">=6.0.0" }, { name = "pytest-randomly", specifier = ">=3.16.0" }, @@ -147,14 +148,14 @@ wheels = [ [[package]] name = "jinja2" -version = "3.1.4" +version = "3.1.6" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "markupsafe" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/ed/55/39036716d19cab0747a5020fc7e907f362fbf48c984b14e62127f7e68e5d/jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369", size = 240245 } +sdist = { url = "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d", size = 245115 } wheels = [ - { url = "https://files.pythonhosted.org/packages/31/80/3a54838c3fb461f6fec263ebf3a3a41771bd05190238de3486aae8540c36/jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d", size = 133271 }, + { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899 }, ] [[package]] @@ -250,6 +251,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/cc/20/ff623b09d963f88bfde16306a54e12ee5ea43e9b597108672ff3a408aad6/pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08", size = 31191 }, ] +[[package]] +name = "platformdirs" +version = "4.3.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/13/fc/128cc9cb8f03208bdbf93d3aa862e16d376844a14f9a0ce5cf4507372de4/platformdirs-4.3.6.tar.gz", hash = "sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907", size = 21302 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3c/a6/bc1012356d8ece4d66dd75c4b9fc6c1f6650ddd5991e421177d9f8f671be/platformdirs-4.3.6-py3-none-any.whl", hash = "sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb", size = 18439 }, +] + [[package]] name = "pluggy" version = "1.5.0" @@ -347,15 +357,15 @@ wheels = [ [[package]] name = "pyright" -version = "1.1.394" +version = "1.1.396" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "nodeenv" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/b1/e4/79f4d8a342eed6790fdebdb500e95062f319ee3d7d75ae27304ff995ae8c/pyright-1.1.394.tar.gz", hash = "sha256:56f2a3ab88c5214a451eb71d8f2792b7700434f841ea219119ade7f42ca93608", size = 3809348 } +sdist = { url = "https://files.pythonhosted.org/packages/bd/73/f20cb1dea1bdc1774e7f860fb69dc0718c7d8dea854a345faec845eb086a/pyright-1.1.396.tar.gz", hash = "sha256:142901f5908f5a0895be3d3befcc18bedcdb8cc1798deecaec86ef7233a29b03", size = 3814400 } wheels = [ - { url = "https://files.pythonhosted.org/packages/d6/4c/50c74e3d589517a9712a61a26143b587dba6285434a17aebf2ce6b82d2c3/pyright-1.1.394-py3-none-any.whl", hash = "sha256:5f74cce0a795a295fb768759bbeeec62561215dea657edcaab48a932b031ddbb", size = 5679540 }, + { url = "https://files.pythonhosted.org/packages/80/be/ecb7cfb42d242b7ee764b52e6ff4782beeec00e3b943a3ec832b281f9da6/pyright-1.1.396-py3-none-any.whl", hash = "sha256:c635e473095b9138c471abccca22b9fedbe63858e0b40d4fc4b67da041891844", size = 5689355 }, ] [package.optional-dependencies] From 92c1b9ed113559ae1af80341b851aec9c69062c3 Mon Sep 17 00:00:00 2001 From: Eli Fine Date: Wed, 12 Mar 2025 21:05:42 +0000 Subject: [PATCH 2/7] copier precommit --- .copier-answers.yml | 2 +- .pre-commit-config.yaml | 6 +++--- template/.pre-commit-config.yaml | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.copier-answers.yml b/.copier-answers.yml index e5d860d6..c3dd33a3 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,5 +1,5 @@ # Changes here will be overwritten by Copier -_commit: v0.0.6-2-g4ee2089 +_commit: v0.0.6-3-g4247518 _src_path: gh:LabAutomationAndScreening/copier-base-template.git description: Copier template for creating Python libraries and executables python_ci_versions: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 95bcf388..d66717e9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -43,7 +43,7 @@ repos: # Reformatting (should generally come before any file format or other checks, because reformatting can change things) - repo: https://github.com/crate-ci/typos - rev: 9a11895dc3c5e1f4123ec841d08182d704593f6d # frozen: v1.30.0 + rev: 2300ad1b6b5c37da54bcafb1a06211196503eac9 # frozen: v1 hooks: - id: typos - repo: https://github.com/pre-commit/pre-commit-hooks @@ -162,7 +162,7 @@ repos: description: Runs hadolint to lint Dockerfiles - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 2c8dce6094fa2b4b668e74f694ca63ceffd38614 # frozen: v0.9.9 + rev: 41d2daf392fbf43341a77f24a9c6481a4b66af98 # frozen: v0.9.10 hooks: - id: ruff name: ruff-src @@ -175,7 +175,7 @@ repos: - id: ruff-format - repo: https://github.com/pylint-dev/pylint - rev: c2b01c3d0b6410d4c93eb1f32fb28f2116b1e68f # frozen: v3.3.4 + rev: aaab3ccb541532d2bcdf0410ab93ff4fafc266f5 # frozen: v3.3.5 hooks: - id: pylint name: pylint diff --git a/template/.pre-commit-config.yaml b/template/.pre-commit-config.yaml index 95bcf388..d66717e9 100644 --- a/template/.pre-commit-config.yaml +++ b/template/.pre-commit-config.yaml @@ -43,7 +43,7 @@ repos: # Reformatting (should generally come before any file format or other checks, because reformatting can change things) - repo: https://github.com/crate-ci/typos - rev: 9a11895dc3c5e1f4123ec841d08182d704593f6d # frozen: v1.30.0 + rev: 2300ad1b6b5c37da54bcafb1a06211196503eac9 # frozen: v1 hooks: - id: typos - repo: https://github.com/pre-commit/pre-commit-hooks @@ -162,7 +162,7 @@ repos: description: Runs hadolint to lint Dockerfiles - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 2c8dce6094fa2b4b668e74f694ca63ceffd38614 # frozen: v0.9.9 + rev: 41d2daf392fbf43341a77f24a9c6481a4b66af98 # frozen: v0.9.10 hooks: - id: ruff name: ruff-src @@ -175,7 +175,7 @@ repos: - id: ruff-format - repo: https://github.com/pylint-dev/pylint - rev: c2b01c3d0b6410d4c93eb1f32fb28f2116b1e68f # frozen: v3.3.4 + rev: aaab3ccb541532d2bcdf0410ab93ff4fafc266f5 # frozen: v3.3.5 hooks: - id: pylint name: pylint From 0a1e7e83607a6c744c582aa592a838c946b0853c Mon Sep 17 00:00:00 2001 From: Eli Fine Date: Wed, 12 Mar 2025 21:09:04 +0000 Subject: [PATCH 3/7] codecov question --- copier.yml | 5 +++++ tests/copier_data/data1.yaml | 1 + tests/copier_data/data2.yaml | 1 + tests/copier_data/data3.yaml | 1 + 4 files changed, 8 insertions(+) diff --git a/copier.yml b/copier.yml index 30beae9e..4fd21881 100644 --- a/copier.yml +++ b/copier.yml @@ -67,6 +67,11 @@ use_windows_in_exe_ci: default: no when: is_frozen_executable +use_codecov: + type: bool + help: Upload code coverage results to CodeCov? + default: no + # Additional Settings _min_copier_version: "9.4" diff --git a/tests/copier_data/data1.yaml b/tests/copier_data/data1.yaml index 20b2ff42..a1a2903e 100644 --- a/tests/copier_data/data1.yaml +++ b/tests/copier_data/data1.yaml @@ -22,3 +22,4 @@ full_repo_url: https://www.github.com/foobar create_docs: no is_frozen_executable: yes use_windows_in_exe_ci: yes +use_codecov: yes diff --git a/tests/copier_data/data2.yaml b/tests/copier_data/data2.yaml index 770ea185..2233134e 100644 --- a/tests/copier_data/data2.yaml +++ b/tests/copier_data/data2.yaml @@ -27,3 +27,4 @@ full_repo_url: https://www.github.com/baz create_docs: yes is_frozen_executable: no use_windows_in_exe_ci: no +use_codecov: yes diff --git a/tests/copier_data/data3.yaml b/tests/copier_data/data3.yaml index 178e0665..fedea476 100644 --- a/tests/copier_data/data3.yaml +++ b/tests/copier_data/data3.yaml @@ -22,3 +22,4 @@ full_repo_url: https://www.github.com/foobar create_docs: no is_frozen_executable: yes use_windows_in_exe_ci: no +use_codecov: no From 8790ba3869f21eda7e2394f83e0bbfed873d0439 Mon Sep 17 00:00:00 2001 From: Eli Fine Date: Wed, 12 Mar 2025 21:09:52 +0000 Subject: [PATCH 4/7] update CI --- template/.github/workflows/ci.yaml.jinja | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/template/.github/workflows/ci.yaml.jinja b/template/.github/workflows/ci.yaml.jinja index 82d26e02..7483e1c0 100644 --- a/template/.github/workflows/ci.yaml.jinja +++ b/template/.github/workflows/ci.yaml.jinja @@ -77,7 +77,7 @@ jobs: - name: Unit test run: uv run pytest tests/unit --cov-report=xml --durations=5 - - name: Upload coverage to Codecov +{% endraw %}{% if use_codecov %}{% raw %} - name: Upload coverage to Codecov # only upload coverage from fastest job if: matrix.JOB_MATCHING_DEV_ENV == true uses: codecov/codecov-action@v5.1.1 @@ -88,7 +88,7 @@ jobs: name: codecov-umbrella fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} - slug: {% endraw %}{{ full_repo_url | replace("https://github.com/", "") }}{% raw %} + slug: {% endraw %}{{ full_repo_url | replace("https://github.com/", "") }}{% raw %}{% endraw %}{% endif %}{% raw %} {% endraw %}{% if is_frozen_executable %}{% raw %} executable: needs: [ test ] From 194b1cb49a268306bd92e996c3756b4f091cb701 Mon Sep 17 00:00:00 2001 From: Eli Fine Date: Thu, 13 Mar 2025 13:15:05 +0000 Subject: [PATCH 5/7] more version bumps --- .copier-answers.yml | 3 +-- .github/workflows/ci.yaml | 6 ++---- copier.yml | 2 +- extensions/context.py | 6 +++--- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.copier-answers.yml b/.copier-answers.yml index c3dd33a3..b3a7098a 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,10 +1,9 @@ # Changes here will be overwritten by Copier -_commit: v0.0.6-3-g4247518 +_commit: v0.0.6-6-g2b24a38 _src_path: gh:LabAutomationAndScreening/copier-base-template.git description: Copier template for creating Python libraries and executables python_ci_versions: - 3.12.7 -- 3.13.1 python_version: 3.12.7 repo_name: copier-python-package-template repo_org_name: LabAutomationAndScreening diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 49f29bb9..0ebb403f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -36,7 +36,7 @@ jobs: - name: Set up mutex # Github concurrency management is horrible, things get arbitrarily cancelled if queued up. So using mutex until github fixes itself. When multiple jobs are modifying cache at once, weird things can happen. possible issue is https://github.com/actions/toolkit/issues/658 if: ${{ runner.os != 'Windows' }} # we're just gonna have to YOLO on Windows, because this action doesn't support it yet https://github.com/ben-z/gh-action-mutex/issues/14 - uses: ben-z/gh-action-mutex@d3d5b354d460d4b6a1e3ee5b7951678658327812 # v1.0.0-alpha.9 + uses: ben-z/gh-action-mutex@1ebad517141198e08d47cf72f3c0975316620a65 # v1.0.0-alpha.10 with: branch: mutex-venv-${{ matrix.os }}-${{ matrix.python-version }} timeout-minutes: 30 # this is the amount of time this action will wait to attempt to acquire the mutex lock before failing, e.g. if other jobs are queued up in front of it @@ -64,8 +64,6 @@ jobs: - 3.12.7 - - 3.13.1 - copier: [ '--data-file tests/copier_data/data1.yaml', '--data-file tests/copier_data/data2.yaml', @@ -115,7 +113,7 @@ jobs: - name: Set up mutex # Github concurrency management is horrible, things get arbitrarily cancelled if queued up. So using mutex until github fixes itself. When multiple jobs are modifying cache at once, weird things can happen. possible issue is https://github.com/actions/toolkit/issues/658 if: ${{ runner.os != 'Windows' }} # we're just gonna have to YOLO on Windows, because this action doesn't support it yet https://github.com/ben-z/gh-action-mutex/issues/14 - uses: ben-z/gh-action-mutex@d3d5b354d460d4b6a1e3ee5b7951678658327812 # v1.0.0-alpha.9 + uses: ben-z/gh-action-mutex@1ebad517141198e08d47cf72f3c0975316620a65 # v1.0.0-alpha.10 with: branch: mutex-venv-${{ matrix.os }}-${{ matrix.python-version }} timeout-minutes: 30 # this is the amount of time this action will wait to attempt to acquire the mutex lock before failing, e.g. if other jobs are queued up in front of it diff --git a/copier.yml b/copier.yml index 4fd21881..16cc0165 100644 --- a/copier.yml +++ b/copier.yml @@ -32,7 +32,7 @@ python_ci_versions: multiselect: true choices: - "3.12.7" - - "3.13.1" + - "3.13.2" diff --git a/extensions/context.py b/extensions/context.py index 3d05d64a..92d01e0a 100644 --- a/extensions/context.py +++ b/extensions/context.py @@ -24,7 +24,7 @@ def hook(self, context: dict[Any, Any]) -> dict[Any, Any]: context["pulumi_aws_native_version"] = "1.25.0" context["pulumi_command_version"] = "1.0.1" context["pulumi_github"] = "" - context["boto3_version"] = "1.36.3" + context["boto3_version"] = "1.37.11" context["ephemeral_pulumi_deploy_version"] = "0.0.2" context["pydantic_version"] = "2.10.6" context["pyinstaller_version"] = "6.12.0" @@ -34,11 +34,11 @@ def hook(self, context: dict[Any, Any]) -> dict[Any, Any]: context["gha_cache"] = "v4.2.0" context["gha_upload_artifact"] = "v4.4.3" context["gha_configure_aws_credentials"] = "v4.0.2" - context["gha_mutex"] = "d3d5b354d460d4b6a1e3ee5b7951678658327812 # v1.0.0-alpha.9" + context["gha_mutex"] = "1ebad517141198e08d47cf72f3c0975316620a65 # v1.0.0-alpha.10" context["gha_linux_runner"] = "ubuntu-24.04" context["gha_windows_runner"] = "windows-2022" context["py311_version"] = "" context["py312_version"] = "3.12.7" - context["py313_version"] = "3.13.1" + context["py313_version"] = "3.13.2" return context From da3cf69f7a9a3969d557ae5263464f71d92e2b50 Mon Sep 17 00:00:00 2001 From: Eli Fine Date: Thu, 13 Mar 2025 13:19:06 +0000 Subject: [PATCH 6/7] add back in py313 --- .copier-answers.yml | 1 + .github/workflows/ci.yaml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.copier-answers.yml b/.copier-answers.yml index b3a7098a..1d835d8b 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -4,6 +4,7 @@ _src_path: gh:LabAutomationAndScreening/copier-base-template.git description: Copier template for creating Python libraries and executables python_ci_versions: - 3.12.7 +- 3.13.2 python_version: 3.12.7 repo_name: copier-python-package-template repo_org_name: LabAutomationAndScreening diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0ebb403f..eff6c83f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -64,6 +64,8 @@ jobs: - 3.12.7 + - 3.13.2 + copier: [ '--data-file tests/copier_data/data1.yaml', '--data-file tests/copier_data/data2.yaml', From 785e456f8fb09062c157d36d56c33c83477f5b45 Mon Sep 17 00:00:00 2001 From: Eli Fine Date: Thu, 13 Mar 2025 13:20:49 +0000 Subject: [PATCH 7/7] fix py313 version --- tests/copier_data/data2.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/copier_data/data2.yaml b/tests/copier_data/data2.yaml index 2233134e..09f111ae 100644 --- a/tests/copier_data/data2.yaml +++ b/tests/copier_data/data2.yaml @@ -20,7 +20,7 @@ aws_region_for_stack: us-west-1 python_ci_versions: - "3.12.7" - - "3.13.1" + - "3.13.2" package_name: the-amazing-library primary_author: John Williams full_repo_url: https://www.github.com/baz