Skip to content

Commit afbc4c6

Browse files
committed
update pyproject.toml
1 parent ce06ef0 commit afbc4c6

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

pyproject.toml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dependencies = [
3333
]
3434
dynamic = ["version"]
3535

36-
[project.optional-dependencies]
36+
[dependency-groups]
3737
pandas = ["pandas>=2.2.1"]
3838
dev = [
3939
"pylint>=3.1.0",
@@ -129,3 +129,38 @@ branch = true
129129
exclude_also = [
130130
'if TYPE_CHECKING:',
131131
]
132+
133+
[tool.poe.tasks.lint]
134+
help = "Lint code (with ruff)"
135+
# --no-fix does override --fix in ruff, if --check is given to poe.
136+
cmd = 'ruff check --fix --show-fixes ${check:+ --no-fix}'
137+
args=[{name = "check", type="boolean", help= "Does not correct files, only warns"}]
138+
139+
[tool.poe.tasks.format]
140+
help = "Format code (with ruff)"
141+
cmd = 'ruff format ${check:+ --diff}'
142+
args=[{name = "check", type="boolean", help= "Does not correct files, only warns"}]
143+
144+
[tool.poe.tasks.sort]
145+
help = "Sort imports (with ruff)"
146+
cmd = 'ruff check --select I --fix --show-fixes ${check:+ --no-fix}'
147+
args=[{name = "check", type="boolean", help= "Does not correct files, only warns"}]
148+
149+
[tool.poe.tasks.tests]
150+
help = "Run tests"
151+
cmd = "pytest"
152+
153+
[tool.poe.tasks.cover]
154+
help = "Run tests (and gather coverage)"
155+
cmd = "coverage run"
156+
157+
[tool.poe.tasks.report]
158+
help = "Generate coverage report. Will use data from a previous cover command."
159+
sequence = [
160+
{cmd="coverage report"},
161+
{cmd="coverage report --fail-under 80 --omit='cheese'"}
162+
]
163+
164+
[tool.poe.tasks.coverage]
165+
help = "Run coverage *and* generate report"
166+
sequence = ["cover", "report"]

0 commit comments

Comments
 (0)