Source code for teamscale_client.constants
"""This module contains multiple constants collections typically used when
communicating metrics and findings with Teamscale."""
from enum import Enum
[docs]
class Assessment(str, Enum):
"""Constants to be used as assessment levels."""
RED = "RED"
ORANGE = "ORANGE"
YELLOW = "YELLOW"
GREEN = "GREEN"
BASELINE = "BASELINE"
UNKNOWN = "UNKNOWN"
[docs]
class AssessmentMetricColors(str, Enum):
"""Constants used for colors in assessment metrics. """
RED = "RED"
YELLOW = "YELLOW"
GREEN = "GREEN"
[docs]
class Enablement(str, Enum):
"""The enablement describes which rating a finding should receive."""
RED = "RED"
"""The finding should always be rated red."""
YELLOW = "YELLOW"
"""The finding should always be rated yellow."""
AUTO = "AUTO"
"""The assessment provided by the concrete finding is used."""
OFF = "OFF"
"""The finding is disabled by default."""
[docs]
class MetricAggregation(str, Enum):
"""Class that contains valid aggregation strategies."""
SUM = "SUM"
MAX = "MAX"
MIN = "MIN"
[docs]
class MetricValueType(str, Enum):
"""Metric value types."""
NUMERIC = "NUMERIC"
TIMESTAMP = "TIMESTAMP"
ASSESSMENT = "ASSESSMENT"
[docs]
class MetricProperties(str, Enum):
"""Possible properties used in metric definitions."""
SIZE_METRIC = "SIZE_METRIC"
"""Normal number counting metric."""
RATIO_METRIC = "RATIO_METRIC"
"""Metric is a percentage value between 0 and 1."""
QUALITY_NEUTRAL = "QUALITY_NEUTRAL"
"""Quality neutral metrics can not be assessed/rated (e.g. number of files)"""
LOW_IS_BAD = "LOW_IS_BAD"
"""Normally high values are considered bad, use this to inverse."""
[docs]
class ConnectorType(str, Enum):
"""Connector types."""
TFS = "Azure DevOps TFVC (TFS)"
FILE_SYSTEM = "File System"
MULTI_VERSION_FILE_SYSTEM = "Multi-Version File System"
GIT = "Git"
SVN = "Subversion"
GERRIT = "Gerrit"
ADO_GIT = "Azure DevOps Git"
[docs]
class TaskStatus(str, Enum):
"""Different statuses a task in Teamscale can have"""
OPEN = "OPEN"
RESOLVED = "RESOLVED"
VERIFIED = "VERIFIED"
DISCARDED = "DISCARDED"
[docs]
class TaskResolution(str, Enum):
"""Different resolutions used in tasks"""
NONE = "NONE"
FIXED = "FIXED"
INFEASIBLE = "INFEASIBLE"
TOO_MUCH_EFFORT = "TOO_MUCH_EFFORT"