forked from ssc-oscar/oscar.py
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
133 lines (116 loc) · 2.58 KB
/
Copy pathpyproject.toml
File metadata and controls
133 lines (116 loc) · 2.58 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
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
[tool.poetry]
name = "python-woc"
version = "0.4.1"
description = "Python interface for World of Code"
authors = ["Runzhi He <rzhe@pku.edu.cn>", "Marat <marat@cmu.edu>"]
license = "GPL-3.0"
readme = "README.md"
packages = [{ include = "woc" }]
include = [
{ path = "woc/**/*.so", format = "wheel" },
{ path = "lib/*", format = "sdist" },
]
[tool.poetry.build]
script = "setup.py"
generate-setup-file = false
[tool.poetry.dependencies]
python = "^3.8"
python-lzf = "^0.2.4"
chardet = "^5.2.0"
tqdm = "^4.65.0"
rapidgzip = "^0.14.3"
httpx = "^0.28.1"
[tool.poetry.group.build.dependencies]
cython = "^3.1.4"
[tool.poetry.group.dev.dependencies]
pytest = "^8.2.2"
pytest-cov = "^5.0.0"
pytest-asyncio = "^0.24.0"
coverage = { extras = ["toml"], version = "^7.5.3" }
# bandit = "^1.7.8"
# docformatter = "^1.7.5"
ruff = "^0.8.4" # <- ruff is powerful enough to be the only linter
# sphinx = "^7.1.2"
# sphinx-rtd-theme = "^1.0.0"
# sphinx-autobuild = "^2021.3.14"
# sphinx-pyproject = "^0.3.0"
# sphinx-autodoc-typehints = "^1.25.3"
pdoc = "^14.5.0" # <- drop sphinx, too many deps and rst is not fun
pre-commit = "^3.5"
mypy = "^1.5.0"
[build-system]
requires = ["poetry-core", "Cython>=3.1.4,<4.0.0", "setuptools>=42"]
build-backend = "poetry.core.masonry.api"
### Test and coverage ###
[tool.pytest.ini_options]
addopts = "-ra -q"
testpaths = ["tests"]
markers = ["asyncio"]
asyncio_mode="auto"
asyncio_default_fixture_loop_scope = "function"
[tool.coverage.report]
show_missing = true
omit = ["tests/*"]
[tool.coverage.run]
plugins = ["Cython.Coverage"]
### Documentation ###
# [tool.sphinx-autobuild]
# watch = ["woc", "docs"]
### Formatting and linting ###
# [tool.docformatter]
# recursive = true
# wrap-summaries = 88
# wrap-descriptions = 88
# style = 'sphinx'
# blank = true
[tool.ruff]
target-version = "py38"
line-length = 90
extend-exclude = ["__pycache__", "build", "dist"]
[tool.ruff.lint]
# rules ref: https://docs.astral.sh/ruff
extend-select = [
"C4",
"D201",
"D204",
"D205",
"D206",
"D210",
"D211",
"D213",
"D300",
"D419",
"E",
"F",
"G010",
"I001",
"INP001",
"N805",
"PERF101",
"PERF102",
"PERF401",
"PERF402",
"PGH004",
"PGH005",
"PIE794",
"PIE796",
"PIE807",
"PIE810",
"RUF015",
"RUF100",
]
# disable line length check, as ruff format already handles that
ignore = ["E203", "E501", "E741"]
[tool.ruff.lint.per-file-ignores]
# loose checks for test files
"tests/**/*.py" = [
"S101",
"ARG",
"FBT",
"PLR2004",
"S311",
"D",
"F405",
"F403",
"F841",
]