Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: v0.0.5-36-gb56f9e4
_commit: v0.0.5-57-g045b3f3
_src_path: gh:LabAutomationAndScreening/copier-base-template.git
description: Copier template for creating Python libraries and executables
python_ci_versions:
Expand Down
11 changes: 9 additions & 2 deletions .devcontainer/create-aws-profile.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
#!/bin/bash
#!/bin/sh
set -ex

mkdir -p ~/.aws

if [ "$GITHUB_ACTIONS" = "true" ]; then
LOCALSTACK_ENDPOINT_URL="http://localhost:4566"
else
LOCALSTACK_ENDPOINT_URL="http://localstack:4566"
fi

cat >> ~/.aws/config <<EOF
[profile localstack]
region=us-east-1
output=json
endpoint_url = http://localstack:4566
endpoint_url = $LOCALSTACK_ENDPOINT_URL
EOF
cat >> ~/.aws/credentials <<EOF
[localstack]
Expand Down
1 change: 1 addition & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ services:
- "55874:2222"
environment:
- AWS_PROFILE=localstack
- AWS_DEFAULT_REGION=us-east-1


volumes:
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/install-ci-tooling.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.26/install.sh | sh
curl -LsSf https://astral.sh/uv/0.5.28/install.sh | sh
uv --version
# TODO: add uv autocompletion to the shell https://docs.astral.sh/uv/getting-started/installation/#shell-autocompletion

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/install_deps_uv/install-ci-tooling.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"

irm https://astral.sh/uv/0.5.26/install.ps1 | iex
irm https://astral.sh/uv/0.5.28/install.ps1 | iex

# Add uv to path (in github runner)
$env:Path = "C:\Users\runneradmin\.local\bin;$env:Path"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
copier: [
'--data-file tests/copier_data/data1.yaml',
'--data-file tests/copier_data/data2.yaml',
'--data-file tests/copier_data/data3.yaml',
]
runs-on: ${{ matrix.os }}

Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: b1b019a4372e6055cd23b7a8e299c56f9d522a94 # frozen: dictgen-v0.3.1
rev: e59f226fadcb05a1440bd8b35ee994a9d21bf03b # frozen: typos-dict-v0.12.4
hooks:
- id: typos
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down Expand Up @@ -162,7 +162,7 @@ repos:
description: Runs hadolint to lint Dockerfiles

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 73413df07b4ab0bf103ca1ae73c7cec5c0ace593 # frozen: v0.9.2
rev: 871f3bcae4fe473cd7109c3a068db975dc035e3b # frozen: v0.9.4
hooks:
- id: ruff
name: ruff-src
Expand All @@ -175,7 +175,7 @@ repos:
- id: ruff-format

- repo: https://github.com/pylint-dev/pylint
rev: c28580be76fe1ec55a6cac41833c0bd68070d2f7 # frozen: v3.3.3
rev: c2b01c3d0b6410d4c93eb1f32fb28f2116b1e68f # frozen: v3.3.4
hooks:
- id: pylint
name: pylint
Expand Down
15 changes: 15 additions & 0 deletions copier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ repo_name:
type: str
help: What is the name of the repository?

repo_org_name:
type: str
help: What's the organization or username that owns this repository (look in the URL)?

description:
type: str
help: What is the description of this repository?
Expand Down Expand Up @@ -52,6 +56,17 @@ create_docs:
help: Do you want to create documentation for this project?
default: yes

is_frozen_executable:
type: bool
help: Is this project a frozen executable (instead of a PyPI-compatible library)?
default: no

use_windows_in_exe_ci:
type: bool
help: Should CI in the instantiated template also use Windows runners for building and testing the executable?
default: no
when: is_frozen_executable


# Additional Settings
_min_copier_version: "9.4"
Expand Down
13 changes: 8 additions & 5 deletions extensions/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,23 @@ class ContextUpdater(ContextHook):

@override
def hook(self, context: dict[Any, Any]) -> dict[Any, Any]:
context["uv_version"] = "0.5.26"
context["uv_version"] = "0.5.28"
context["pre_commit_version"] = "4.0.1"
context["pyright_version"] = "1.1.393"
context["pyright_version"] = "1.1.394"
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_templates_extension_version"] = "0.3.0"
context["sphinx_version"] = "8.1.3"
context["pulumi_version"] = "3.147.0"
context["pulumi_aws_version"] = "6.66.3"
context["pulumi_aws_native_version"] = "1.24.0"
context["pulumi_version"] = "3.149.0"
context["pulumi_aws_version"] = "6.67.0"
context["pulumi_aws_native_version"] = "1.25.0"
context["pulumi_command_version"] = "1.0.1"
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"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies = [
"pytest>=8.3.4",
"pytest-cov>=6.0.0",
"pytest-randomly>=3.16.0",
"pyright[nodejs]>=1.1.393",
"pyright[nodejs]>=1.1.394",
"copier>=9.4.1",
"copier-templates-extensions>=0.3.0"

Expand Down
215 changes: 107 additions & 108 deletions pyrightconfig.json
Original file line number Diff line number Diff line change
@@ -1,110 +1,109 @@
{
"exclude": [
// excludes managed by this repository
"exclude": [
// excludes managed by this repository


// excludes managed by template
"**/node_modules",
"**/.precommit_cache",
"**/.ruff_cache",
"**/.npm_cache",
"**/.pipx_cache",
"**/__pycache__",
"**/vendor_files",
"**/.venv",
"**/venv"
],
"strictListInference": true,
"strictDictionaryInference": true,
"strictSetInference": true,
"analyzeUnannotatedFunctions": true,
"strictParameterNoneValue": true,
"enableTypeIgnoreComments": true,
"deprecateTypingAliases": true,
"reportGeneralTypeIssues": true,
"reportPropertyTypeMismatch": true,
"reportFunctionMemberAccess": true,
"reportMissingImports": true,
"reportMissingModuleSource": true,
"reportInvalidTypeForm": true,
"reportMissingTypeStubs": false,
"reportImportCycles": true,
"reportUnusedClass": true,
"reportUnusedFunction": true,
"reportUnusedVariable": true,
"reportWildcardImportFromLibrary": true,
"reportAbstractUsage": true,
"reportArgumentType": true,
"reportAssertTypeFailure": true,
"reportAssignmentType": true,
"reportAttributeAccessIssue": true,
"reportCallIssue": true,
"reportInconsistentOverload": true,
"reportIndexIssue": true,
"reportInvalidTypeArguments": true,
"reportNoOverloadImplementation": true,
"reportOperatorIssue": true,
"reportOptionalSubscript": true,
"reportOptionalMemberAccess": true,
"reportOptionalCall": true,
"reportOptionalIterable": true,
"reportOptionalContextManager": true,
"reportOptionalOperand": true,
"reportRedeclaration": true,
"reportReturnType": true,
"reportTypedDictNotRequiredAccess": true,
"reportUntypedFunctionDecorator": true,
"reportUntypedClassDecorator": true,
"reportUntypedBaseClass": true,
"reportUntypedNamedTuple": true,
"reportPrivateUsage": false, // already covered by ruff rule SLF001
"reportTypeCommentUsage": true,
"reportPrivateImportUsage": true,
"reportConstantRedefinition": true,
"reportDeprecated": true,
"reportIncompatibleMethodOverride": true,
"reportIncompatibleVariableOverride": true,
"reportInconsistentConstructor": true,
"reportOverlappingOverload": true,
"reportPossiblyUnboundVariable": true,
"reportMissingSuperCall": true,
"reportUninitializedInstanceVariable": true,
"reportInvalidStringEscapeSequence": true,
"reportUnknownParameterType": true,
"reportUnknownArgumentType": true,
"reportUnknownLambdaType": true,
"reportUnknownVariableType": true,
"reportUnknownMemberType": true,
"reportMissingParameterType": true,
"reportMissingTypeArgument": true,
"reportInvalidTypeVarUse": true,
"reportCallInDefaultInitializer": true,
"reportUnnecessaryIsInstance": true,
"reportUnnecessaryCast": true,
"reportUnnecessaryComparison": true,
"reportUnnecessaryContains": true,
"reportAssertAlwaysTrue": true,
"reportSelfClsParameterName": true,
"reportImplicitStringConcatenation": true,
"reportUndefinedVariable": true,
"reportUnboundVariable": true,
"reportInvalidStubStatement": true,
"reportIncompleteStub": true,
"reportUnsupportedDunderAll": true,
"reportUnusedCallResult": true,
"reportUnusedCoroutine": true,
"reportUnusedExcept": true,
"reportUnusedExpression": true,
"reportUnnecessaryTypeIgnoreComment": true,
"reportMatchNotExhaustive": true,
"reportImplicitOverride": true,
"reportShadowedImports": true,
"pythonPlatform": "Linux",
"executionEnvironments": [
{
"root": "tests",
// reportUninitializedInstanceVariable doesn't make any sense for test cases. See https://github.com/microsoft/pyright/discussions/4834#discussioncomment-8496931
"reportUninitializedInstanceVariable": false,
}
]
}
// excludes managed by template
"**/node_modules",
"**/.precommit_cache",
"**/.ruff_cache",
"**/.npm_cache",
"**/.pipx_cache",
"**/__pycache__",
"**/vendor_files",
"**/.venv",
"**/venv"
],
"strictListInference": true,
"strictDictionaryInference": true,
"strictSetInference": true,
"analyzeUnannotatedFunctions": true,
"strictParameterNoneValue": true,
"enableTypeIgnoreComments": true,
"deprecateTypingAliases": true,
"reportGeneralTypeIssues": true,
"reportPropertyTypeMismatch": true,
"reportFunctionMemberAccess": true,
"reportMissingImports": true,
"reportMissingModuleSource": true,
"reportInvalidTypeForm": true,
"reportMissingTypeStubs": false,
"reportImportCycles": true,
"reportUnusedClass": true,
"reportUnusedFunction": true,
"reportUnusedVariable": false, // already covered by ruff rule F841
"reportWildcardImportFromLibrary": true,
"reportAbstractUsage": true,
"reportArgumentType": true,
"reportAssertTypeFailure": true,
"reportAssignmentType": true,
"reportAttributeAccessIssue": true,
"reportCallIssue": true,
"reportInconsistentOverload": true,
"reportIndexIssue": true,
"reportInvalidTypeArguments": true,
"reportNoOverloadImplementation": true,
"reportOperatorIssue": true,
"reportOptionalSubscript": true,
"reportOptionalMemberAccess": true,
"reportOptionalCall": true,
"reportOptionalIterable": true,
"reportOptionalContextManager": true,
"reportOptionalOperand": true,
"reportRedeclaration": true,
"reportReturnType": true,
"reportTypedDictNotRequiredAccess": true,
"reportUntypedFunctionDecorator": true,
"reportUntypedClassDecorator": true,
"reportUntypedBaseClass": true,
"reportUntypedNamedTuple": true,
"reportPrivateUsage": false, // already covered by ruff rule SLF001
"reportTypeCommentUsage": true,
"reportPrivateImportUsage": true,
"reportConstantRedefinition": true,
"reportDeprecated": true,
"reportIncompatibleMethodOverride": true,
"reportIncompatibleVariableOverride": true,
"reportInconsistentConstructor": true,
"reportOverlappingOverload": true,
"reportPossiblyUnboundVariable": true,
"reportMissingSuperCall": true,
"reportUninitializedInstanceVariable": true,
"reportInvalidStringEscapeSequence": true,
"reportUnknownParameterType": true,
"reportUnknownArgumentType": true,
"reportUnknownLambdaType": true,
"reportUnknownVariableType": true,
"reportUnknownMemberType": true,
"reportMissingParameterType": true,
"reportMissingTypeArgument": true,
"reportInvalidTypeVarUse": true,
"reportCallInDefaultInitializer": true,
"reportUnnecessaryIsInstance": true,
"reportUnnecessaryCast": true,
"reportUnnecessaryComparison": true,
"reportUnnecessaryContains": true,
"reportAssertAlwaysTrue": true,
"reportSelfClsParameterName": true,
"reportImplicitStringConcatenation": true,
"reportUndefinedVariable": true,
"reportUnboundVariable": true,
"reportInvalidStubStatement": true,
"reportIncompleteStub": true,
"reportUnsupportedDunderAll": true,
"reportUnusedCallResult": true,
"reportUnusedCoroutine": true,
"reportUnusedExcept": true,
"reportUnusedExpression": true,
"reportUnnecessaryTypeIgnoreComment": true,
"reportMatchNotExhaustive": true,
"reportImplicitOverride": true,
"reportShadowedImports": true,
"pythonPlatform": "Linux",
"executionEnvironments": [
{
"root": "tests",
// reportUninitializedInstanceVariable doesn't make any sense for test cases. See https://github.com/microsoft/pyright/discussions/4834#discussioncomment-8496931
"reportUninitializedInstanceVariable": false
}
]
}
1 change: 1 addition & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ filterwarnings =

error::pytest.PytestUnraisableExceptionWarning
# stackoverflow.com/questions/71642742/make-pytest-fail-on-resourcewarning-unclosed-files
error::pytest.PytestUnhandledThreadExceptionWarning

xfail_strict=true

Expand Down
Loading