mistercrunch commented on a change in pull request #9107: feat: add rolling
window support to 'Big Number with Trendline' viz
URL:
https://github.com/apache/incubator-superset/pull/9107#discussion_r377399726
##########
File path: tests/viz_tests.py
##########
@@ -1163,3 +1163,26 @@ def test_process_data_resample(self):
.tolist(),
[1.0, 2.0, np.nan, np.nan, 5.0, np.nan, 7.0],
)
+
+ def test_apply_roling(self):
+ datasource = self.get_datasource_mock()
+ df = pd.DataFrame(
+ index=pd.to_datetime(
+ ["2019-01-01", "2019-01-02", "2019-01-05", "2019-01-07"]
+ ),
+ data={"y": [1.0, 1.0, 1.0, 1.0]},
+ )
+ self.assertEqual(
+ viz.BigNumberViz(
+ datasource,
+ {
+ "metrics": ["y"],
+ "rolling_type": "cumsum",
Review comment:
Agreed, that was the plan to fast follow once I manage to get `tox` working
locally. Somehow it's really hard to install python3.6 on a new Mac.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]