-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
86 lines (78 loc) · 2.01 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
[project]
name = "whyqa"
version = "0.1.0"
description = "Answer Why Questions"
authors = [
{name = "Italo Silva", email = "[email protected]"},
]
dependencies = [
"openai<2.0,>=1.0",
"pandas<3.0,>=2.0",
"readchar<5.0,>=4.0",
"scikit-learn<2.0,>=1.0",
"tqdm<5.0,>=4.0",
"typer<1.0,>=0.9",
"pandas-stubs>=2.2.2.240603",
"scipy>=1.14.0",
"sentence-transformers>=3.0.1",
"pytest>=8.3.2",
"python-dotenv>=1.0.1",
"rouge-score>=0.1.2",
]
requires-python = ">=3.12"
readme = "README.md"
license = {text = "GPL-3.0-or-later"}
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.ruff.lint.isort]
known-first-party = ["whyqa"]
[tool.ruff.lint]
select = [
"E",
"F",
"I",
"ISC",
"N",
"PL",
"RUF",
"SIM",
"TRY",
"UP",
"W",
"ERA"
]
ignore = [
"PLR0911", # Too many return statements
"PLR0912", # Too many branches
"PLR0913", # Too many arguments
"PLR0915", # Too many statements
"PLR2004", # Magic value used in comparison
"E501", # Line too long (let Black take care of this)
"TRY003", # Long messages outside exception class
"SIM108", # Use ternary operation instead of if-else block
"UP007", # HFArgumentParser and Typer don't like T | None
"ISC001" # Incompatible with the formatter
]
[tool.ruff.format]
preview = true
[tool.pyright]
# Ruff also handles this, and it needs to be enabled there for fixAll to fix it,
# so we disable it here to avoid duplicate errors
reportUnusedImport = false
typeCheckingMode = "strict"
[tool.pdm]
distribution = true
[tool.pdm.scripts]
lint = {shell = "ruff check; ruff format; pyright ."}
[tool.pdm.dev-dependencies]
dev = [
"jupyterlab>=3.6.7",
"jupyterlab-vim>=0.16.0",
"jupyterlab-code-formatter>=2.2.1",
"jupyterlab-vimrc>=0.5.2",
# isort and Black are used for formatting in Jupyter Lab since the formatter doesn't
# support Ruff (it's implemented, but it doesn't work)
"isort>=5.13.2",
"black>=24.4.2",
]