Skip to content

Commit 589c904

Browse files
committed
update template version
1 parent 38f63f9 commit 589c904

4 files changed

Lines changed: 28 additions & 18 deletions

File tree

.template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Autogenerated - DO NOT EDIT
22
# Parameters of the project as generated from template
3-
_commit: 3bb6f60
3+
_commit: 33b991b
44
_src_path: gh:kraysent/python-template
55
project_name: db_app

makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ install-dev:
55
uv sync --all-extras
66

77
check:
8+
@output=$$(copier check-update --answers-file .template.yaml 2>&1) || true; \
9+
if echo "$$output" | grep -q "up-to-date"; then \
10+
true; \
11+
elif echo "$$output" | grep -q "New template version"; then \
12+
echo "Template update available, run make update-template"; \
13+
else \
14+
echo "$$output"; \
15+
fi
816
@find . \
917
-name "*.py" \
1018
-not -path "./.venv/*" \
@@ -36,6 +44,15 @@ build:
3644
docker build . \
3745
--platform linux/arm64
3846

47+
new-branch:
48+
@read -p "Branch name: " branch_name && \
49+
branch_name=$${branch_name// /-} && \
50+
base=$$(git remote show origin | sed -n '/HEAD branch/s/.*: //p') && \
51+
echo "Selecting $$base branch as default" && \
52+
git fetch origin $$base && \
53+
git checkout -b $$branch_name origin/$$base && \
54+
git push -u origin $$branch_name
55+
3956
update-template:
4057
copier update \
4158
--skip-answered \

pyproject.toml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,14 @@ test = [
5353
"testcontainers-postgres>=0.0.1rc1",
5454
]
5555

56+
[tool.pytest.ini_options]
57+
pythonpath = ["."]
58+
addopts = "-W ignore::DeprecationWarning"
59+
testpaths = ["tests"]
60+
5661
[tool.ruff]
5762
line-length = 120
63+
src = ["."]
5864

5965
[tool.ruff.format]
6066
docstring-code-format = true
@@ -86,18 +92,16 @@ select = [
8692
"PLE",
8793
"FLY",
8894
"NPY201",
89-
"ARG001"
95+
"ARG001",
96+
"PLC0415",
97+
"S101",
9098
]
9199

92100
[tool.ruff.lint.per-file-ignores]
93101
"__init__.py" = [
94102
"F403", # ignore star imports warning in __init__ files
95103
]
96-
97-
[tool.pytest.ini_options]
98-
pythonpath = ["."]
99-
addopts = "-W ignore::DeprecationWarning"
100-
testpaths = ["tests"]
104+
"tests/**" = ["S101"]
101105

102106
[[tool.mypy.overrides]]
103107
module = "astropy.*"

tests/env_test.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,12 @@
1-
import sys
21
import unittest
32

43
from parameterized import parameterized
54

65
import app.commands.adminapi.command as adminapi
76
import app.commands.dataapi.command as dataapi
87

9-
MINIMAL_PYTHON_VERSION = (3, 10)
10-
118

129
class TestEnvironment(unittest.TestCase):
13-
def test_python_version(self):
14-
self.assertGreaterEqual(
15-
sys.version_info,
16-
MINIMAL_PYTHON_VERSION,
17-
msg=f"You are using Python with version {'.'.join(map(str, sys.version_info))}"
18-
f"while minimally supported version is {'.'.join(map(str, MINIMAL_PYTHON_VERSION))}",
19-
)
20-
2110
@parameterized.expand(
2211
[
2312
("configs/dev/adminapi.yaml"),

0 commit comments

Comments
 (0)