@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
5
5
[tool .poetry ]
6
6
name = " zwog"
7
- version = " 1.0 .0"
7
+ version = " 1.1 .0"
8
8
description = " Zwift workout generator"
9
9
authors = [
10
10
" Tarmo Äijö <tarmo.aijo@gmail.com>" ,
@@ -30,15 +30,16 @@ packages = [
30
30
]
31
31
32
32
[tool .poetry .dependencies ]
33
- python = " ^3.8 "
34
- lark = " ^ 1.1.2"
33
+ python = " ^3.10 "
34
+ lark = " >= 1.1.2"
35
35
36
36
[tool .poetry .group .dev .dependencies ]
37
- pytest = " ^7.4"
38
- tox = " ^4.11"
39
- ruff = " ^0.1"
40
- mypy = " ^1.6"
41
- pre-commit = " ^3.5"
37
+ nox = {extras = [" uv" ], version = " ^2024.10.9" }
38
+ pytest = " ^8.3"
39
+ ruff = " ^0.7"
40
+ mypy = " ^1.11"
41
+ pytest-cov = " ^5.0"
42
+ pre-commit = " ^3.8"
42
43
43
44
[tool .poetry .scripts ]
44
45
zwog = " zwog.utils:main"
@@ -47,8 +48,13 @@ zwog = "zwog.utils:main"
47
48
"Bug Tracker" = " https://github.com/tare/zwog/issues"
48
49
49
50
[tool .ruff ]
50
- target-version = " py38 "
51
+ target-version = " py310 "
51
52
fix = true
53
+ exclude = []
54
+ force-exclude = true
55
+
56
+ [tool .ruff .lint ]
57
+ preview = true
52
58
fixable = [
53
59
" I001" , # https://docs.astral.sh/ruff/rules/unsorted-imports/
54
60
]
@@ -63,61 +69,119 @@ select = [
63
69
" N" , # https://docs.astral.sh/ruff/rules/#pep8-naming-n
64
70
" D" , # https://docs.astral.sh/ruff/rules/#pydocstyle-d
65
71
" UP" , # https://docs.astral.sh/ruff/rules/#pyupgrade-up
72
+ " YTT" , # https://docs.astral.sh/ruff/rules/#flake8-2020-ytt
66
73
" ANN" , # https://docs.astral.sh/ruff/rules/#flake8-annotations-ann
67
- " A" , # https://docs.astral.sh/ruff/rules/#flake8-builtins-a
74
+ " ASYNC" , # https://docs.astral.sh/ruff/rules/#flake8-async-async
75
+ " S" , # https://docs.astral.sh/ruff/rules/#flake8-bandit-s
76
+ " BLE" , # https://docs.astral.sh/ruff/rules/#flake8-blind-except-ble
77
+ " FBT" , # https://docs.astral.sh/ruff/rules/#flake8-boolean-trap-fbt
68
78
" B" , # https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
79
+ " A" , # https://docs.astral.sh/ruff/rules/#flake8-builtins-a
80
+ " COM" , # https://docs.astral.sh/ruff/rules/#flake8-commas-com
81
+ # "CPY", # https://docs.astral.sh/ruff/rules/#flake8-copyright-cpy
69
82
" C4" , # https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4
70
- " EM101" , # https://docs.astral.sh/ruff/rules/#flake8-errmsg-em
83
+ " DTZ" , # https://docs.astral.sh/ruff/rules/#flake8-datetimez-dtz
84
+ " T10" , # https://docs.astral.sh/ruff/rules/#flake8-debugger-t10
85
+ " DJ" , # https://docs.astral.sh/ruff/rules/#flake8-django-dj
86
+ " EM" , # https://docs.astral.sh/ruff/rules/#flake8-errmsg-em
71
87
" EXE" , # https://docs.astral.sh/ruff/rules/#flake8-executable-exe
88
+ " FA" , # https://docs.astral.sh/ruff/rules/#flake8-future-annotations-fa
72
89
" ISC" , # https://docs.astral.sh/ruff/rules/#flake8-implicit-str-concat-isc
90
+ " ICN" , # https://docs.astral.sh/ruff/rules/#flake8-import-conventions-icn
91
+ " LOG" , # https://docs.astral.sh/ruff/rules/#flake8-logging-log
73
92
" G" , # https://docs.astral.sh/ruff/rules/#flake8-logging-format-g
93
+ " INP" , # https://docs.astral.sh/ruff/rules/#flake8-no-pep420-inp
74
94
" PIE" , # https://docs.astral.sh/ruff/rules/#flake8-pie-pie
95
+ " T20" , # https://docs.astral.sh/ruff/rules/#flake8-print-t20
96
+ " PYI" , # https://docs.astral.sh/ruff/rules/#flake8-pyi-pyi
75
97
" PT" , # https://docs.astral.sh/ruff/rules/#flake8-pytest-style-pt
76
98
" Q" , # https://docs.astral.sh/ruff/rules/#flake8-quotes-q
99
+ " RSE" , # https://docs.astral.sh/ruff/rules/#flake8-raise-rse
77
100
" RET" , # https://docs.astral.sh/ruff/rules/#flake8-return-ret
78
101
" SLF" , # https://docs.astral.sh/ruff/rules/#flake8-self-slf
102
+ " SLOT" , # https://docs.astral.sh/ruff/rules/#flake8-slots-slot
79
103
" SIM" , # https://docs.astral.sh/ruff/rules/#flake8-simplify-sim
80
104
" TID" , # https://docs.astral.sh/ruff/rules/#flake8-tidy-imports-tid
105
+ " TCH" , # https://docs.astral.sh/ruff/rules/#flake8-type-checking-tch
106
+ " INT" , # https://docs.astral.sh/ruff/rules/#flake8-gettext-int
81
107
" ARG" , # https://docs.astral.sh/ruff/rules/#flake8-unused-arguments-arg
82
108
" PTH" , # https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth
83
- " TD" , # https://docs.astral.sh/ruff/rules/#flake8-todos-td
109
+ # "TD", # https://docs.astral.sh/ruff/rules/#flake8-todos-td
110
+ # "FIX", # https://docs.astral.sh/ruff/rules/#flake8-fixme-fix
84
111
" ERA" , # https://docs.astral.sh/ruff/rules/#eradicate-era
112
+ " PD" , # https://docs.astral.sh/ruff/rules/#pandas-vet-pd
85
113
" PGH" , # https://docs.astral.sh/ruff/rules/#pygrep-hooks-pgh
86
114
" PL" , # https://docs.astral.sh/ruff/rules/#pylint-pl
87
115
" TRY" , # https://docs.astral.sh/ruff/rules/#tryceratops-try
116
+ " FLY" , # https://docs.astral.sh/ruff/rules/#flynt-fly
88
117
" NPY" , # https://docs.astral.sh/ruff/rules/#numpy-specific-rules-npy
118
+ " FAST" , # https://docs.astral.sh/ruff/rules/#fastapi-fast
119
+ " AIR" , # https://docs.astral.sh/ruff/rules/#airflow-air
89
120
" PERF" , # https://docs.astral.sh/ruff/rules/#perflint-perf
90
121
" FURB" , # https://docs.astral.sh/ruff/rules/#refurb-furb
91
- " LOG " , # https://docs.astral.sh/ruff/rules/#flake8-logging-log
122
+ " DOC " , # https://docs.astral.sh/ruff/rules/#pydoclint-doc
92
123
" RUF" , # https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
93
124
]
94
125
ignore = [
95
- " ANN101" , # https://docs.astral.sh/ruff/rules/missing-type-self /
96
- " ISC001 " , # https://docs.astral.sh/ruff/rules/#flake8-implicit-str-concat-isc
126
+ " ANN101" , # https://docs.astral.sh/ruff/rules/missing-type-function-argument /
127
+ " S101 " , # https://docs.astral.sh/ruff/rules/assert/
97
128
" UP034" , # https://docs.astral.sh/ruff/rules/extraneous-parentheses/
129
+ " PD002" , # https://docs.astral.sh/ruff/rules/pandas-use-of-inplace-argument/
130
+ # https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
131
+ " W191" , # https://docs.astral.sh/ruff/rules/tab-indentation/
132
+ " E111" , # https://docs.astral.sh/ruff/rules/indentation-with-invalid-multiple/
133
+ " E114" , # https://docs.astral.sh/ruff/rules/indentation-with-invalid-multiple-comment/
134
+ " E117" , # https://docs.astral.sh/ruff/rules/over-indented/
135
+ " D206" , # https://docs.astral.sh/ruff/rules/indent-with-spaces/
136
+ " D300" , # https://docs.astral.sh/ruff/rules/triple-single-quotes/
137
+ " Q000" , # https://docs.astral.sh/ruff/rules/bad-quotes-inline-string/
138
+ " Q001" , # https://docs.astral.sh/ruff/rules/bad-quotes-multiline-string/
139
+ " Q002" , # https://docs.astral.sh/ruff/rules/bad-quotes-docstring/
140
+ " Q003" , # https://docs.astral.sh/ruff/rules/avoidable-escaped-quote/
141
+ " COM812" , # https://docs.astral.sh/ruff/rules/missing-trailing-comma/
142
+ " COM819" , # https://docs.astral.sh/ruff/rules/prohibited-trailing-comma/
143
+ " ISC001" , # https://docs.astral.sh/ruff/rules/single-line-implicit-string-concatenation/
144
+ " ISC002" , # https://docs.astral.sh/ruff/rules/multi-line-implicit-string-concatenation/
98
145
]
99
146
100
- [tool .ruff .lint ]
101
- preview = true
102
-
103
- [tool .ruff .lint .pylint ]
104
- max-args = 10
105
-
106
147
[tool .ruff .lint .mccabe ]
107
148
max-complexity = 10
108
149
109
150
[tool .ruff .lint .pydocstyle ]
110
151
convention = " google"
111
152
153
+ [tool .ruff .lint .pylint ]
154
+ max-args = 10
155
+
156
+ [tool .ruff .format ]
157
+ docstring-code-format = true
158
+
159
+ [tool .uv ]
160
+ reinstall-package = [" zwog" ]
161
+
112
162
[tool .pytest .ini_options ]
113
163
minversion = " 6.0"
114
- addopts = " -v"
164
+ addopts = """ \
165
+ -v \
166
+ --cov-config=pyproject.toml \
167
+ --cov=zwog \
168
+ --cov=tests \
169
+ --cov-report=term-missing \
170
+ --no-cov-on-fail \
171
+ """
115
172
testpaths = [
116
173
" tests" ,
117
174
]
118
175
176
+ [tool .coverage .run ]
177
+ branch = true
178
+ relative_files = true
179
+
180
+ [tool .coverage .report ]
181
+ fail_under = 90
182
+
119
183
[tool .mypy ]
120
- python_version = " 3.8 "
184
+ python_version = " 3.10 "
121
185
follow_imports = " normal"
122
186
ignore_missing_imports = true
123
187
check_untyped_defs = true
0 commit comments