chore(prophet): bump prophet to 1.0.1 (#14228)

This commit is contained in:
Ville Brofeldt
2021-04-20 15:55:55 +03:00
committed by GitHub
parent 0807ab44a5
commit 55bf72aead
4 changed files with 15 additions and 6 deletions

View File

@@ -16,6 +16,7 @@
# under the License.
# isort:skip_file
from datetime import datetime
from importlib.util import find_spec
import math
from typing import Any, List, Optional
@@ -560,7 +561,7 @@ class TestPostProcessing(SupersetTestCase):
self.assertListEqual(processed_df["pct_a"].tolist(), [0.25, 0.75])
def test_prophet_valid(self):
pytest.importorskip("fbprophet")
pytest.importorskip("prophet")
df = proc.prophet(
df=prophet_df, time_grain="P1M", periods=3, confidence_interval=0.9
@@ -588,6 +589,14 @@ class TestPostProcessing(SupersetTestCase):
assert df[DTTM_ALIAS].iloc[-1].to_pydatetime() == datetime(2022, 5, 31)
assert len(df) == 9
def test_prophet_import(self):
prophet = find_spec("prophet")
if prophet is None:
with pytest.raises(QueryObjectValidationError):
proc.prophet(
df=prophet_df, time_grain="P1M", periods=3, confidence_interval=0.9
)
def test_prophet_missing_temporal_column(self):
df = prophet_df.drop(DTTM_ALIAS, axis=1)