-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
125 lines (105 loc) · 3 KB
/
pyproject.toml
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
[build-system]
requires = ["setuptools"]
backend = "setuptools.build_meta"
[project]
name = "dev-cmd"
requires-python = ">=3.8"
dependencies = [
"aioconsole",
"ansicolors",
"colorama; sys_platform == 'win32'",
"packaging",
"tomli; python_version < '3.11'",
"typing-extensions"
]
authors = [
{name = "John Sirois", email = "[email protected]"},
]
description = "A simple development command runner for Python projects."
readme = "README.md"
license = {file = "LICENSE"}
keywords = ["automation", "command", "runner", "testing"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Operating System :: Unix",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Build Tools",
"Topic :: Utilities",
]
dynamic = ["version"]
[project.urls]
Repository = "https://github.com/jsirois/dev-cmd"
"Bug Tracker" = "https://github.com/jsirois/dev-cmd/issues"
Changelog = "https://github.com/jsirois/dev-cmd/blob/main/CHANGES.md"
[project.scripts]
dev-cmd = "dev_cmd.run:main"
[tool.setuptools.dynamic]
version = {attr = "dev_cmd.__version__"}
[tool.setuptools.packages.find]
where = ["."]
include = ["dev_cmd*"]
[dependency-groups]
dev = [
"ansicolors",
"mypy",
"pytest",
"ruff",
"types-colorama",
"types-setuptools",
"types-tqdm",
]
[[tool.mypy.overrides]]
module = ["aioconsole.*"]
follow_untyped_imports = true
[[tool.mypy.overrides]]
module = ["colors.*"]
follow_untyped_imports = true
[tool.ruff]
line-length = 100
[tool.ruff.lint]
extend-select = ["I"]
[tool.uv]
required-version = ">=0.5.19"
[tool.dev-cmd.commands]
fmt = ["ruff", "format"]
check-fmt = ["ruff", "format", "--diff"]
lint = ["ruff", "check", "--fix"]
check-lint = ["ruff", "check"]
type-check = [
"mypy",
"--python-version", "{-py:{markers.python_version}}",
"--cache-dir", ".mypy_cache_{markers.python_version}",
"setup.py",
"dev_cmd",
"tests",
]
[tool.dev-cmd.commands.test]
args = ["pytest"]
cwd = "tests"
accepts-extra-args = true
[tool.dev-cmd.tasks]
checks = [
"fmt",
"lint",
# Parallelizing the type checks and test is safe (they don't modify files), and it nets a ~3x
# speedup over running them all serially.
["type-check-py3.{8..13}", "test"],
]
# None of the CI checks modify files; so they can all be run in parallel which nets a ~1.5x speedup.
ci = [["check-fmt", "check-lint", "type-check", "test"]]
[tool.dev-cmd]
default = "checks"
exit-style = "immediate"