-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpyproject.toml
More file actions
299 lines (274 loc) · 8.35 KB
/
pyproject.toml
File metadata and controls
299 lines (274 loc) · 8.35 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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
[project]
name = "tsbootstrap"
version = "0.1.5"
description = "A Python package to generate bootstrapped time series"
maintainers = [
{ name = "Sankalp Gilda", email = "sankalp.gilda@gmail.com" },
{ name = "Franz Kiraly", email = "franz.kiraly@sktime.net"},
{ name = "Benedikt Heidrich", email = "benedikt.heidrich@sktime.net"},
]
authors = [
{ name = "Sankalp Gilda", email = "sankalp.gilda@gmail.com" },
]
license = { file = "LICENSE" }
readme = "README.md"
requires-python = ">=3.9,<3.13"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: Unix",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"numpy",
"scikit-base",
"scikit-learn",
"scipy<1.16.0", # scipy 1.16.0 breaks statsmodels
"packaging",
"pydantic",
"arch",
"statsforecast>=2.0.0", # Need modern version for Python 3.12 support
"pandas",
]
[project.optional-dependencies]
all-extras = [
"hmmlearn",
"pyclustering",
"scikit_learn_extra",
"statsmodels",
"dtaidistance; python_version < '3.10'",
]
async-extras = [
"anyio", # For framework-agnostic async support
"trio", # For trio backend support
]
docs = [
"furo",
"jupyter",
"myst-parser",
"nbsphinx>=0.8.6",
"numpydoc",
"pydata-sphinx-theme",
"Sphinx!=7.2.0,<8.0.0",
"sphinx-rtd-theme>=1.3.0",
"sphinx-copybutton>=0.5.2",
"sphinx-design<0.6.0",
"sphinx-gallery<0.15.0",
"sphinx-issues<4.0.0",
"sphinx-version-warning",
"tabulate>=0.9.0",
]
dev = [
"black>=24.3.0",
"blacken-docs",
"hypothesis",
"pre-commit",
"pytest",
"pytest-xdist[psutil]",
"pytest-cov",
"pytest-mock",
"pytest-anyio", # For async test support
"trio>=0.26.0", # For testing trio backend support
"github-actions",
"importlib-metadata",
"pip-tools",
"pyright",
"ruff",
"autoflake",
"typos",
"tox",
"tox-gh-actions",
"pycobertura",
"tomlkit",
"memory-profiler>=0.60.0", # For performance testing
]
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -q -n auto --dist loadscope --max-worker-restart 3 --durations=20"
testpaths = [
"tests",
]
markers = [
"optional_deps: marks tests that require optional dependencies (automatically applied)",
"core: marks tests that only require core dependencies (automatically applied)",
"smoke: marks tests for smoke testing core functionality",
"anyio: marks tests that use anyio for async testing",
"slow: marks tests that are slow on Windows due to numerical computation performance",
"ci_performance: marks performance tests that are flaky in CI due to runner variability",
"performance: marks tests as performance benchmarks",
"integration: marks tests as integration tests",
"network: marks tests as requiring network access",
"cloud: marks tests as requiring cloud resources",
"gpu: marks tests as requiring GPU",
]
filterwarnings = [
# Ignore pkg_resources deprecation warnings from fs package (via statsforecast → fugue → triad → fs)
# This is a known issue with setuptools >= 81 and the fs package hasn't updated yet
# Engineering principle: Clean test output is non-negotiable
"ignore:pkg_resources is deprecated.*:DeprecationWarning:fs",
"ignore:pkg_resources is deprecated.*:UserWarning:fs",
# Also ignore from pkg_resources itself
"ignore:Deprecated call to.*:DeprecationWarning:pkg_resources",
]
# Remove the anyio config - we want to test with all backends
[tool.pytest.cov]
source = ["src/tsbootstrap"]
[tool.black]
line-length = 100
target-version = ["py39", "py310", "py311", "py312"]
[tool.ruff]
target-version = 'py39'
line-length = 100 # Must agree with Black
[tool.ruff.lint]
select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"D", # pydocstyle
"E", # Error
"F", # pyflakes
"I", # isort
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"PGH", # pygrep-hooks
"PTH", # flake8-use-pathlib
"Q", # flake8-quotes
"S", # bandit
"SIM", # flake8-simplify
"TRY", # tryceratops
"UP", # pyupgrade
"W", # pycodestyle warnings
"YTT", # flake8-2020
]
exclude = [
"migrations",
"__pycache__",
"manage.py",
"settings.py",
"env",
".env",
"venv",
".venv",
]
ignore = [
"B905", # zip strict=true; remove once python <3.10 support is dropped.
"C901", # function is too complex; overly strict
"UP006", # Use `list` instead of `List` for type annotation (3.9+ style)
"UP007", # Use `X | Y` for type annotations (3.10+ only)
"UP035", # Import from `collections.abc` instead of `typing` (3.9+ style)
"UP037", # Remove quotes from type annotation (3.9+ style)
"UP038", # Use `X | Y` in isinstance (3.10+ only)
"UP039", # Unnecessary parentheses after not (3.9+ style)
"UP040", # Type alias should use TypeAlias (3.10+ only)
"UP045", # Use `X | None` for type annotations (3.10+ only)
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D106",
"D107",
"D200",
"D401",
"E402",
"E501", # line length handled by black
"N802", # Function name should be lowercase; overly strict
"N803", # Argument name should be lowercase; overly strict
"N806", # Variable in function should be lowercase; overly strict
"N816", # Variable in class scope should not be mixedCase; overly strict
"PGH003", # Use of "eval"; overly strict
"SIM115", # open-file-with-context-handler; overly strict
"TRY003", # Avoid specifying messages outside exception class; overly strict, especially for ValueError
"UP038", # Use `X | Y` in `isinstance` call instead of `(X, Y)`; overly strict
"UP007", # Use `X | Y` for type annotationsRuffUP007; overly strict
"UP006", # Use `list` instead of `List` for type annotations; overly strict
"UP035", # `typing.List` is deprecated, use `list` instead; overly strict
]
[tool.ruff.lint.isort]
order-by-type = true
relative-imports-order = "closest-to-furthest"
extra-standard-library = ["typing"]
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
known-first-party = []
[tool.ruff.lint.flake8-bugbear]
extend-immutable-calls = [
"chr",
"typer.Argument",
"typer.Option",
]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = [
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D106",
"D107",
"S101", # use of "assert"
"S102", # use of "exec"
"S106", # possible hardcoded password.
"PGH001", # use of "eval"
]
"src/tsbootstrap/tests/*.py" = [
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D106",
"D107",
"S101", # use of "assert"
"S102", # use of "exec"
"S106", # possible hardcoded password.
"PGH001", # use of "eval"
]
[tool.ruff.lint.pep8-naming]
staticmethod-decorators = [
"pydantic.validator",
"pydantic.root_validator",
]
[tool.interrogate]
ignore_init_module = true
ignore_init_class = true
ignore_magic = true
ignore_semiprivate = true
ignore_private = true
ignore_nested_functions = true
ignore_nested_classes = true
ignore_imports = false
exclude = [".venv/*", "tests/*", "docs/*", "build/*", "dist/*", "src/tsbootstrap/_version.py", "src/tsbootstrap/__init__.py", "src/tsbootstrap/utils/types.py"]
[tool.coverage.run]
source = ['src/']
omit = ['tests/*', '.venv/*', 'src/tsbootstrap/tests/*']
[tool.pyright]
include = ["src"]
exclude = ["**/__pycache__", "**/.pytest_cache", "build", "dist", ".venv", "venv"]
pythonVersion = "3.9"
pythonPlatform = "All"
typeCheckingMode = "basic"
reportMissingImports = false
reportMissingTypeStubs = false
reportUnknownMemberType = false
reportUnknownArgumentType = false
reportUnknownVariableType = false
reportUnknownParameterType = false
reportMissingParameterType = false
reportPrivateUsage = false
reportImportCycles = true
reportUnnecessaryIsInstance = true
stubPath = "typings"
venvPath = "."
venv = ".venv"