forked from faif/python-patterns
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
120 lines (106 loc) · 2.78 KB
/
pyproject.toml
File metadata and controls
120 lines (106 loc) · 2.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
[build-system]
requires = ["setuptools >= 77.0.3"]
build-backend = "setuptools.build_meta"
[project]
name = "python-patterns"
description = "A collection of design patterns and idioms in Python."
version = "0.1.0"
readme = "README.md"
requires-python = ">=3.10"
classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies= [
]
maintainers=[
{ name="faif" }
]
[project.urls]
Homepage = "https://github.com/faif/python-patterns"
Repository = "https://github.com/faif/python-patterns"
"Bug Tracker" = "https://github.com/faif/python-patterns/issues"
Contributors = "https://github.com/faif/python-patterns/graphs/contributors"
[project.optional-dependencies]
dev = [
"mypy",
"pipx>=1.7.1",
"pyupgrade",
"pytest>=6.2.0",
"pytest-cov>=2.11.0",
"pytest-randomly>=3.1.0",
"black>=25.1.0",
"build>=1.2.2",
"isort>=5.7.0",
"flake8>=7.1.0",
"tox>=4.25.0"
]
[tool.setuptools]
packages = ["patterns"]
[tool.pytest.ini_options]
filterwarnings = [
"ignore::Warning:.*test class 'TestRunner'.*"
]
# Adding settings from tox.ini for pytest
testpaths = ["tests"]
#testpaths = ["tests", "patterns"]
python_files = ["test_*.py", "*_test.py"]
# Enable doctest discovery in patterns directory
addopts = "--doctest-modules --randomly-seed=1234 --cov=patterns --cov-report=term-missing"
doctest_optionflags = ["ELLIPSIS", "NORMALIZE_WHITESPACE"]
log_level = "INFO"
[tool.coverage.run]
branch = true
source = ["./"]
#source = ["patterns"]
# Ensure coverage data is collected properly
relative_files = true
parallel = true
dynamic_context = "test_function"
data_file = ".coverage"
[tool.coverage.report]
# Regexes for lines to exclude from consideration
exclude_lines = [
"def __repr__",
"if self\\.debug",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"@(abc\\.)?abstractmethod"
]
ignore_errors = true
[tool.coverage.html]
directory = "coverage_html_report"
[tool.mypy]
python_version = "3.12"
ignore_missing_imports = true
[tool.flake8]
max-line-length = 120
ignore = ["E266", "E731", "W503"]
exclude = ["venv*"]
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py312,cov-report
skip_missing_interpreters = true
usedevelop = true
#[testenv]
#setenv =
# COVERAGE_FILE = .coverage.{envname}
#deps =
# -r requirements-dev.txt
#commands =
# flake8 --exclude="venv/,.tox/" patterns/
# coverage run -m pytest --randomly-seed=1234 --doctest-modules patterns/
# coverage run -m pytest -s -vv --cov=patterns/ --log-level=INFO tests/
#[testenv:cov-report]
#setenv =
# COVERAGE_FILE = .coverage
#deps = coverage
#commands =
# coverage combine
# coverage report
#"""