Skip to content

Commit

Permalink
renaming (Azure#19280)
Browse files Browse the repository at this point in the history
* renaming

* update
  • Loading branch information
xiangyan99 authored Jun 16, 2021
1 parent 380445f commit 16185c2
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 21 deletions.
7 changes: 6 additions & 1 deletion sdk/metricsadvisor/azure-ai-metricsadvisor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# Release History

## 1.0.0b5 (Unreleased)
## 1.0.0 (Unreleased)

**Breaking Changes**

- Renamed
- `DetectionConditionsOperator` -> `DetectionConditionOperator`
- `cross_conditions_operator` -> `condition_operator`

## 1.0.0b4 (2021-06-07)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ def update_data_feed(
:keyword fill_type: The type of fill missing point for anomaly detection. Possible
values include: "SmartFilling", "PreviousValue", "CustomValue", "NoFilling". Default value:
"SmartFilling".
:paramtype fill_type: str or ~azure.ai.metricsadvisor.models.DataSourceMissingDataPointFillType
:paramtype fill_type: str or ~azure.ai.metricsadvisor.models.DatasourceMissingDataPointFillType
:keyword float custom_fill_value: The value of fill missing point for anomaly detection
if "CustomValue" fill type is specified.
:keyword list[str] admin_emails: Data feed administrator emails.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
# Licensed under the MIT License.
# ------------------------------------

VERSION = "1.0.0b5"
VERSION = "1.0.0"

SDK_MONIKER = "ai-metricsadvisor/{}".format(VERSION) # type: str
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ async def update_data_feed(
:keyword fill_type: The type of fill missing point for anomaly detection. Possible
values include: "SmartFilling", "PreviousValue", "CustomValue", "NoFilling". Default value:
"SmartFilling".
:paramtype fill_type: str or ~azure.ai.metricsadvisor.models.DataSourceMissingDataPointFillType
:paramtype fill_type: str or ~azure.ai.metricsadvisor.models.DatasourceMissingDataPointFillType
:keyword float custom_fill_value: The value of fill missing point for anomaly detection
if "CustomValue" fill type is specified.
:keyword list[str] admin_emails: Data feed administrator emails.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
DataSourceType as DatasourceType,
ViewMode as DataFeedAccessMode,
RollUpMethod as DataFeedAutoRollupMethod,
FillMissingPointType as DataSourceMissingDataPointFillType,
FillMissingPointType as DatasourceMissingDataPointFillType,
AnomalyDetectorDirection,
IncidentStatus as AnomalyIncidentStatus,
Granularity as DataFeedGranularityType,
Expand Down Expand Up @@ -101,7 +101,7 @@
DataFeedDimension,
DataFeedMetric,
DataFeedIngestionProgress,
DetectionConditionsOperator,
DetectionConditionOperator,
AnomalyDetectionConfiguration,
MetricAnomalyAlertConditions,
AnomalyIncident,
Expand Down Expand Up @@ -176,7 +176,7 @@
"EmailNotificationHook",
"WebNotificationHook",
"DataFeedIngestionProgress",
"DetectionConditionsOperator",
"DetectionConditionOperator",
"MetricAnomalyAlertConditions",
"EnrichmentStatus",
"DataFeedGranularityType",
Expand All @@ -188,7 +188,7 @@
"DataFeedAccessMode",
"DataFeedRollupType",
"DataFeedAutoRollupMethod",
"DataSourceMissingDataPointFillType",
"DatasourceMissingDataPointFillType",
"DataFeedIngestionStatus",
"SmartDetectionCondition",
"SuppressCondition",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class MetricAnomalyAlertConfigurationsOperator(str, Enum):
XOR = "XOR"


class DetectionConditionsOperator(str, Enum):
class DetectionConditionOperator(str, Enum):

AND = "AND"
OR = "OR"
Expand Down Expand Up @@ -253,7 +253,7 @@ class DataFeedMissingDataPointFillSettings(object):
:keyword fill_type: The type of fill missing point for anomaly detection. Possible
values include: "SmartFilling", "PreviousValue", "CustomValue", "NoFilling". Default value:
"SmartFilling".
:paramtype fill_type: str or ~azure.ai.metricsadvisor.models.DataSourceMissingDataPointFillType
:paramtype fill_type: str or ~azure.ai.metricsadvisor.models.DatasourceMissingDataPointFillType
:keyword float custom_fill_value: The value of fill missing point for anomaly detection
if "CustomValue" fill type is specified.
"""
Expand Down Expand Up @@ -777,7 +777,7 @@ class AnomalyAlertConfiguration(object):
include: "AND", "OR", "XOR".
:vartype cross_metrics_operator: str or
~azure.ai.metricsadvisor.models.MetricAnomalyAlertConfigurationsOperator
:keyword list[str] dimensions_to_split_alerts: dimensions used to split alert.
:keyword list[str] dimensions_to_split_alert: dimensions used to split alert.
"""
def __init__(self, name, metric_alert_configurations, hook_ids, **kwargs):
Expand All @@ -788,18 +788,18 @@ def __init__(self, name, metric_alert_configurations, hook_ids, **kwargs):
self.id = kwargs.get('id', None)
self.description = kwargs.get('description', None)
self.cross_metrics_operator = kwargs.get('cross_metrics_operator', None)
self.dimensions_to_split_alerts = kwargs.get('dimensions_to_split_alerts', None)
self.dimensions_to_split_alert = kwargs.get('dimensions_to_split_alert', None)

def __repr__(self):
return "AnomalyAlertConfiguration(id={}, name={}, description={}, cross_metrics_operator={}, hook_ids={}, " \
"metric_alert_configurations={}, dimensions_to_split_alerts={})".format(
"metric_alert_configurations={}, dimensions_to_split_alert={})".format(
self.id,
self.name,
self.description,
self.cross_metrics_operator,
self.hook_ids,
repr(self.metric_alert_configurations),
self.dimensions_to_split_alerts
self.dimensions_to_split_alert
)[:1024]

@classmethod
Expand All @@ -814,7 +814,7 @@ def _from_generated(cls, config):
MetricAlertConfiguration._from_generated(c)
for c in config.metric_alerting_configurations
],
dimensions_to_split_alerts=config.split_alert_by_dimensions
dimensions_to_split_alert=config.split_alert_by_dimensions
)

def _to_generated(self):
Expand All @@ -826,7 +826,7 @@ def _to_generated(self):
hook_ids=self.hook_ids,
cross_metrics_operator=self.cross_metrics_operator,
description=self.description,
split_alert_by_dimensions=self.dimensions_to_split_alerts
split_alert_by_dimensions=self.dimensions_to_split_alert
)

def _to_generated_patch(
Expand All @@ -845,7 +845,7 @@ def _to_generated_patch(
hook_ids=hook_ids or self.hook_ids,
cross_metrics_operator=cross_metrics_operator or self.cross_metrics_operator,
description=description or self.description,
split_alert_by_dimensions=self.dimensions_to_split_alerts
split_alert_by_dimensions=self.dimensions_to_split_alert
)


Expand Down Expand Up @@ -2087,7 +2087,7 @@ class MetricDetectionCondition(object):
should be specified when combining multiple detection conditions. Possible values include:
"AND", "OR".
:paramtype condition_operator: str or
~azure.ai.metricsadvisor.models.DetectionConditionsOperator
~azure.ai.metricsadvisor.models.DetectionConditionOperator
:keyword smart_detection_condition:
:paramtype smart_detection_condition: ~azure.ai.metricsadvisor.models.SmartDetectionCondition
:keyword hard_threshold_condition:
Expand Down Expand Up @@ -2383,7 +2383,7 @@ class MetricSeriesGroupDetectionCondition(MetricDetectionCondition):
should be specified when combining multiple detection conditions. Possible values include:
"AND", "OR".
:paramtype condition_operator: str or
~azure.ai.metricsadvisor.models.DetectionConditionsOperator
~azure.ai.metricsadvisor.models.DetectionConditionOperator
:keyword smart_detection_condition:
:paramtype smart_detection_condition: ~azure.ai.metricsadvisor.models.SmartDetectionCondition
:keyword hard_threshold_condition:
Expand Down Expand Up @@ -2439,7 +2439,7 @@ class MetricSingleSeriesDetectionCondition(MetricDetectionCondition):
should be specified when combining multiple detection conditions. Possible values include:
"AND", "OR".
:paramtype condition_operator: str or
~azure.ai.metricsadvisor.models.DetectionConditionsOperator
~azure.ai.metricsadvisor.models.DetectionConditionOperator
:keyword smart_detection_condition:
:paramtype smart_detection_condition: ~azure.ai.metricsadvisor.models.SmartDetectionCondition
:keyword hard_threshold_condition:
Expand Down
2 changes: 1 addition & 1 deletion sdk/metricsadvisor/azure-ai-metricsadvisor/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
author_email='[email protected]',
url='https://github.com/Azure/azure-sdk-for-python',
classifiers=[
"Development Status :: 4 - Beta",
"Development Status :: 5 - Production/Stable",
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
Expand Down

0 comments on commit 16185c2

Please sign in to comment.