-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
233 lines (213 loc) · 6.69 KB
/
pyproject.toml
File metadata and controls
233 lines (213 loc) · 6.69 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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
[build-system]
requires = ["setuptools>=69", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "datalab"
version = "2.4.0"
description = "High-precision scientific tool for sequence extrapolation, curve fitting, and error propagation with LaTeX export"
readme = "README.md"
requires-python = ">=3.11"
license = "MIT"
license-files = ["LICENSE"]
authors = [
{ name = "DataLab Contributors" },
]
keywords = [
"extrapolation",
"curve-fitting",
"mpmath",
"latex",
"scientific-computing",
"error-propagation",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Scientific/Engineering :: Visualization",
]
# Core dependencies — shared between desktop and web frontends.
# The frontend-specific Qt / Flask deps live under the [desktop] and
# [web] extras so a headless CI or container install can opt out.
dependencies = [
"Pillow>=10.3.0",
"mpmath>=1.3.0",
"sympy>=1.13.0",
"matplotlib>=3.10.0",
"pyyaml>=6.0",
]
[project.optional-dependencies]
# PySide6 desktop GUI — PyQt pulls heavy transitive deps (~300 MB),
# keep it opt-in so headless CI / container images stay slim.
desktop = [
"PySide6>=6.7.0",
]
# Flask web app — waitress is the production WSGI server on Windows
# (gunicorn imports fcntl which Windows lacks). mistune renders
# docs/web/ markdown.
web = [
"Flask>=3.0.0",
"mistune>=2.0.0",
"waitress>=3.0.0",
]
# Optional pint units integration (Phase 3 #16). Keeps the core
# install lean; pint ships with its own unit registry data (~1 MB).
units = [
"pint>=0.23",
]
# Optional MCMC via emcee (Phase 3 #12). emcee pulls numpy as a hard
# dep; both are only needed when running posterior refinement.
mcmc = [
"emcee>=3.1",
"numpy>=1.26",
"corner>=2.2",
]
# Optional real-time collaboration (Phase 3 #17). Not wired into the
# default web stack; needs Redis for multi-worker scaling.
collab = [
"flask-socketio>=5.3",
]
# Test runners for desktop + web. pytest-qt requires PySide6, so
# include it here but note the test runner also needs desktop
# installed for gui tests.
test = [
"pytest>=8.0",
"pytest-qt>=4.4.0",
"pytest-cov>=5.0.0",
]
# Benchmarks (Phase 4 #24). Kept separate so benchmark collection
# doesn't slow down the regular pytest run.
bench = [
"pytest-benchmark>=4.0",
]
# Static typing (Phase 4 #23). mypy strict on shared/, fitting/,
# extrapolation_methods/, datalab_latex/ (NOT the whole codebase —
# app_desktop and app_web mix Qt / Flask APIs that don't benefit
# from strict typing).
typing = [
"mypy>=1.10",
"types-PyYAML",
"types-Pillow",
]
# Docs site (MkDocs Material).
docs = [
"mkdocs>=1.5.0",
"mkdocs-material>=9.4.0",
"pymdown-extensions>=10.3",
]
# Meta-extra that pulls everything for a full dev environment.
dev = [
"datalab[desktop,web,units,mcmc,collab,test,bench,typing,docs]",
]
[project.scripts]
# The CLI entry point (Phase 3 #14). Installed by pip so end users
# can invoke ``datalab batch config.yml`` directly after a pip install.
datalab = "cli.main:main"
[tool.setuptools.packages.find]
# Explicit list mirrors the actual layout; auto-discovery would pick
# up tests/ and site-packages noise.
include = [
"cli*",
"shared*",
"fitting*",
"extrapolation_methods*",
"datalab_latex*",
"app_desktop*",
"app_web*",
]
exclude = [
"tests*",
"docs*",
"site*",
"dist*",
"build*",
]
# ------------------------------------------------------------------
# Test configuration (Phase 4 #22 + #24)
# ------------------------------------------------------------------
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
addopts = [
"--strict-markers",
"--tb=short",
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"benchmark: marks tests as benchmarks",
]
# ------------------------------------------------------------------
# mypy strict-on-core (Phase 4 #23)
# ------------------------------------------------------------------
[tool.mypy]
python_version = "3.11"
# Start permissive at the root; override strict on the core modules
# below so the Qt / Flask mixins stay ergonomic while shared compute
# gets full rigor.
warn_unused_ignores = true
warn_redundant_casts = true
warn_unused_configs = true
[[tool.mypy.overrides]]
module = [
"shared.*",
"fitting.*",
"extrapolation_methods.*",
"datalab_latex.*",
]
strict = true
# Allow untyped third-party imports (mpmath, PIL) — adding stubs is
# not in scope for Phase 4.
ignore_missing_imports = true
# Third-party libraries without type stubs. ``ignore_missing_imports``
# alone doesn't silence the ``[import-untyped]`` warning under
# ``--strict``; we additionally mark these modules as "follow_imports
# = silent" so the error code is suppressed cleanly. Adding real
# stubs (or ``types-mpmath`` / ``types-emcee`` if they ever exist)
# would be the right long-term fix.
[[tool.mypy.overrides]]
module = [
# Third-party libraries actually imported by the project that
# ship without type stubs (or whose stubs are incomplete on
# the strict perimeter). Adding a library here suppresses the
# ``[import-untyped]`` errors that ``ignore_missing_imports``
# alone doesn't catch under ``--strict``. Keep this list in
# sync with ``gui_requirements.txt`` / ``web_requirements.txt``
# — adding a library here without a corresponding requirement
# masks real "module not installed" failures.
"mpmath",
"mpmath.*",
"emcee",
"emcee.*",
"corner",
"corner.*",
"matplotlib",
"matplotlib.*",
"sympy",
"sympy.*",
# ``pint`` is the optional ``[units]`` extra (declared above at
# line 64). ``shared/units.py`` guards every import with
# ``try/except ImportError`` so the runtime stays optional, but
# mypy still needs the override to stop emitting
# ``[import-not-found]`` when the env doesn't install it.
"pint",
"pint.*",
]
ignore_missing_imports = true
follow_imports = "silent"
# ------------------------------------------------------------------
# ruff (fast linter — opt-in, not wired into CI yet)
# ------------------------------------------------------------------
[tool.ruff]
target-version = "py311"
line-length = 100
[tool.ruff.lint]
# Keep the initial lint pass narrow — E (pycodestyle errors), F (pyflakes),
# W (warnings). Expand later as needed.
select = ["E", "F", "W"]
ignore = [
"E501", # long lines — matplotlib / LaTeX strings need them
]