-
-
Notifications
You must be signed in to change notification settings - Fork 58
/
pyproject.toml
150 lines (120 loc) · 3.96 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
[tool.poetry]
name = "poethepoet"
version = "0.19.0"
description = "A task runner that works well with poetry."
authors = ["Nat Noordanus <n@noordan.us>"]
readme = "README.md"
license = "MIT"
repository = "https://github.com/nat-n/poethepoet"
homepage = "https://github.com/nat-n/poethepoet"
documentation = "http://poethepoet.natn.io/"
keywords = ["automation", "tasks", "task-runner", "plugin", "poetry", "poe"]
classifiers = ["Topic :: Software Development :: Build Tools"]
[tool.poetry.dependencies]
python = ">=3.8"
pastel = "^0.2.1"
tomli = ">=1.2.2"
poetry = {version = "^1.0", allow-prereleases = true, optional = true}
[tool.poetry.group.dev.dependencies]
black = "^23.3.0"
bpython = "^0.24"
isort = "^5.12.0"
mypy = "^1.1.1"
pylint = "^2.13.0"
pytest = "^7.1.2"
pytest-cov = "^3.0.0"
rstcheck = "^3.5.0"
virtualenv = "^20.14.1"
poe_test_helpers = { path = "./tests/fixtures/packages/poe_test_helpers" }
[tool.poetry.group.docs.dependencies]
furo = "^2023.3.27"
livereload = "^2.6.3"
sphinx = "^6.1.3"
sphinx-copybutton = "^0.5.1"
sphinxext-opengraph = "^0.8.1"
[tool.poetry.extras]
poetry_plugin = ["poetry"]
[tool.poetry.scripts]
poe = "poethepoet:main"
[tool.poetry.plugins."poetry.application.plugin"]
poethepoet = "poethepoet.plugin:PoetryPlugin"
[tool.poe.tasks]
_clean_docs.script = "shutil:rmtree('docs/_build', ignore_errors=1)"
[tool.poe.tasks.format-isort]
help = "Run isort on the code base"
cmd = "isort ."
[tool.poe.tasks.format-black]
help = "Run black on the code base"
cmd = "black ."
[tool.poe.tasks.format]
help = "Run formating tools on the code base"
sequence = ["format-isort", "format-black"]
[tool.poe.tasks.docs]
help = "Build the docs using Sphinx"
cmd = "sphinx-build docs docs/_build"
deps = ["_clean_docs"]
[tool.poe.tasks.docs-serve]
help = "Serves the docs locally with livereload"
script = "docs:serve"
cwd = "./docs"
deps = ["docs"]
[tool.poe.tasks.docs-check]
help = "Validate rst syntax in the docs"
sequence = [
{ cmd = "rstcheck -r docs --ignore-roles bash,toml,sh,python --ignore-substitutions V" },
"docs -b linkcheck"
]
[tool.poe.tasks.clean]
help = "Remove generated files"
cmd = """
# multiline commands including comments work too!
rm -rf .coverage
.mypy_cache
.pytest_cache
./**/__pycache__
dist
htmlcov
./docs/_build
./tests/fixtures/simple_project/venv
./tests/fixtures/venv_project/myvenv
./tests/fixtures/poetry_plugin_project/**/.venv
./tests/temp
"""
[tool.poe.tasks.test]
help = "Run unit and feature tests"
cmd = "pytest --cov=poethepoet"
[tool.poe.tasks.test-quick]
help = "Run unit and feature tests, excluding slow ones"
cmd = "pytest --cov=poethepoet -m \"not slow\""
[tool.poe.tasks.types]
help = "Run the type checker"
cmd = "mypy poethepoet --ignore-missing-imports"
[tool.poe.tasks.lint]
help = "Run the linter"
cmd = "pylint poethepoet"
[tool.poe.tasks.style-black]
help = "Validate black code style"
cmd = "black . --check --diff"
[tool.poe.tasks.style-isort]
help = "Validate isort code style"
cmd = "isort . --check --diff"
[tool.poe.tasks.style]
help = "Validate code style"
sequence = ["style-isort", "style-black"]
[tool.poe.tasks.check]
help = "Run all checks on the code base"
sequence = ["docs-check", "style", "types", "lint", "test"]
[tool.poe.tasks.poe]
help = "Execute poe from this repo (useful for testing)"
script = "poethepoet:main"
[tool.coverage.report]
omit = ["**/site-packages/**", "poethepoet/completion/*", "poethepoet/plugin.py"]
[tool.pytest.ini_options]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')"
]
[tool.isort]
profile = "black"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"