Skip to content

Commit e74474b

Browse files
committed
update dependencies to Python 3.10
1 parent b3cf53c commit e74474b

File tree

5 files changed

+34
-55
lines changed

5 files changed

+34
-55
lines changed

{{cookiecutter.project_slug}}/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ ENV TESTBUILD=$TESTBUILD
2323

2424
RUN pip install --no-cache poetry poethepoet
2525
RUN poetry config --no-cache
26-
RUN if [ "$TESTBUILD" = 'True' ]; then poe install-dev; fi
26+
RUN poe install-dev
2727
RUN poetry build --format=wheel
2828
RUN poetry export --only main -f requirements.txt --without-hashes --output requirements.txt
2929
RUN if [ "$TESTBUILD" = 'True' ]; then poe test; fi

{{cookiecutter.project_slug}}/poetry.lock

Lines changed: 5 additions & 47 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

{{cookiecutter.project_slug}}/pyproject.toml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ packages = [
1313
]
1414

1515
[tool.poetry.dependencies]
16-
python = "^3.8"
16+
python = "^3.10"
1717

1818
[tool.poetry.group.dev.dependencies]
1919
pre-commit = "^2.18.1"
@@ -61,7 +61,7 @@ line_length = 79
6161

6262
[tool.black]
6363
line-length = 79
64-
target-version = ['py38']
64+
target-version = ['py310']
6565
include = '\.pyi?$'
6666
exclude = '''
6767
@@ -86,7 +86,20 @@ exclude = '''
8686

8787
[tool.pytest.ini_options]
8888
minversion = "6.0"
89-
addopts = "--verbose --maxfail=1 --flake8 --reverse --color=yes --cov={{cookiecutter.package_name}} --html=docs/pytest_report.html --self-contained-html --cov-fail-under=100 --cov-report term-missing --cov-report html:docs/cov-report --doctest-modules --cov-config=pyproject.toml"
89+
addopts = """
90+
--verbose \
91+
--maxfail=1 \
92+
--flake8 \
93+
--reverse \
94+
--color=yes \
95+
--cov={{cookiecutter.package_name}} \
96+
--html=docs/pytest_report.html \
97+
--self-contained-html \
98+
--cov-fail-under=100 \
99+
--cov-report term-missing \
100+
--cov-report html:docs/cov-report \
101+
--doctest-modules \
102+
--cov-config=pyproject.toml"""
90103
testpaths = [
91104
"tests",
92105
"{{cookiecutter.package_name}}"
@@ -130,12 +143,18 @@ lint = "poetry run flake8"
130143
doc = "poetry run pdoc --html . --force --output-dir docs/api"
131144

132145
[tool.poe.tasks.docker-build]
133-
cmd = "docker build --build-arg TESTBUILD=$no_test --build-arg BUILDTAG=$build_tag --build-arg BUILDPLATFORM=$build_platform --target $target_build -t {{cookiecutter.package_name}}:$target_build-$build_tag ."
146+
cmd = """
147+
docker build
148+
--build-arg TESTBUILD=$no_test \
149+
--build-arg BUILDTAG=$build_tag \
150+
--build-arg BUILDPLATFORM=$build_platform \
151+
--target $target \
152+
-t {{cookiecutter.package_name}}:$target-$build_tag ."""
134153
help = "Build a docker image to test the project in an isolated environment"
135154
args = [
136155
{ name = "no-test", default = true, type = "boolean" },
137156
{ name = "build-tag", default = "3-alpine" },
138157
{ name = "build-platform", default = "linux/amd64" },
139-
{ name = "target-build", default = "prod" },
158+
{ name = "target", default = "prod" },
140159
]
141160

{{cookiecutter.project_slug}}/tests/{{cookiecutter.package_name}}_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
import pytest
1616

1717
from {{cookiecutter.package_name}} import {{cookiecutter.module_name}} as m
18-
from typing import Self
18+
from typing import TypeVar
19+
20+
Self = TypeVar("Self", bound="TestGroup")
1921

2022

2123
@pytest.mark.parametrize(
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"""{{cookiecutter.project_short_description}}."""
1+
"""{{cookiecutter.project_short_description}}"""

0 commit comments

Comments
 (0)