forked from antonioterpin/synthpix
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
213 lines (191 loc) · 5.2 KB
/
pyproject.toml
File metadata and controls
213 lines (191 loc) · 5.2 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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "synthpix"
version = "0.1.2"
authors = [
{ name = "Antonio Terpin", email = "aterpin@ethz.ch" },
{ name = "Alan Bonomi", email = "abonomi@ethz.ch" },
{ name = "Francesco Banelli", email = "fbanelli@ethz.ch" },
]
description = "A lightspeed PIV images generator using JAX"
readme = "README.md"
requires-python = ">=3.10"
license = { text = "MIT" }
keywords = ["PIV", "synthetic data", "jax"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: System :: Logging",
]
dependencies = [
"jax>=0.6.0",
"tqdm>=4.67.1",
"h5py>=3.13.0",
"ruamel.yaml>=0.18.10",
"Pillow>=10.0.0",
"robo-goggles>=0.1.7",
"numpy>=2.2.6",
"gdown>=5.2.0",
"grain>=0.2.13",
"orbax-checkpoint>=0.11.31",
]
[project.urls]
Homepage = "https://github.com/antonioterpin/synthpix"
Repository = "https://github.com/antonioterpin/synthpix"
Documentation = "https://github.com/antonioterpin/synthpix#readme"
Issues = "https://github.com/antonioterpin/synthpix/issues"
[tool.setuptools]
package-dir = { "" = "src" }
[tool.setuptools.packages.find]
where = ["src"]
include = ["synthpix*"]
exclude = ["tests*", "docs*"]
[project.optional-dependencies]
dev = [
"pytest>=7.0.0",
"pytest-cov>=4.0.0",
"hypothesis>=6.0.0",
"snowballstemmer==2.2.0",
"pre_commit==4.0.1",
"tomli",
"pyupgrade>=3.19.0",
"matplotlib>=3.10.1",
"ruff>=0.9.0",
"mypy>=1.14.0",
]
cuda12 = [
"jax[cuda12]>=0.6.0",
]
download = [
"gdown>=5.1.0",
"scipy>=1.10.0",
"tensorflow-cpu>=2.15.0",
]
# autopep8 configuration for 4-space indentation
[tool.autopep8]
max_line_length = 80
indent_size = 4
aggressive = 2
in_place = true
exclude = ".eggs,.git,.hg,.mypy_cache,.tox,.venv,_build,buck-out,build,dist"
# isort configuration (updated for autopep8 compatibility)
[tool.isort]
line_length = 80
indent = 4
multi_line_output = 0
force_single_line = false
include_trailing_comma = false
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
# MyPy configuration
[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
strict_equality = true
show_error_codes = true
explicit_package_bases = true
# Relax strictness in tests and examples
[[tool.mypy.overrides]]
module = ["tests.*", "examples.*"]
disallow_untyped_defs = false
disallow_incomplete_defs = false
check_untyped_defs = false
disallow_untyped_decorators = false
# Pydocstyle configuration
[tool.pydocstyle]
convention = "google"
match-dir = "^(?!tests).*"
# Bandit security configuration
[tool.bandit]
exclude_dirs = ["tests", ".venv", "build", "dist"]
# Pytest configuration
[tool.pytest.ini_options]
minversion = "7.0"
addopts = [
"-ra",
"--strict-markers",
"--strict-config",
]
testpaths = ["tests"]
filterwarnings = [
"error",
"ignore::UserWarning",
"ignore::DeprecationWarning",
]
# Coverage configuration (stable: path-based source)
[tool.coverage.run]
branch = true
source = ["src/synthpix"]
relative_files = true
[tool.coverage.report]
show_missing = true
skip_covered = true
omit = [
"tests/*",
"docs/*",
]
[tool.coverage.html]
directory = "htmlcov"
# Ruff configuration for linting and modern typing enforcement
[tool.ruff]
line-length = 80
target-version = "py310"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes (including unused imports F401, unused variables F841)
"UP", # pyupgrade (modern typing patterns)
"I", # isort
"N", # pep8-naming
"D", # pydocstyle
"PL", # pylint
"RUF", # ruff-specific rules
"TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
"ARG", # flake8-unused-arguments
]
ignore = [
"D100", # Missing docstring in public module
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"PLR0913", # Too many arguments to function call
"PLR2004", # Magic value used in comparison
]
[tool.ruff.lint.pyupgrade]
# Keep this empty to use all pyupgrade rules
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["D", "PLR2004"] # Ignore docstring rules in tests
"examples/*" = ["D"] # Ignore docstring rules in examples
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.pep8-naming]
ignore-names = ["H", "W", "D"]
[dependency-groups]
dev = [
"pydoclint>=0.8.3",
]