File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
55project_name : db_app
Original file line number Diff line number Diff line change @@ -5,6 +5,14 @@ install-dev:
55 uv sync --all-extras
66
77check :
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+
3956update-template :
4057 copier update \
4158 --skip-answered \
Original file line number Diff line number Diff 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 ]
5762line-length = 120
63+ src = [" ." ]
5864
5965[tool .ruff .format ]
6066docstring-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 ]]
103107module = " astropy.*"
Original file line number Diff line number Diff line change 1- import sys
21import unittest
32
43from parameterized import parameterized
54
65import app .commands .adminapi .command as adminapi
76import app .commands .dataapi .command as dataapi
87
9- MINIMAL_PYTHON_VERSION = (3 , 10 )
10-
118
129class 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" ),
You can’t perform that action at this time.
0 commit comments