-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
103 lines (85 loc) · 2.65 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
[tool.poetry]
name = "idae"
description = "A PEP 772 implementation"
authors = ["Bryan Hu <[email protected]>"]
version = "1.1.0"
readme = "README.md"
license = "GPL-3.0-or-later"
classifiers = [
# Get the list of trove classifiers here: https://pypi.org/classifiers/
"Programming Language :: Python :: Implementation :: CPython",
"Typing :: Typed",
"Operating System :: OS Independent",
"Development Status :: 5 - Production/Stable",
"Natural Language :: English",
]
homepage = "https://github.com/ThatXliner/idae"
keywords = ["script", "cli", "python", "typer"] # Maximum of 5 keywords
[tool.poetry.dependencies]
python = "^3.8"
tomli = { version = "^2.0.1", python = "<3.11" }
platformdirs = ">=4.0.0"
packaging = ">=23.2"
findpython = "^0.4.0"
typer = { extras = ["all"], version = "^0.9.0" }
typing-extensions = { version = "^4.8.0", python = "<3.9" }
[tool.poetry.scripts]
idae = "idae.cli:cli"
[tool.poetry.group.dev.dependencies]
black = "^23.11.0"
hypothesis = "^6.90.0"
mypy = "^1.7.1"
pytest = "^7.4.3"
pytest-clarity = { version = "^1.0.1", markers = "platform_system != 'Windows'" }
pytest-cov = "^4.1.0"
shed = "^0.10.9"
toml = "^0.10.2"
ruff = "^0.4.5"
[tool.poe.tasks]
# Code linting
mypy = { cmd = "mypy idae --strict", help = "Run MyPy on codebase" }
ruff = { cmd = "ruff check idae", help = "Run Ruff on codebase" }
check_black = { cmd = "black idae --check" }
check_imports = { cmd = "ruff check idae --select I" }
style = ["check_black", "check_imports"]
codebase = ["ruff", "mypy"]
[tool.poe.tasks.format]
cmd = "shed"
help = "Format code"
[tool.poe.tasks.fix-ruff]
cmd = "ruff idae --fix"
help = "Ruff autofix"
[tool.poe.tasks.lint]
sequence = ["style", "codebase"]
help = "Lint codebase"
[tool.poe.tasks.test]
cmd = "pytest -vvv --cov=idae"
help = "Simply run test suite"
[tool.poe.tasks.ci]
cmd = "pytest -vvv --cov=idae --cov-report=xml"
help = "This workflow is for Github Actions"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
# Same as Black.
line-length = 88
target-version = "py38"
extend-exclude = ["tests/examples/*.py"]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
# "D", # "No docs"
"T20", # "Don't use print or pprint"
# "ANN", # Type annotation errors (or the lack of it)
"ANN101", # The type annotation for `self` is inferred
"FBT", # I actually don't know why this exists
# and it seems useless so ignore it
# Fix doc rule conflicts
"D203",
"D213",
"FIX002", # `TODO` comments are fine when linking to issues
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["S101", "D", "ANN201"]
"docs/conf.py" = ["INP001", "A001"]