-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
74 lines (62 loc) · 1.59 KB
/
pyproject.toml
File metadata and controls
74 lines (62 loc) · 1.59 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
[tool.poetry]
name = "project-euler"
version = "0.1.0"
description = ""
authors = ["Alex Clerc <alex.clerc@res-group.com>"]
readme = "README.md"
packages = [{include = "project_euler"}]
[tool.poetry.dependencies]
python = ">=3.11,<4.0"
numpy = "^1.26.1"
num2words = "^0.5.13"
[tool.poetry.group.dev.dependencies]
ruff = "^0.1.3"
mypy = "^1.6.1"
pytest = "^7.4.3"
pytest-cov = "^4.1.0"
poethepoet = "^0.24.1"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
line-length = 120
target-version = "py312"
show-fixes = true
select = [ # see https://beta.ruff.rs/docs/rules/
"ALL"
]
ignore = ["D","T20","PGH004", "COM812", "ISC001"]
[tool.ruff.per-file-ignores]
"tests/**/*.py" = ["S101"] # Ignore use of `assert` in tests
[tool.mypy]
python_version = 3.12
[[tool.mypy.overrides]]
module = [
"num2words",
]
ignore_missing_imports = true
[tool.coverage.report]
exclude_lines = ["if __name__ == .__main__.:"]
[tool.poe.tasks]
[tool.poe.tasks.lint]
help = "Runs formater and linter"
sequence = [
{ shell = "poetry run ruff format ." },
{ shell = "poetry run ruff check . --fix" },
{ shell = "poetry run mypy ." }
]
[tool.poe.tasks.lint-check]
help = "Checks formatter and linter"
sequence = [
{ shell = "poetry run ruff format . --check" },
{ shell = "poetry run ruff check ." },
{ shell = "poetry run mypy ." }
]
[tool.poe.tasks.test]
help = "Runs unit tests"
sequence = [
{ cmd = "poetry run pytest --cov=project_euler ./tests" },
]
[tool.poe.tasks.all]
help = "Run all required pre-push commands"
sequence = [{ ref = "lint" }, { ref = "test" }]