-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
184 lines (163 loc) · 4.46 KB
/
pyproject.toml
File metadata and controls
184 lines (163 loc) · 4.46 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
[build-system]
requires = ["hatchling>=1,<2", "hatch-vcs>=0.4,<1"]
build-backend = "hatchling.build"
[project]
name = "isic-metadata"
description = ""
readme = "README.md"
requires-python = ">=3.12"
license = "Apache-2.0"
license-files = ["LICENSE", "NOTICE"]
maintainers = [{ name = "Kitware, Inc.", email = "kitware@kitware.com" }]
keywords = [
"isic",
"isic-archive",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
dependencies = [
"pydantic>=2.4",
]
dynamic = ["version"]
[project.urls]
Repository = "https://github.com/ImageMarkup/isic-metadata"
"Bug Reports" = "https://github.com/ImageMarkup/isic-metadata/issues"
[dependency-groups]
dev = [
"tox==4.53.0",
"tox-uv==1.35.1",
]
lint = [
"ruff==0.15.11",
]
type = [
"mypy==1.20.2",
]
test = [
"hypothesis==6.152.1",
"pydantic-to-pyarrow==0.1.6",
"pytest==9.0.3",
"pytest-cov==7.1.0",
"pytest-mock==3.15.1",
]
[tool.hatch.build]
only-include = [
"isic_metadata",
]
[tool.hatch.version]
source = "vcs"
[tool.ruff]
line-length = 100
[tool.ruff.lint]
select = ["ALL"]
ignore = [
# Incompatible with formatter
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"COM812", # missing-trailing-comma
"COM819", # prohibited-trailing-comma
"D206", # docstring-tab-indentation
"D300", # triple-single-quotes
"E111", # indentation-with-invalid-multiple
"E114", # indentation-with-invalid-multiple-comment
"E117", # over-indented
"ISC001", # single-line-implicit-string-concatenation
"ISC002", # multi-line-implicit-string-concatenation
"Q", # flake8-quotes
"W191", # tab-indentation
# Incompatible with Django
"A003", # builtin-attribute-shadowing
"ARG001", # unused-function-argument
"ARG002", # unused-method-argument
"RUF012", # mutable-class-default
# Overly burdensome
"ANN", # flake8-annotations
"D1", # undocumented-*
"EM", # flake8-errmsg
"ERA001", # commented-out-code
"FIX", # flake8-fixme
"RET505", # superfluous-else-return
"RET506", # superfluous-else-raise
"RET507", # superfluous-else-continue
"RET508", # superfluous-else-break
"TD002", # missing-todo-author
"TD003", # missing-todo-link
"TRY003", # raise-vanilla-args
# Project-specific
]
[tool.ruff.lint.per-file-ignores]
"**/tests/**" = [
"DJ007", # django-all-with-model-form
"DJ008", # django-model-without-dunder-str
"INP001", # implicit-namespace-package
"PLR0913", # too-many-arguments
"PLR2004", # magic-value-comparison
"S", # flake8-bandit
"SLF001", # private-member-access
]
[tool.ruff.lint.flake8-boolean-trap]
extend-allowed-calls = ["pydantic.Field", "django.db.models.Value"]
[tool.ruff.lint.flake8-bugbear]
extend-immutable-calls = ["ninja.Query"]
[tool.ruff.lint.flake8-self]
extend-ignore-names = ["_base_manager", "_default_manager", "_meta"]
[tool.ruff.lint.flake8-type-checking]
runtime-evaluated-base-classes = ["pydantic.BaseModel"]
runtime-evaluated-decorators = ["pydantic.validate_call"]
[tool.ruff.lint.isort]
# Sort by name, don't cluster "from" vs "import"
force-sort-within-sections = true
# Deferred annotations allows TC* rules to move more imports into TYPE_CHECKING blocks
required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.pydocstyle]
convention = "pep257"
[tool.mypy]
files = [
"isic_metadata",
"tests",
]
check_untyped_defs = true
show_error_codes = true
strict = true
warn_redundant_casts = true
warn_unused_configs = true
warn_unused_ignores = true
mypy_path = [
# Use the same pythonpath for MyPy as for Pytest
"tests",
]
[[tool.mypy.overrides]]
module = [
]
ignore_missing_imports = true
[tool.pytest.ini_options]
testpaths = ["tests"]
# Allow test utility modules to be imported without adding the root directory to the pythonpath,
# which would cause the local "isic_metadata" module to shadow the install.
pythonpath = ["tests"]
addopts = [
# Use the Pytest-recommended "importlib" mode
"--import-mode=importlib",
"--strict-config",
"--strict-markers",
"--showlocals",
"--verbose",
"--cov",
]
filterwarnings = [
"error",
# pytest often causes unclosed socket warnings
'ignore:unclosed <socket\.socket:ResourceWarning',
]
[tool.coverage.paths]
source = [
"isic_metadata/",
".tox/**/site-packages/isic_metadata/",
]