-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathpyproject.toml
More file actions
174 lines (162 loc) · 4.62 KB
/
Copy pathpyproject.toml
File metadata and controls
174 lines (162 loc) · 4.62 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
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "cap-augmentation"
version = "0.5.0"
description = "Cut-and-paste augmentation for detection and segmentation datasets"
readme = "README.md"
requires-python = ">=3.10"
license = "GPL-3.0-only"
license-files = ["LICENSE"]
authors = [
{ name = "RocketFlash" }
]
keywords = [
"augmentation",
"data-augmentation",
"copy-paste",
"cut-and-paste",
"object-detection",
"instance-segmentation",
"semantic-segmentation",
"computer-vision",
"image-processing",
"bird-eye-view",
"bev",
"deep-learning",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Image Recognition",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"numpy",
"opencv-python",
"pyyaml",
]
[project.urls]
Homepage = "https://github.com/RocketFlash/cap-augmentation"
Repository = "https://github.com/RocketFlash/cap-augmentation"
Issues = "https://github.com/RocketFlash/cap-augmentation/issues"
Changelog = "https://github.com/RocketFlash/cap-augmentation/blob/main/CHANGELOG.md"
[project.optional-dependencies]
albumentations = [
"albumentations>=2.0.8,<3",
]
dataset = [
"easydict",
"matplotlib",
"pandas",
"scipy",
"tqdm",
]
histogram = [
"scikit-image>=0.19",
]
test = [
"albumentations>=2.0.8,<3",
"easydict",
"matplotlib",
"pandas",
"pytest>=8",
"pytest-cov>=5",
"scikit-image>=0.19",
"scipy",
"tqdm",
]
torchvision = [
"torch>=2",
"torchvision>=0.17",
]
viz = [
"matplotlib",
]
# Runtime convenience: every optional runtime feature in one go. Does NOT
# pull in dev tools (black/ruff/pytest) — use `[dev]` for those.
all = [
"albumentations>=2.0.8,<3",
"easydict",
"matplotlib",
"pandas",
"scikit-image>=0.19",
"scipy",
"torch>=2",
"torchvision>=0.17",
"tqdm",
]
# Contributor extras: lint + format tools layered on top of [test]. Install
# with `pip install -e ".[dev]"` to get the same toolchain CI runs.
dev = [
"black>=24",
"build>=1",
"ruff>=0.6",
]
[tool.setuptools.packages.find]
where = ["src"]
include = ["cap_augmentation*"]
[tool.setuptools.package-data]
"cap_augmentation" = ["py.typed"]
"cap_augmentation.bev" = ["default_calibration.yaml"]
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-p no:capture"
# `.` lets `from dataset_tools.* import ...` resolve in tests (the package
# is intentionally repo-only and not under src/). Don't drop it.
pythonpath = ["src", "."]
# Promote deprecation warnings from our optional integrations to errors so
# their next major versions can't sneak past us silently. The wrapper
# tests will fail loudly the moment Albumentations or Torchvision change
# an API we depend on, giving us an early signal to update the wrapper
# rather than finding out from a user bug report.
filterwarnings = [
"error::DeprecationWarning:albumentations",
"error::PendingDeprecationWarning:albumentations",
"error::DeprecationWarning:torchvision",
"error::PendingDeprecationWarning:torchvision",
]
[tool.coverage.run]
branch = true
source = ["cap_augmentation"]
omit = ["src/cap_augmentation/wrappers/tv.py"] # exercised in a separate CI job
[tool.coverage.report]
exclude_also = [
"raise NotImplementedError",
"if TYPE_CHECKING:",
"@overload",
]
[tool.black]
target-version = ["py310"]
include = '\.py$'
[tool.ruff]
target-version = "py310"
line-length = 88
extend-exclude = ["examples"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # Pyflakes (unused imports, undefined names)
"W", # pycodestyle warnings
"I", # isort (import ordering)
"B", # flake8-bugbear (likely bugs)
"UP", # pyupgrade (modernization)
]
ignore = [
"E501", # line too long — Black handles wrapping
"E741", # ambiguous variable name — collides with conventional math/CV names
]
[tool.ruff.lint.per-file-ignores]
# Dataset scripts mix Python data definitions with imperative blocks at module
# level; the upstream-author style differs from the library code and we don't
# want to churn it in this refactor.
"dataset_tools/**" = ["B007", "E402"]