tsbootstrap 0.2.0__tar.gz → 0.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tsbootstrap-0.2.0/src/tsbootstrap.egg-info → tsbootstrap-0.3.1}/PKG-INFO +146 -60
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/README.md +136 -59
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/pyproject.toml +44 -6
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/__init__.py +32 -1
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/adapters/estimators.py +2 -2
- tsbootstrap-0.3.1/src/tsbootstrap/api.py +911 -0
- tsbootstrap-0.3.1/src/tsbootstrap/block/_compiled.py +2499 -0
- tsbootstrap-0.3.1/src/tsbootstrap/block/indices.py +166 -0
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/block/pwsd.py +16 -9
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/block/stationary.py +10 -7
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/block/tapered.py +17 -6
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/dispatch.py +8 -5
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/engines/arma_scipy.py +7 -4
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/engines/var.py +8 -5
- tsbootstrap-0.3.1/src/tsbootstrap/mcp.py +450 -0
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/model/arima.py +16 -0
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/model/fit.py +15 -6
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/model/recursive.py +36 -19
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/model/stability.py +1 -1
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/results.py +21 -12
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/uq/adaptive.py +25 -6
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/uq/calibration.py +28 -6
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/uq/conformal.py +41 -14
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/uq/forecast.py +11 -4
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1/src/tsbootstrap.egg-info}/PKG-INFO +146 -60
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap.egg-info/SOURCES.txt +3 -0
- tsbootstrap-0.3.1/src/tsbootstrap.egg-info/entry_points.txt +2 -0
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap.egg-info/requires.txt +11 -0
- tsbootstrap-0.2.0/src/tsbootstrap/api.py +0 -305
- tsbootstrap-0.2.0/src/tsbootstrap/block/indices.py +0 -101
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/LICENSE +0 -0
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/setup.cfg +0 -0
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/adapters/__init__.py +0 -0
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/block/__init__.py +0 -0
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/diagnostics.py +0 -0
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/engines/__init__.py +0 -0
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/errors.py +0 -0
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/metadata.py +0 -0
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/methods.py +0 -0
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/model/__init__.py +0 -0
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/py.typed +0 -0
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/rng.py +0 -0
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/uq/__init__.py +0 -0
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap/validation.py +0 -0
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap.egg-info/dependency_links.txt +0 -0
- {tsbootstrap-0.2.0 → tsbootstrap-0.3.1}/src/tsbootstrap.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tsbootstrap
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: A Python package to generate bootstrapped time series
|
|
5
5
|
Author-email: Sankalp Gilda <sankalp.gilda@gmail.com>
|
|
6
6
|
Maintainer-email: Sankalp Gilda <sankalp.gilda@gmail.com>, Franz Kiraly <franz.kiraly@sktime.net>, Benedikt Heidrich <benedikt.heidrich@sktime.net>
|
|
@@ -50,8 +50,16 @@ Provides-Extra: models
|
|
|
50
50
|
Requires-Dist: statsmodels; extra == "models"
|
|
51
51
|
Provides-Extra: uq
|
|
52
52
|
Requires-Dist: scikit-learn; extra == "uq"
|
|
53
|
+
Provides-Extra: mcp
|
|
54
|
+
Requires-Dist: mcp<2,>=1.28; extra == "mcp"
|
|
53
55
|
Provides-Extra: accel
|
|
54
56
|
Requires-Dist: numba; extra == "accel"
|
|
57
|
+
Provides-Extra: examples
|
|
58
|
+
Requires-Dist: tsbootstrap[models,uq]; extra == "examples"
|
|
59
|
+
Requires-Dist: matplotlib; extra == "examples"
|
|
60
|
+
Requires-Dist: pandas; extra == "examples"
|
|
61
|
+
Requires-Dist: sktime; extra == "examples"
|
|
62
|
+
Requires-Dist: jupyter; extra == "examples"
|
|
55
63
|
Provides-Extra: profile
|
|
56
64
|
Requires-Dist: scalene; extra == "profile"
|
|
57
65
|
Requires-Dist: line_profiler; extra == "profile"
|
|
@@ -81,6 +89,7 @@ Requires-Dist: pytest; extra == "dev"
|
|
|
81
89
|
Requires-Dist: pytest-xdist[psutil]; extra == "dev"
|
|
82
90
|
Requires-Dist: pytest-cov; extra == "dev"
|
|
83
91
|
Requires-Dist: pytest-mock; extra == "dev"
|
|
92
|
+
Requires-Dist: nbmake; extra == "dev"
|
|
84
93
|
Requires-Dist: sktime; extra == "dev"
|
|
85
94
|
Requires-Dist: polars; extra == "dev"
|
|
86
95
|
Requires-Dist: statsmodels; extra == "dev"
|
|
@@ -105,6 +114,8 @@ Requires-Dist: tomlkit; extra == "dev"
|
|
|
105
114
|
Requires-Dist: memory-profiler>=0.60.0; extra == "dev"
|
|
106
115
|
Dynamic: license-file
|
|
107
116
|
|
|
117
|
+
<!-- mcp-name: io.github.astrogilda/tsbootstrap -->
|
|
118
|
+
|
|
108
119
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
109
120
|
[](#contributors)
|
|
110
121
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
@@ -118,10 +129,10 @@ Dynamic: license-file
|
|
|
118
129
|
<div style="clear: both;"></div>
|
|
119
130
|
<br>
|
|
120
131
|
<p align="center">
|
|
121
|
-
<img src="https://img.shields.io/badge/Markdown-000000.svg?
|
|
122
|
-
<img src="https://img.shields.io/badge/Python-3776AB.svg?
|
|
123
|
-
<img src="https://img.shields.io/badge/Pytest-0A9EDC.svg?
|
|
124
|
-
<img src="https://img.shields.io/badge/GitHub%20Actions-2088FF.svg?style&logo=GitHub-Actions&logoColor=white" alt="actions" />
|
|
132
|
+
<img src="https://img.shields.io/badge/Markdown-000000.svg?style=flat&logo=Markdown&logoColor=white" alt="Markdown" />
|
|
133
|
+
<img src="https://img.shields.io/badge/Python-3776AB.svg?style=flat&logo=Python&logoColor=white" alt="Python" />
|
|
134
|
+
<img src="https://img.shields.io/badge/Pytest-0A9EDC.svg?style=flat&logo=Pytest&logoColor=white" alt="pytest" />
|
|
135
|
+
<img src="https://img.shields.io/badge/GitHub%20Actions-2088FF.svg?style=flat&logo=GitHub-Actions&logoColor=white" alt="actions" />
|
|
125
136
|
</p>
|
|
126
137
|
<a href="https://arxiv.org/abs/2404.15227"><img src="https://img.shields.io/static/v1?label=arXiv&message=2404.15227&color=B31B1B&logo=arXiv" alt="preprint">
|
|
127
138
|
</a>
|
|
@@ -135,15 +146,16 @@ Dynamic: license-file
|
|
|
135
146
|
<img src="https://static.pepy.tech/badge/tsbootstrap" alt="Downloads"/>
|
|
136
147
|
</a>
|
|
137
148
|
<img src="https://img.shields.io/github/license/eli64s/readme-ai?color=5D6D7E" alt="github-license" />
|
|
138
|
-
</a>
|
|
139
149
|
<img src="https://github.com/astrogilda/tsbootstrap/workflows/CI/badge.svg" alt="Build Status"/>
|
|
140
150
|
<a href="https://codecov.io/gh/astrogilda/tsbootstrap"><img src="https://codecov.io/gh/astrogilda/tsbootstrap/branch/main/graph/badge.svg" alt="codecov"/></a>
|
|
141
151
|
<a href="https://doi.org/10.5281/zenodo.8226495"><img src="https://zenodo.org/badge/DOI/10.5281/zenodo.8226495.svg" alt="DOI"/></a>
|
|
142
|
-
<a href="https://
|
|
152
|
+
<a href="https://mybinder.org/v2/gh/astrogilda/tsbootstrap/HEAD?labpath=docs/source/tutorials/quickstart.ipynb"><img src="https://mybinder.org/badge_logo.svg" alt="Launch tutorials on Binder"/></a>
|
|
143
153
|
<img src="https://img.shields.io/github/last-commit/astrogilda/tsbootstrap" alt="Last Commit"/>
|
|
144
154
|
<img src="https://img.shields.io/github/issues/astrogilda/tsbootstrap" alt="Issues"/>
|
|
145
155
|
<img src="https://img.shields.io/github/issues-pr/astrogilda/tsbootstrap" alt="Pull Requests"/>
|
|
146
156
|
<img src="https://img.shields.io/github/v/tag/astrogilda/tsbootstrap" alt="Tag"/>
|
|
157
|
+
<a href="https://deepwiki.com/astrogilda/tsbootstrap"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"/></a>
|
|
158
|
+
<a href="https://context7.com/astrogilda/tsbootstrap"><img src="https://img.shields.io/badge/Context7-indexed-3b82f6" alt="Context7"/></a>
|
|
147
159
|
</div>
|
|
148
160
|
|
|
149
161
|
|
|
@@ -151,12 +163,13 @@ Dynamic: license-file
|
|
|
151
163
|
## 📒 Table of Contents
|
|
152
164
|
|
|
153
165
|
1. [🚀 Getting Started](#-getting-started)
|
|
154
|
-
2. [
|
|
155
|
-
3. [
|
|
156
|
-
4. [
|
|
157
|
-
5. [
|
|
158
|
-
6. [
|
|
159
|
-
7. [
|
|
166
|
+
2. [⚡ Performance](#-performance)
|
|
167
|
+
3. [🧩 Modules](#-modules)
|
|
168
|
+
4. [🗺 Roadmap](#-roadmap)
|
|
169
|
+
5. [🤝 Contributing](#-contributing)
|
|
170
|
+
6. [📄 License](#-license)
|
|
171
|
+
7. [📍 Time Series Bootstrapping Methods intro](#time-series-bootstrapping)
|
|
172
|
+
8. [👏 Contributors](#-contributors)
|
|
160
173
|
|
|
161
174
|
|
|
162
175
|
|
|
@@ -189,7 +202,7 @@ from tsbootstrap import StationaryBlock, ResidualBootstrap, SieveAR, AR, ARIMA,
|
|
|
189
202
|
|
|
190
203
|
bootstrap(x, method=StationaryBlock(avg_block_length="auto"))
|
|
191
204
|
|
|
192
|
-
# recursive model-based bootstraps (need the model extra:
|
|
205
|
+
# recursive model-based bootstraps (need the model extra: uv add "tsbootstrap[models]")
|
|
193
206
|
bootstrap(x, method=ResidualBootstrap(model=AR(order=2)))
|
|
194
207
|
bootstrap(x, method=ResidualBootstrap(model=ARIMA(order=(1, 1, 1))))
|
|
195
208
|
bootstrap(x, method=SieveAR())
|
|
@@ -201,54 +214,137 @@ print(diagnose(x).recommended_methods)
|
|
|
201
214
|
Inputs can be NumPy arrays, lists, or pandas / Polars DataFrames and Series. The
|
|
202
215
|
result is a `BootstrapResult` carrying the samples, provenance metadata, and
|
|
203
216
|
out-of-bag / in-bag primitives. For the sktime ecosystem, the same methods are
|
|
204
|
-
also available as estimator classes (`MovingBlockBootstrap`, `
|
|
205
|
-
|
|
217
|
+
also available as estimator classes (`MovingBlockBootstrap`, `ARResidualBootstrap`,
|
|
218
|
+
`SieveBootstrap`, and the rest) under `tsbootstrap.adapters`.
|
|
219
|
+
|
|
220
|
+
### Uncertainty quantification
|
|
221
|
+
|
|
222
|
+
The `uq` layer turns resampled series into prediction intervals. `forecast_intervals`
|
|
223
|
+
gives forward forecast bands for an AR model; `EnbPIEnsemble` produces out-of-bag
|
|
224
|
+
prediction intervals for an sklearn-style regressor, with calibrators for stationary,
|
|
225
|
+
volatility-clustered, and drifting data (static, sliding window, and the adaptive ACI
|
|
226
|
+
and NexCP schemes); and `bootstrap_reduce` streams a per-replicate statistic so
|
|
227
|
+
calibration scales to large replicate counts without holding every path in memory.
|
|
228
|
+
|
|
229
|
+
```python
|
|
230
|
+
from tsbootstrap import AR, forecast_intervals
|
|
231
|
+
|
|
232
|
+
lower, upper, median = forecast_intervals(x, model=AR(order=2), horizon=12, alpha=0.1)
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
The conformal pieces (`EnbPIEnsemble` and the calibrators) need the `uq` extra
|
|
236
|
+
(scikit-learn). The interactive
|
|
237
|
+
[tutorial gallery](https://tsbootstrap.readthedocs.io/en/latest/tutorials/index.html)
|
|
238
|
+
works through every method on real and synthetic data, including a "which bootstrap
|
|
239
|
+
should I use?" decision guide.
|
|
240
|
+
|
|
241
|
+
### MCP server
|
|
242
|
+
|
|
243
|
+
`tsbootstrap` ships a read-only [Model Context Protocol](https://modelcontextprotocol.io)
|
|
244
|
+
server so an MCP client (an LLM agent, an IDE) can diagnose a short series and compute a
|
|
245
|
+
bootstrap confidence interval without writing any Python. Run it with no install step:
|
|
246
|
+
|
|
247
|
+
```sh
|
|
248
|
+
uvx --from "tsbootstrap[mcp]" tsbootstrap-mcp
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
It speaks the stdio transport and exposes exactly two read-only tools:
|
|
252
|
+
|
|
253
|
+
- `diagnose_series`: serial-dependence and stationarity diagnostics, a recommended
|
|
254
|
+
Politis-White block length, and the bootstrap methods the server supports for the series.
|
|
255
|
+
- `bootstrap_confidence_interval`: a percentile confidence interval for the mean, median,
|
|
256
|
+
std, or variance, using an i.i.d. or block bootstrap.
|
|
257
|
+
|
|
258
|
+
Both tools accept at most 500 observations and run at most 500 replicates. For larger
|
|
259
|
+
series, model-based methods, or the uncertainty layer, use the library directly in a
|
|
260
|
+
local script.
|
|
206
261
|
|
|
207
262
|
### 📦 Installation
|
|
208
263
|
|
|
209
264
|
Requires Python 3.10 or higher.
|
|
210
265
|
|
|
211
266
|
```sh
|
|
212
|
-
|
|
213
|
-
|
|
267
|
+
# with uv (recommended):
|
|
268
|
+
uv add tsbootstrap # core: i.i.d. and block methods
|
|
269
|
+
uv add "tsbootstrap[models]" # adds AR / ARIMA / VAR / sieve (statsmodels)
|
|
270
|
+
|
|
271
|
+
# with pip:
|
|
272
|
+
pip install tsbootstrap
|
|
273
|
+
pip install "tsbootstrap[models]"
|
|
214
274
|
```
|
|
215
275
|
|
|
216
276
|
The model-based methods import statsmodels lazily and raise a clear install hint if
|
|
217
277
|
the `models` extra is missing.
|
|
218
278
|
|
|
279
|
+
## ⚡ Performance
|
|
280
|
+
|
|
281
|
+

|
|
282
|
+
|
|
283
|
+
*Left: speedup of the compiled reduce path over the arch library on the four overlapping methods. Right: peak memory before and after on the two headline reduce workloads (baseline = materialize every path, then reduce). Regenerate with `python benchmarks/plot_launch.py`.*
|
|
284
|
+
|
|
285
|
+
tsbootstrap ships an optional compiled backend (`backend="compiled"`, via the
|
|
286
|
+
`[accel]` extra) that is faster than the [`arch`](https://github.com/bashtage/arch)
|
|
287
|
+
library on every overlapping resampling method. The table below is the speedup of
|
|
288
|
+
the streaming reduce path over `arch.apply` on an 8-core CPU (higher is better).
|
|
289
|
+
|
|
290
|
+
| Method | n=200, B=999 | n=200, B=10000 | n=2000, B=999 | n=2000, B=10000 |
|
|
291
|
+
|-----------------|--------------|----------------|---------------|-----------------|
|
|
292
|
+
| IID | 1.3x | 1.3x | 1.8x | 1.8x |
|
|
293
|
+
| MovingBlock | 1.6x | 1.6x | 1.9x | 1.8x |
|
|
294
|
+
| CircularBlock | 1.7x | 1.7x | 2.4x | 2.4x |
|
|
295
|
+
| StationaryBlock | 1.6x | 1.6x | 2.5x | 2.7x |
|
|
296
|
+
|
|
297
|
+
The compiled reduce fuses index build, gather, and reduction into one pass, so
|
|
298
|
+
peak memory stays flat in the number of replicates: a multivariate VAR residual
|
|
299
|
+
bootstrap that would materialize a 480 MB tensor needs about 1.4 MB, and a
|
|
300
|
+
1000-series panel uses about 8 MB instead of 1.6 GB. The multivariate and
|
|
301
|
+
ragged-panel reduce paths have no equivalent in `arch`. Full methodology,
|
|
302
|
+
single-threaded numbers, and the reproduction script are in
|
|
303
|
+
[benchmarks/README.md](benchmarks/README.md).
|
|
304
|
+
|
|
305
|
+
```sh
|
|
306
|
+
# install the compiled backend
|
|
307
|
+
uv add "tsbootstrap[accel]"
|
|
308
|
+
# or
|
|
309
|
+
pip install "tsbootstrap[accel]"
|
|
310
|
+
```
|
|
311
|
+
|
|
219
312
|
## 🧩 Modules
|
|
220
313
|
|
|
221
|
-
|
|
314
|
+
Package layout:
|
|
222
315
|
|
|
223
316
|
| Area | Module(s) | Role |
|
|
224
317
|
| --- | --- | --- |
|
|
225
318
|
| Public API | `api.py`, `methods.py`, `results.py`, `errors.py`, `diagnostics.py` | the `bootstrap()` entry point, typed method specs, structured results, error taxonomy, and `diagnose()` |
|
|
226
|
-
| Infrastructure | `rng.py`, `validation.py`, `dispatch.py`, `metadata.py` | deterministic RNG contract, input coercion (incl. the narwhals DataFrame boundary), spec
|
|
319
|
+
| Infrastructure | `rng.py`, `validation.py`, `dispatch.py`, `metadata.py` | deterministic RNG contract, input coercion (incl. the narwhals DataFrame boundary), spec to executor dispatch, method metadata |
|
|
227
320
|
| Block methods | `block/` | vectorized index kernels, true Politis-Romano stationary, energy-normalized tapering, PWSD block length, OOB primitives |
|
|
228
321
|
| Model methods | `model/`, `engines/` | model fitting, stability guards, and recursive AR/ARMA/VAR simulation |
|
|
322
|
+
| Uncertainty quantification | `uq/` | EnbPI prediction intervals, the static / sliding-window / ACI / NexCP calibrators, and AR forecast intervals |
|
|
229
323
|
| Ecosystem | `adapters/` | skbase / sktime estimator classes over the functional core |
|
|
230
324
|
|
|
231
325
|
|
|
232
326
|
## 🗺 Roadmap
|
|
233
327
|
|
|
234
|
-
|
|
328
|
+
The full, living roadmap is [issue #181](https://github.com/astrogilda/tsbootstrap/issues/181). Highlights:
|
|
235
329
|
|
|
236
|
-
|
|
237
|
-
-
|
|
238
|
-
-
|
|
239
|
-
-
|
|
240
|
-
- **API and Capability Extension**: panel/hierarchical data, exogenous data, update/stream, model state management
|
|
241
|
-
- **Scope Extension (TBD)**: time series augmentation, fully probabilistic models
|
|
330
|
+
Near term (v0.2.x):
|
|
331
|
+
- Out-of-sample forecast intervals for ARIMA and VAR (v0.2.0 ships AR-only).
|
|
332
|
+
- The tutorial gallery and getting-started notebook ([#46](https://github.com/astrogilda/tsbootstrap/issues/46)).
|
|
333
|
+
- Python 3.14, once statsmodels publishes a 3.14 wheel ([#202](https://github.com/astrogilda/tsbootstrap/issues/202)).
|
|
242
334
|
|
|
243
|
-
|
|
335
|
+
Candidate methods (good first issues):
|
|
336
|
+
- Generalized block ([#104](https://github.com/astrogilda/tsbootstrap/issues/104)), local block ([#105](https://github.com/astrogilda/tsbootstrap/issues/105)), and frequency-domain ([#107](https://github.com/astrogilda/tsbootstrap/issues/107)) bootstraps.
|
|
337
|
+
- Wild and dependent-wild bootstraps, and a GARCH / volatility residual bootstrap.
|
|
244
338
|
|
|
245
|
-
|
|
339
|
+
Distributed execution (`Dask` / `Spark` / `Ray`), an async layer, and a string-keyed
|
|
340
|
+
factory were considered and deliberately left out. The library is a CPU-bound,
|
|
341
|
+
single-process toolkit.
|
|
342
|
+
|
|
343
|
+
## 🤝 Contributing
|
|
246
344
|
|
|
247
345
|
See our [good first issues ](https://github.com/astrogilda/tsbootstrap/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)
|
|
248
346
|
for getting started.
|
|
249
347
|
|
|
250
|
-
Below is a quick start guide to contributing.
|
|
251
|
-
|
|
252
348
|
### Developer setup
|
|
253
349
|
|
|
254
350
|
1. Fork the tsbootstrap repository
|
|
@@ -258,64 +354,54 @@ Below is a quick start guide to contributing.
|
|
|
258
354
|
git clone https://github.com/astrogilda/tsbootstrap
|
|
259
355
|
```
|
|
260
356
|
|
|
261
|
-
3. In the local repository root,
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
4. Editable install via `pip`, including developer dependencies:
|
|
265
|
-
```
|
|
266
|
-
pip install -e ".[dev]"
|
|
357
|
+
3. In the local repository root, sync the locked development environment with uv:
|
|
358
|
+
```sh
|
|
359
|
+
uv sync --extra dev
|
|
267
360
|
```
|
|
268
361
|
|
|
269
|
-
|
|
270
|
-
your environment.
|
|
362
|
+
4. uv creates an isolated virtual environment from `uv.lock` and editable-installs the
|
|
363
|
+
package, so changes to the package are reflected in your environment automatically. Run
|
|
364
|
+
tools through the environment with `uv run` (for example `uv run pytest`).
|
|
271
365
|
|
|
272
|
-
5.
|
|
366
|
+
5. Install the pre-commit hooks:
|
|
273
367
|
```sh
|
|
274
|
-
|
|
275
|
-
pre-commit install
|
|
276
|
-
|
|
277
|
-
# Configure git to use the project's hooks
|
|
278
|
-
git config core.hooksPath .githooks
|
|
368
|
+
uv run pre-commit install
|
|
279
369
|
```
|
|
280
370
|
|
|
281
|
-
|
|
282
|
-
other code quality checks run automatically.
|
|
371
|
+
The hooks run ruff, formatting, and the other code-quality checks on each commit.
|
|
283
372
|
|
|
284
373
|
### Verifying the Installation
|
|
285
374
|
|
|
286
|
-
|
|
375
|
+
Verify the installation:
|
|
287
376
|
```
|
|
288
377
|
python -c "import tsbootstrap; print(tsbootstrap.__version__)"
|
|
289
378
|
```
|
|
290
379
|
|
|
291
|
-
This
|
|
380
|
+
This prints the installed version.
|
|
292
381
|
|
|
293
382
|
### Contribution workflow
|
|
294
383
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
3. Create a new branch with a descriptive name (e.g., `new-feature-branch` or `bugfix-issue-123`).
|
|
384
|
+
1. Create a new branch with a descriptive name (e.g., `new-feature-branch` or `bugfix-issue-123`).
|
|
298
385
|
```sh
|
|
299
386
|
git checkout -b new-feature-branch
|
|
300
387
|
```
|
|
301
|
-
|
|
302
|
-
|
|
388
|
+
2. Make changes to the project's codebase.
|
|
389
|
+
3. Commit your changes to your local branch with a clear commit message that explains the changes you've made.
|
|
303
390
|
```sh
|
|
304
391
|
git commit -m 'Implemented new feature.'
|
|
305
392
|
```
|
|
306
|
-
|
|
393
|
+
4. Push your changes to your forked repository on GitHub using the following command
|
|
307
394
|
```sh
|
|
308
395
|
git push origin new-feature-branch
|
|
309
396
|
```
|
|
310
|
-
|
|
311
|
-
The project maintainers will review your changes and provide feedback or merge them into the main branch.
|
|
397
|
+
5. Create a new pull request to the original project repository. In the pull request, describe the changes you've made and why they're necessary.
|
|
312
398
|
|
|
313
399
|
### 🧪 Running Tests
|
|
314
400
|
|
|
315
401
|
To run all tests, in your developer environment, run:
|
|
316
402
|
|
|
317
403
|
```sh
|
|
318
|
-
pytest tests/
|
|
404
|
+
uv run pytest tests/
|
|
319
405
|
```
|
|
320
406
|
|
|
321
407
|
The sktime adapter classes can be validated with sktime's estimator checks:
|
|
@@ -329,7 +415,7 @@ check_estimator(MovingBlockBootstrap)
|
|
|
329
415
|
|
|
330
416
|
### Contribution guide
|
|
331
417
|
|
|
332
|
-
|
|
418
|
+
See [CONTRIBUTING.md](https://github.com/astrogilda/tsbootstrap/blob/main/CONTRIBUTING.md) for details.
|
|
333
419
|
---
|
|
334
420
|
|
|
335
421
|
## 📄 License
|
|
@@ -339,7 +425,7 @@ This project is licensed under the `ℹ️ MIT` License. See the [LICENSE](http
|
|
|
339
425
|
---
|
|
340
426
|
## 👏 Contributors
|
|
341
427
|
|
|
342
|
-
|
|
428
|
+
Contributors:
|
|
343
429
|
|
|
344
430
|
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
|
345
431
|
<!-- prettier-ignore-start -->
|