forked from antonioterpin/flowgym
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
210 lines (184 loc) · 5.05 KB
/
pyproject.toml
File metadata and controls
210 lines (184 loc) · 5.05 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
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "flow-gym-suite"
version = "0.1.0"
description = "Flow Gym is a toolkit for research and deployment in flow quantification inspired by OpenAI Gym and Stable-Baselines3."
readme = "README.md"
license = { file = "LICENSE" }
authors = [
{ name = "Antonio Terpin", email = "aterpin@ethz.ch" },
{ name = "Francesco Banelli", email = "fbanelli@ethz.ch" },
{ name = "Alan Bonomi", email = "abonomi@ethz.ch" }
]
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",
]
requires-python = ">=3.10"
# Core dependencies
dependencies = [
"jax>=0.6.0",
"flax>=0.10.5",
"ipywidgets",
"robo-goggles>=0.1.6",
"pip>=25.3",
]
[project.urls]
Homepage = "https://github.com/antonioterpin/flowgym"
Repository = "https://github.com/antonioterpin/flowgym"
Documentation = "https://github.com/antonioterpin/flowgym#readme"
Issues = "https://github.com/antonioterpin/flowgym/issues"
[tool.setuptools.packages.find]
where = ["src"]
include = ["flowgym*"]
exclude = ["tests*", "docs*"]
# Dependency groups
[dependency-groups]
dev = [
"synthpix",
"pre_commit==4.0.1",
"snowballstemmer",
"pytest==7.4.4",
"wandb",
"scikit-image>=0.20.0",
]
synthpix-cuda12 = [
"synthpix[cuda12]",
]
dev-cuda12 = [
{include-group = "dev"},
{include-group = "synthpix-cuda12"},
]
docs = [
"Sphinx==7.4.7",
"sphinx-copybutton==0.5.2",
"sphinx-rtd-theme==2.0.0",
"sphinx-tabs==3.4.7",
"sphinx-togglebutton==0.3.2",
"sphinxcontrib-applehelp==2.0.0",
"sphinxcontrib-bibtex==2.6.2",
"sphinxcontrib-devhelp==2.0.0",
"sphinxcontrib-htmlhelp==2.1.0",
"sphinxcontrib-jquery==4.1",
"sphinxcontrib-jsmath==1.0.1",
"sphinxcontrib-qthelp==2.0.0",
"sphinxcontrib-serializinghtml==2.0.0",
]
# Optional dependencies
[project.optional-dependencies]
other_methods = [
"pyoptflow",
"openpiv",
"opencv-python-headless",
"torch>=1.13.1",
"torchvision>=0.14.1",
]
cuda12 = [
"jax[cuda12]>=0.6.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
# Allow untyped decorators in test files for Hypothesis
[[tool.mypy.overrides]]
module = "tests.*"
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",
"--cov=goggles",
"--cov-branch",
"--cov-report=term-missing",
"--cov-report=html",
"--cov-report=xml",
]
testpaths = ["tests"]
filterwarnings = [
"error",
"ignore::UserWarning",
"ignore::DeprecationWarning",
]
# Ruff configuration for linting and modern typing enforcement
[tool.ruff]
line-length = 80
target-version = "py310"
[tool.ruff.lint]
# Enable comprehensive rule sets
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes (including unused imports F401)
"UP", # pyupgrade (modern typing patterns)
"I", # isort
"N", # pep8-naming
"D", # pydocstyle
"PL", # pylint
"RUF", # ruff-specific rules
]
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
]
# Specific rules for modern typing enforcement
[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.setuptools.dynamic]
version = {attr = "flowgym.__version__"}
[tool.uv]
default-groups = []