Skip to content

Commit 748f71e

Browse files
authored
Solves testing issues (#1051)
1 parent a3436fb commit 748f71e

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

.github/workflows/pytest.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ jobs:
2929
with:
3030
python-version: ${{ matrix.python-version }}
3131

32+
- name: Set matplotlib backend (headless)
33+
run: echo "MPLBACKEND=Agg" >> $GITHUB_ENV
34+
shell: bash
35+
3236
- name: Install dependencies
3337
run: pip install -e ".[all]"
3438

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ requires-python = ">=3.9"
2727
dependencies = [
2828
"cloudpickle",
2929
"coreforecast>=0.0.12",
30-
"numba>=0.55.0",
30+
"numba>=0.55.0 ; sys_platform != 'win32' or python_version < '3.10' or python_version >= '3.12'",
31+
"numba>=0.58.0,<0.60.0 ; sys_platform == 'win32' and python_version >= '3.10' and python_version < '3.12'",
32+
"llvmlite>=0.41.0,<0.43.0 ; sys_platform == 'win32' and python_version >= '3.10' and python_version < '3.12'",
3133
"numpy>=1.21.6",
3234
"pandas>=1.3.5",
3335
"scipy>=1.7.3,<1.16.0",

tests/test_arima.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def test_arima_transpar(expected_arima_transpar_f):
115115
np.testing.assert_allclose(actual, exp)
116116

117117
params = np.repeat(0.5, 10)
118-
arma = np.ones(5, dtype=np.integer) * 2
118+
arma = np.ones(5, dtype=np.int32) * 2
119119
for exp, calc in zip(
120120
expected_arima_transpar_f, arima_transpar(params, arma, False)
121121
):

tests/test_distributed_fugue.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,9 @@ def test_ray_distributed_exogenous_regressors(df_w_ex):
258258
# Distributed exogenous regressors
259259
sf = StatsForecast(models=[ReturnX()], freq=1)
260260
res = sf.forecast(df=train_df, X_df=xreg, h=4).compute()
261-
expected_res = xreg.compute().rename(columns={"x": "ReturnX"})
261+
expected_res = xreg.compute().rename(columns={"x": "ReturnX"}).sort_values(["unique_id", "ds"])
262262
# we expect strings for unique_id, and ds using exogenous
263263
pd.testing.assert_frame_equal(
264-
res.sort_values("unique_id").reset_index(drop=True).astype(expected_res.dtypes),
264+
res.sort_values(["unique_id", "ds"]).reset_index(drop=True).astype(expected_res.dtypes),
265265
expected_res,
266266
)

0 commit comments

Comments
 (0)