mirror of
https://github.com/apache/superset.git
synced 2026-06-06 16:19:18 +00:00
chore(prophet): bump prophet to 1.0.1 (#14228)
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user