-
Notifications
You must be signed in to change notification settings - Fork 17
/
pyproject.toml
92 lines (85 loc) · 3.04 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
[project]
name = "pyodk"
version = "1.1.0"
authors = [
{name = "github.com/getodk", email = "[email protected]"},
]
description = "The official Python library for ODK 🐍"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"requests==2.32.3", # HTTP with Central
"toml==0.10.2", # Configuration files
"pydantic>=2.6.4,<2.9.3", # Data validation. Ensure actions verify.yml matches range.
]
[project.optional-dependencies]
# Install with `pip install pyodk[dev]`.
dev = [
"ruff==0.7.1", # Format and lint
"openpyxl==3.1.5", # Create test XLSX files
"xlwt==1.3.0", # Create test XLS files
]
docs = [
"mkdocs==1.5.3",
"mkdocstrings==0.24.1",
"griffe==0.37",
"mkdocstrings-python==1.9.0",
"mkdocs-jupyter==0.24.6",
]
[project.urls]
Homepage = "https://pypi.python.org/pypi/pyodk/"
Repository = "https://github.com/getodk/pyodk/"
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"
[tool.flit.module]
name = "pyodk"
[tool.flit.sdist]
exclude = ["docs", "tests"]
[tool.ruff]
line-length = 90
target-version = "py312"
fix = true
show-fixes = true
output-format = "full"
src = ["pyodk", "tests"]
[tool.ruff.lint]
# By default, ruff enables flake8's F rules, along with a subset of the E rules.
select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"E", # pycodestyle error
# "ERA", # eradicate (commented out code)
"F", # pyflakes
"I", # isort
"PERF", # perflint
"PIE", # flake8-pie
"PL", # pylint
# "PTH", # flake8-use-pathlib
"PYI", # flake8-pyi
# "RET", # flake8-return
"RUF", # ruff-specific rules
"S", # flake8-bandit
# "SIM", # flake8-simplify
"TRY", # tryceratops
"UP", # pyupgrade
"W", # pycodestyle warning
]
ignore = [
"E501", # line-too-long (we have a lot of long strings)
"F821", # undefined-name (doesn't work well with type hints, ruff 0.1.11).
"PERF401", # manual-list-comprehension (false positives on selective transforms)
"PERF402", # manual-list-copy (false positives on selective transforms)
"PLR0911", # too-many-return-statements (complexity not useful to warn every time)
"PLR0912", # too-many-branches (complexity not useful to warn every time)
"PLR0913", # too-many-arguments (complexity not useful to warn every time)
"PLR0915", # too-many-statements (complexity not useful to warn every time)
"PLR2004", # magic-value-comparison (many tests expect certain numbers of things)
"PLW2901", # redefined-loop-name (usually not a bug)
"RUF001", # ambiguous-unicode-character-string (false positives on unicode tests)
"S310", # suspicious-url-open-usage (prone to false positives, ruff 0.1.11)
"S320", # suspicious-xmle-tree-usage (according to defusedxml author lxml is safe)
"S603", # subprocess-without-shell-equals-true (prone to false positives, ruff 0.1.11)
"TRY003", # raise-vanilla-args (reasonable lint but would require large refactor)
]
# per-file-ignores = {"tests/*" = ["E501"]}