1+ [build-system ]
2+ requires = [" setuptools>=42" , " wheel" ]
3+ build-backend = " setuptools.build_meta"
4+
5+ [project ]
6+ name = " patterns"
7+ description = " A collection of design patterns and idioms in Python."
8+ version = " 0.1.0"
9+ readme = " README.md"
10+ requires-python = " >=3.9"
11+ license = {text = " MIT" }
12+ classifiers = [
13+ " Programming Language :: Python :: 3.9" ,
14+ " Programming Language :: Python :: 3.10" ,
15+ " Programming Language :: Python :: 3.11" ,
16+ " Programming Language :: Python :: 3.12" ,
17+ " Programming Language :: Python :: 3.13" ,
18+ ]
19+
20+ [project .optional-dependencies ]
21+ dev = [" pytest" , " pytest-cov" , " pytest-randomly" , " flake8" , " mypy" , " coverage" ]
22+
23+ [tool .setuptools ]
24+ packages = [" patterns" ]
25+
26+ [tool .pytest .ini_options ]
27+ filterwarnings = [
28+ " ignore::Warning:.*test class 'TestRunner'.*"
29+ ]
30+ # Adding settings from tox.ini for pytest
31+ testpaths = [" tests" , " patterns" ]
32+ python_files = [" test_*.py" , " *_test.py" ]
33+ doctest_modules = [" patterns" ]
34+ randomly_seed = 1234
35+ log_level = " INFO"
36+
37+ [tool .coverage .run ]
38+ branch = true
39+ source = [" patterns" ]
40+
41+ [tool .coverage .report ]
42+ # Regexes for lines to exclude from consideration
43+ exclude_lines = [
44+ " def __repr__" ,
45+ " if self\\ .debug" ,
46+ " raise AssertionError" ,
47+ " raise NotImplementedError" ,
48+ " if 0:" ,
49+ " if __name__ == .__main__.:" ,
50+ " @(abc\\ .)?abstractmethod"
51+ ]
52+ ignore_errors = true
53+
54+ [tool .coverage .html ]
55+ directory = " coverage_html_report"
56+
57+ [tool .mypy ]
58+ python_version = " 3.12"
59+ ignore_missing_imports = true
60+
61+ [tool .flake8 ]
62+ max-line-length = 120
63+ ignore = [" E266" , " E731" , " W503" ]
64+ exclude = [" venv*" ]
65+
66+ [tool .tox ]
67+ legacy_tox_ini = """
68+ [tox]
69+ envlist = py312,cov-report
70+ skip_missing_interpreters = true
71+ usedevelop = true
72+
73+ [testenv]
74+ setenv =
75+ COVERAGE_FILE = .coverage.{envname}
76+ deps =
77+ -r requirements-dev.txt
78+ commands =
79+ flake8 --exclude="venv/,.tox/" patterns/
80+ pytest --randomly-seed=1234 --doctest-modules patterns/
81+ pytest -s -vv --cov=patterns/ --log-level=INFO tests/
82+
83+ [testenv:cov-report]
84+ setenv =
85+ COVERAGE_FILE = .coverage
86+ deps = coverage
87+ commands =
88+ coverage combine
89+ coverage report
90+ """
0 commit comments