Skip to content

Commit 9fec1cf

Browse files
authored
Merge pull request #21 from Nixtla/bump-min-python
[feat] bump min python and keep lockfile minimal
2 parents a257c96 + 2b7b90f commit 9fec1cf

File tree

9 files changed

+1874
-6413
lines changed

9 files changed

+1874
-6413
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "mkdocstrings-parser"
77
version = "0.0.1"
88
description = "A simple parser for mkdocstrings signature blocks"
99
readme = "README.md"
10-
requires-python = ">=3.8"
10+
requires-python = ">=3.10"
1111
dependencies = [
1212
"griffe2md",
1313
"pip-licenses>=4.5.1",
@@ -24,7 +24,7 @@ nixtlaverse = [
2424
"coreforecast",
2525
"utilsforecast",
2626
"datasetsforecast",
27-
"mlforecast[dask]",
27+
"mlforecast",
2828
"hierarchicalforecast",
2929
"neuralforecast",
3030
"statsforecast",

tests/test_coreforecast.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def test_regular_fn(setup_parser):
2828
Name | Type | Description
2929
---- | ---- | -----------
3030
`int` | <code>[int](#int)</code> | Optimal number of differences.
31+
3132
"""
3233

3334
def test_fn_w_decorator(setup_parser):
@@ -53,7 +54,7 @@ def test_fn_w_decorator(setup_parser):
5354
5455
Type | Description
5556
---- | -----------
56-
| np.ndarray: Array with the expanding statistic
57+
| np.ndarray: Array with the expanding statistic
5758
5859
**Examples:**
5960
@@ -67,6 +68,7 @@ def test_fn_w_decorator(setup_parser):
6768
>>> expanding_mean(x, skipna=True)
6869
array([1., 1.5, 1.5, 2.33..., 3.0])
6970
```
71+
7072
"""
7173

7274
def test_inherited_fn(setup_parser):
@@ -89,7 +91,7 @@ def test_inherited_fn(setup_parser):
8991
Lag(lag)
9092
```
9193
92-
Bases: <code>[\_BaseLagTransform](#coreforecast.lag_transforms._BaseLagTransform)</code>
94+
Bases: <code>[_BaseLagTransform](#coreforecast.lag_transforms._BaseLagTransform)</code>
9395
9496
Simple lag operator
9597
@@ -122,4 +124,5 @@ def test_inherited_fn(setup_parser):
122124
```python
123125
update(ga)
124126
```
127+
125128
"""

tests/test_datasetsforecast.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ def test_yearly_dataclass(setup_parser):
5353
```python
5454
source_url: str = 'https://zenodo.org/api/records/4656222/files/m3_yearly_dataset.zip/content'
5555
```
56+
5657
"""
5758

5859
@pytest.mark.datasets
@@ -77,4 +78,5 @@ def test_download_file(setup_parser):
7778
`decompress` | <code>[bool](#bool)</code> | Whether to decompress downloaded file. Default False. | <code>False</code>
7879
`filename` | <code>[str](#str)</code> | Override filename for the downloaded file. If None, the filename is derived from the URL. | <code>None</code>
7980
`max_retries` | <code>[int](#int)</code> | Maximum number of retry attempts on transient errors. | <code>3</code>
81+
8082
"""

tests/test_hierarchicalforecast.py

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def test_make_future_dataframe(setup_parser):
1616
Name | Type | Description | Default
1717
---- | ---- | ----------- | -------
1818
`df` | <code>[Frame](#narwhals.typing.Frame)</code> | Dataframe with ids, times and values for the exogenous regressors. | *required*
19-
`freq` | <code>[Union](#Union)\[[str](#str), [int](#int)\]</code> | Frequency of the data. Must be a valid pandas or polars offset alias, or an integer. | *required*
19+
`freq` | <code>[Union](#Union)[[str](#str), [int](#int)]</code> | Frequency of the data. Must be a valid pandas or polars offset alias, or an integer. | *required*
2020
`h` | <code>[int](#int)</code> | Forecast horizon. | *required*
2121
`id_col` | <code>[str](#str)</code> | Column that identifies each serie. Default is 'unique_id'. | <code>'unique_id'</code>
2222
`time_col` | <code>[str](#str)</code> | Column that identifies each timestep, its values can be timestamps or integers. Default is 'ds'. | <code>'ds'</code>
@@ -26,6 +26,7 @@ def test_make_future_dataframe(setup_parser):
2626
Name | Type | Description
2727
---- | ---- | -----------
2828
`FrameT` | <code>[FrameT](#narwhals.typing.FrameT)</code> | DataFrame with future values.
29+
2930
"""
3031

3132
def test_evaluate(setup_parser):
@@ -60,6 +61,7 @@ def test_evaluate(setup_parser):
6061
Type | Description
6162
---- | -----------
6263
<code>[FrameT](#narwhals.typing.FrameT)</code> | pandas, polars DataFrame: Metrics with one row per (id, metric) combination and one column per model. If `agg_fn` is not `None`, there is only one row per metric.
64+
6365
"""
6466

6567
@pytest.mark.skip(reason="waiting for new HF release")
@@ -172,16 +174,14 @@ def test_bottomup(setup_parser):
172174
173175
The most basic hierarchical reconciliation is performed using an Bottom-Up strategy. It was proposed for
174176
the first time by Orcutt in 1968.
175-
The corresponding hierarchical "projection" matrix is defined as:
176-
177+
The corresponding hierarchical \"projection\" matrix is defined as:
177178
```math
178179
\mathbf{P}_{\\text{BU}} = [\mathbf{0}_{\mathrm{[b],[a]}}\;|\;\mathbf{I}_{\mathrm{[b][b]}}]
179180
```
180181
181182
References:
182-
183183
- [Orcutt, G.H., Watts, H.W., & Edwards, J.B.(1968). "Data aggregation and
184-
information loss". The American Economic Review, 58 , 773(787)](http://www.jstor.org/stable/1815532).
184+
information loss". The American Economic Review, 58 , 773(787)](http://www.jstor.org/stable/1815532).
185185
186186
#### `BottomUp.fit`
187187
@@ -197,13 +197,13 @@ def test_bottomup(setup_parser):
197197
---- | ---- | ----------- | -------
198198
`S` | <code>[ndarray](#numpy.ndarray)</code> | Summing matrix of size (`base`, `bottom`). | *required*
199199
`y_hat` | <code>[ndarray](#numpy.ndarray)</code> | Forecast values of size (`base`, `horizon`). | *required*
200-
`y_insample` | <code>[Optional](#Optional)\[[ndarray](#numpy.ndarray)\]</code> | In-sample values of size (`base`, `horizon`). Default is None. | <code>None</code>
201-
`y_hat_insample` | <code>[Optional](#Optional)\[[ndarray](#numpy.ndarray)\]</code> | In-sample forecast values of size (`base`, `horizon`). Default is None. | <code>None</code>
202-
`sigmah` | <code>[Optional](#Optional)\[[ndarray](#numpy.ndarray)\]</code> | Estimated standard deviation of the conditional marginal distribution. Default is None. | <code>None</code>
203-
`intervals_method` | <code>[Optional](#Optional)\[[str](#str)\]</code> | Sampler for prediction intervals, one of `normality`, `bootstrap`, `permbu`, `conformal`. Default is None. | <code>None</code>
204-
`num_samples` | <code>[Optional](#Optional)\[[int](#int)\]</code> | Number of samples for probabilistic coherent distribution. Default is None. | <code>None</code>
205-
`seed` | <code>[Optional](#Optional)\[[int](#int)\]</code> | Seed for reproducibility. Default is None. | <code>None</code>
206-
`tags` | <code>[Optional](#Optional)\[[dict](#dict)\[[str](#str), [ndarray](#numpy.ndarray)\]\]</code> | Tags for hierarchical structure. Default is None. | <code>None</code>
200+
`y_insample` | <code>[Optional](#Optional)[[ndarray](#numpy.ndarray)]</code> | In-sample values of size (`base`, `horizon`). Default is None. | <code>None</code>
201+
`y_hat_insample` | <code>[Optional](#Optional)[[ndarray](#numpy.ndarray)]</code> | In-sample forecast values of size (`base`, `horizon`). Default is None. | <code>None</code>
202+
`sigmah` | <code>[Optional](#Optional)[[ndarray](#numpy.ndarray)]</code> | Estimated standard deviation of the conditional marginal distribution. Default is None. | <code>None</code>
203+
`intervals_method` | <code>[Optional](#Optional)[[str](#str)]</code> | Sampler for prediction intervals, one of `normality`, `bootstrap`, `permbu`, `conformal`. Default is None. | <code>None</code>
204+
`num_samples` | <code>[Optional](#Optional)[[int](#int)]</code> | Number of samples for probabilistic coherent distribution. Default is None. | <code>None</code>
205+
`seed` | <code>[Optional](#Optional)[[int](#int)]</code> | Seed for reproducibility. Default is None. | <code>None</code>
206+
`tags` | <code>[Optional](#Optional)[[dict](#dict)[[str](#str), [ndarray](#numpy.ndarray)]]</code> | Tags for hierarchical structure. Default is None. | <code>None</code>
207207
208208
**Returns:**
209209
@@ -225,18 +225,19 @@ def test_bottomup(setup_parser):
225225
---- | ---- | ----------- | -------
226226
`S` | <code>[ndarray](#numpy.ndarray)</code> | Summing matrix of size (`base`, `bottom`). | *required*
227227
`y_hat` | <code>[ndarray](#numpy.ndarray)</code> | Forecast values of size (`base`, `horizon`). | *required*
228-
`y_insample` | <code>[Optional](#Optional)\[[ndarray](#numpy.ndarray)\]</code> | In-sample values of size (`base`, `insample_size`). Default is None. | <code>None</code>
229-
`y_hat_insample` | <code>[Optional](#Optional)\[[ndarray](#numpy.ndarray)\]</code> | In-sample forecast values of size (`base`, `insample_size`). Default is None. | <code>None</code>
230-
`sigmah` | <code>[Optional](#Optional)\[[ndarray](#numpy.ndarray)\]</code> | Estimated standard deviation of the conditional marginal distribution. Default is None. | <code>None</code>
231-
`level` | <code>[Optional](#Optional)\[[list](#list)\[[int](#int)\]\]</code> | float list 0-100, confidence levels for prediction intervals. Default is None. | <code>None</code>
232-
`intervals_method` | <code>[Optional](#Optional)\[[str](#str)\]</code> | Sampler for prediction intervals, one of `normality`, `bootstrap`, `permbu`, `conformal`. Default is None. | <code>None</code>
233-
`num_samples` | <code>[Optional](#Optional)\[[int](#int)\]</code> | Number of samples for probabilistic coherent distribution. Default is None. | <code>None</code>
234-
`seed` | <code>[Optional](#Optional)\[[int](#int)\]</code> | Seed for reproducibility. Default is None. | <code>None</code>
235-
`tags` | <code>[Optional](#Optional)\[[dict](#dict)\[[str](#str), [ndarray](#numpy.ndarray)\]\]</code> | Tags for hierarchical structure. Default is None. | <code>None</code>
228+
`y_insample` | <code>[Optional](#Optional)[[ndarray](#numpy.ndarray)]</code> | In-sample values of size (`base`, `insample_size`). Default is None. | <code>None</code>
229+
`y_hat_insample` | <code>[Optional](#Optional)[[ndarray](#numpy.ndarray)]</code> | In-sample forecast values of size (`base`, `insample_size`). Default is None. | <code>None</code>
230+
`sigmah` | <code>[Optional](#Optional)[[ndarray](#numpy.ndarray)]</code> | Estimated standard deviation of the conditional marginal distribution. Default is None. | <code>None</code>
231+
`level` | <code>[Optional](#Optional)[[list](#list)[[int](#int)]]</code> | float list 0-100, confidence levels for prediction intervals. Default is None. | <code>None</code>
232+
`intervals_method` | <code>[Optional](#Optional)[[str](#str)]</code> | Sampler for prediction intervals, one of `normality`, `bootstrap`, `permbu`, `conformal`. Default is None. | <code>None</code>
233+
`num_samples` | <code>[Optional](#Optional)[[int](#int)]</code> | Number of samples for probabilistic coherent distribution. Default is None. | <code>None</code>
234+
`seed` | <code>[Optional](#Optional)[[int](#int)]</code> | Seed for reproducibility. Default is None. | <code>None</code>
235+
`tags` | <code>[Optional](#Optional)[[dict](#dict)[[str](#str), [ndarray](#numpy.ndarray)]]</code> | Tags for hierarchical structure. Default is None. | <code>None</code>
236236
237237
**Returns:**
238238
239239
Name | Type | Description
240240
---- | ---- | -----------
241241
`y_tilde` | <code>[dict](#dict)</code> | Reconciliated y_hat using the Bottom Up approach.
242+
242243
"""

tests/test_mlforecast.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ def test_distributed_dask_lgb(setup_parser):
1010
```python
1111
model_
1212
```
13+
1314
"""

tests/test_neuralforecast.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ def test_timeseriesloader(setup_parser):
2222
2323
Name | Type | Description | Default
2424
---- | ---- | ----------- | -------
25-
`dataset` | | Dataset to load data from. | *required*
25+
`dataset` | | Dataset to load data from. | *required*
2626
`batch_size` | <code>[int](#int)</code> | How many samples per batch to load. Defaults to 1. | *required*
2727
`shuffle` | <code>[bool](#bool)</code> | Set to True to have the data reshuffled at every epoch. Defaults to False. | *required*
2828
`sampler` | <code>[Sampler](#Sampler) or [Iterable](#Iterable)</code> | Defines the strategy to draw samples from the dataset. | *required*
2929
`drop_last` | <code>[bool](#bool)</code> | Set to True to drop the last incomplete batch. Defaults to False. | *required*
30-
`**kwargs` | | Additional keyword arguments for DataLoader. | <code>{}</code>
30+
`**kwargs` | | Additional keyword arguments for DataLoader. | <code>{}</code>
31+
3132
"""

tests/test_statsforecast.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def test_autoarima_prophet(setup_parser):
8181
8282
Name | Type | Description
8383
---- | ---- | -----------
84-
`AutoARIMAProphet` | | Adapter object with `AutoARIMA` fitted model.
84+
`AutoARIMAProphet` | | Adapter object with `AutoARIMA` fitted model.
8585
8686
#### `AutoARIMAProphet.predict`
8787
@@ -101,5 +101,6 @@ def test_autoarima_prophet(setup_parser):
101101
102102
Type | Description
103103
---- | -----------
104-
| pandas.DataFrame: DataFrame with the forecast components.
104+
| pandas.DataFrame: DataFrame with the forecast components.
105+
105106
"""

tests/test_utilsforecast.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,5 @@ def test_utilsforecast_rmae(setup_parser):
3737
Type | Description
3838
---- | -----------
3939
<code>[IntoDataFrameT](#narwhals.stable.v2.typing.IntoDataFrameT)</code> | pandas or polars DataFrame: dataframe with one row per id and one column per model.
40+
4041
"""

0 commit comments

Comments
 (0)