Repository navigation
Expand file tree
/
Copy pathpyproject.toml.jinja
More file actions
126 lines (116 loc) · 2.94 KB
/
Copy pathpyproject.toml.jinja
File metadata and controls
126 lines (116 loc) · 2.94 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
121
122
123
124
125
126
[project]
name = "{{ project_name }}"
version = "{{ version }}"
description = "{{ description }}"
readme = "README.md"
requires-python = ">=3.13"
license = { file = "LICENSE" }
authors = [
{ name = "{{ author_name }}", email = "{{ author_email }}" }
]
maintainers = [
{ name = "{{ author_name }}", email = "{{ author_email }}" }
]
dependencies = []
[project.urls]
Homepage = "{{ repo_url }}"
Repository = "{{ repo_url }}"
[project.optional-dependencies]
dev = [
"flowr>=1.2.1",
"pytest>=9.0.3",
"pytest-cov>=6.1.1",
"pytest-html>=4.0.0",
"pytest-mock>=3.14.0",
"pytest-vcr>=1.0.2",
"vcrpy>=6.0.1",
"ruff>=0.11.5",
"taskipy>=1.14.1",
"hypothesis>=6.148.4",
"pyright>=1.1.407",
"mypy>=1.13.0",
"safety>=3.7.0",
]
[tool.flowr]
flows_dir = ".flowr/flows"
sessions_dir = ".cache/sessions"
default_flow = "pipeline-flow"
default_session = "default"
[tool.setuptools]
packages = ["{{ package_name }}"]
[tool.ruff.lint]
ignore = []
select = [
"A",
"ASYNC",
"B",
"C9",
"DTZ",
"ERA",
"F",
"G",
"LOG",
"PYI",
"S",
]
mccabe.max-complexity = 10
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["S101", "S404"]
[tool.pytest.ini_options]
minversion = "6.0"
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"bug: marks tests that reproduce a reported defect (deselect with '-m \"not bug\"')",
"pending: contract test defined in discovery but not yet implemented; auto-skipped (the backlog). Remove the marker to activate (red). Query with: -m pending",
]
addopts = """
--maxfail=10 \
--color=yes \
--tb=short \
-qq \
"""
testpaths = ["tests"]
python_files = ["*_test.py"]
python_functions = ["test_*"]
[tool.coverage.report]
fail_under = 80
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"if 0:",
"if __name__ == .__main__.:",
]
[tool.taskipy.tasks]
run = "python -m {{ package_name }}"
test-build = """\
pytest \
--doctest-modules \
--cov-config=pyproject.toml \
--cov-report html:docs/coverage \
--cov-report term:skip-covered \
--cov={{ package_name }} \
--hypothesis-show-statistics \
--html=docs/tests/report.html \
--self-contained-html \
"""
test = """\
pytest \
--cov-config=pyproject.toml \
--cov-report= \
--cov={{ package_name }}
"""
test-fast = "pytest -m \"not slow\" -q --no-header --tb=no"
test-slow = "pytest -m slow"
ruff-check = "ruff check ."
ruff-format = "ruff format ."
ruff-format-check = "ruff format . --check"
lint = "task ruff-check"
lint-merge = "ruff check --extend-select SIM,RUF . && ruff format ."
strip-docstrings = "python scripts/strip_docstrings.py"
static-check = "pyright {{ package_name }} tests"
stubtest = "python -m mypy.stubtest {{ package_name }} tests"
validate-flows = "bash -c 'for f in .flowr/flows/*.yaml; do python -m flowr validate \"$f\"; done'"
release-check = "task lint && task static-check && task stubtest && task test"