11# === Metadata & Build System ===
2-
32[build-system ]
43requires = [
54 " setuptools" ,
@@ -22,7 +21,7 @@ keywords = [
2221]
2322license = { file = " LICENSE" }
2423authors = [
25- { name = " Shay Palachy Affek" , email = ' shay.palachy@gmail.com' },
24+ { name = " Shay Palachy Affek" , email = " shay.palachy@gmail.com" },
2625]
2726requires-python = " >=3.10"
2827classifiers = [
@@ -49,7 +48,6 @@ dependencies = [
4948 " pympler>=1" ,
5049 " watchdog>=2.3.1" ,
5150]
52-
5351optional-dependencies.all = [
5452 " boto3>=1.26" ,
5553 " pymongo>=4" ,
@@ -70,31 +68,24 @@ optional-dependencies.sql = [
7068]
7169urls.Source = " https://github.com/python-cachier/cachier"
7270# --- setuptools ---
73-
7471scripts.cachier = " cachier.__main__:cli"
7572
7673[tool .setuptools ]
7774include-package-data = true
78-
79- [tool .setuptools .dynamic ]
80- version = { attr = " cachier._version.__version__" }
81-
82- [tool .setuptools .packages .find ]
83- where = [
75+ dynamic.version = { attr = " cachier._version.__version__" }
76+ packages.find.where = [
8477 " src" ,
85- ] # list of folders that contain the packages (["."] by default)
86- include = [
78+ ] # list of folders that contain the packages (["."] by default)
79+ packages.find. include = [
8780 " cachier*" ,
88- ] # package names should match these glob patterns (["*"] by default)
89- namespaces = false # to disable scanning PEP 420 namespaces (true by default)
81+ ] # package names should match these glob patterns (["*"] by default)
82+ packages.find. namespaces = false # to disable scanning PEP 420 namespaces (true by default)
9083
9184# === Linting & Formatting ===
92-
9385[tool .black ]
9486line-length = 120
9587
9688# --- ruff ---
97-
9889[tool .ruff ]
9990target-version = " py310"
10091line-length = 120
@@ -113,12 +104,12 @@ lint.select = [
113104 " D" , # see: https://pypi.org/project/pydocstyle
114105 " E" ,
115106 " F" , # see: https://pypi.org/project/pyflakes
116- " I" , # see: https://pypi.org/project/isort/
107+ " I" , # see: https://pypi.org/project/isort/
117108 " RUF100" , # alternative to yesqa
118- # "N", # see: https://pypi.org/project/pep8-naming
119- " S" , # see: https://pypi.org/project/flake8-bandit
109+ # "N", # see: https://pypi.org/project/pep8-naming
110+ " S" , # see: https://pypi.org/project/flake8-bandit
120111 " SIM" ,
121- " W" , # see: https://pypi.org/project/pycodestyle
112+ " W" , # see: https://pypi.org/project/pycodestyle
122113]
123114lint.extend-select = [
124115 " A" , # see: https://pypi.org/project/flake8-builtins
@@ -156,13 +147,12 @@ lint.per-file-ignores."tests/**" = [
156147lint.unfixable = [
157148 " F401" ,
158149]
159-
160150# --- flake8 ---
161- # [tool.ruff.pydocstyle]
151+ # [tool.ruff.pydocstyle]
162152# # Use Google-style docstrings.
163- # convention = "google"
164- # [tool.ruff.pycodestyle]
165- # ignore-overlong-task-comments = true
153+ # convention = "google"
154+ # [tool.ruff.pycodestyle]
155+ # ignore-overlong-task-comments = true
166156# Unlike Flake8, default to a complexity level of 10.
167157lint.mccabe.max-complexity = 10
168158
@@ -173,28 +163,26 @@ wrap-summaries = 120
173163wrap-descriptions = 120
174164blank = true
175165
166+ [tool .pytest ]
176167# === Testing ===
177-
178168# --- pytest ---
179-
180- [tool .pytest .ini_options ]
181- testpaths = [
169+ ini_options.testpaths = [
182170 " cachier" ,
183171 " tests" ,
184172]
185- norecursedirs = [
173+ ini_options. norecursedirs = [
186174 " dist" ,
187175 " build" ,
188176]
189- addopts = [
177+ ini_options. addopts = [
190178 " --color=yes" ,
191179 " -r a" ,
192180 " -v" ,
193181 " -s" ,
194182 " -W error" ,
195183 # Note: parallel execution is opt-in via -n/--numprocesses (pytest-xdist)
196184]
197- markers = [
185+ ini_options. markers = [
198186 " mongo: test the MongoDB core" ,
199187 " memory: test the memory core" ,
200188 " pickle: test the pickle core" ,
@@ -208,29 +196,26 @@ markers = [
208196 " seriallocal: local core tests that should run serially" ,
209197]
210198
211- [tool .coverage .report ]
212- show_missing = true
213- # Regexes for lines to exclude from consideration
214- exclude_lines = [
215- " pragma: no cover" , # Have to re-enable the standard pragma
216- " raise NotImplementedError" , # Don't complain if tests don't hit defensive assertion code:
217- " if TYPE_CHECKING:" , # Is only true when running mypy, not tests
218- ]
199+ [tool .coverage ]
219200# Parallel test execution configuration
220201# Use: pytest -n auto (for automatic worker detection)
221202# Or: pytest -n 4 (for specific number of workers)
222203# Memory tests are safe to run in parallel by default
223204# Pickle tests require isolation (handled by conftest.py fixture)
224-
225205# --- coverage ---
226-
227- [tool .coverage .run ]
228- branch = true
229- parallel = true
206+ run.branch = true
230207# dynamic_context = "test_function"
231- omit = [
232- " tests/*" ,
233- " src/cachier/_version.py" ,
234- " src/cachier/__init__.py" ,
208+ run.omit = [
235209 " **/scripts/**" ,
210+ " src/cachier/__init__.py" ,
211+ " src/cachier/_version.py" ,
212+ " tests/*" ,
213+ ]
214+ run.parallel = true
215+ # Regexes for lines to exclude from consideration
216+ report.exclude_lines = [
217+ " if TYPE_CHECKING:" , # Is only true when running mypy, not tests
218+ " pragma: no cover" , # Have to re-enable the standard pragma
219+ " raise NotImplementedError" , # Don't complain if tests don't hit defensive assertion code:
236220]
221+ report.show_missing = true
0 commit comments