Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
fix(style)
Browse files Browse the repository at this point in the history
  • Loading branch information
Amatullah committed Sep 27, 2022
1 parent ebf7f68 commit 9df01ac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 8 additions & 2 deletions chaos_genius/views/anomaly_data_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,10 @@ def disable_anomaly(kpi_id):
message = f"Disabled Analytics for KPI ID: {kpi_id}"
status = "success"
else:
message = f"Failed to Disable Anomaly because it is not enabled for KPI ID: {kpi_id}" # noqa: E501
message = (
"Failed to Disable Anomaly because it is not enabled for"
f" KPI ID: {kpi_id}"
)
status = "failure"
else:
message = f"KPI {kpi_id} could not be retreived."
Expand All @@ -438,7 +441,10 @@ def enable_anomaly(kpi_id):
message = f"Enabled Analytics for KPI ID: {kpi_id}"
status = "success"
else:
message = f"KPI ID: {kpi_id}. Analytics enabled but is not configured. Please Configure it to run anomaly." # noqa: E501
message = (
f"KPI ID: {kpi_id}. Analytics enabled but is not configured."
" Please Configure it to run anomaly."
)
status = "success"
logger.warn(message)
else:
Expand Down
2 changes: 0 additions & 2 deletions tests/test_anomaly_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ def get_data_source(*args, **kwargs):
pred_series, deviation_dict = adc._detect_anomaly(
model_name, input_data, last_date, series, subgroup, frequency
)
# columns = ["y", "yhat_lower", "yhat_upper", "anomaly"]
# pred_series[columns] = pred_series[columns].apply(pd.to_numeric)

assert_frame_equal(pred_series, expected[0])
assert deviation_dict == expected[1]

0 comments on commit 9df01ac

Please sign in to comment.