Skip to content

Commit

Permalink
remove relative imports
Browse files Browse the repository at this point in the history
  • Loading branch information
solidiquis committed Jun 18, 2024
1 parent b294c04 commit 9565d75
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 38 deletions.
4 changes: 2 additions & 2 deletions python/lib/sift_py/ingestion/config/telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

from typing import List, Optional

from ..flow import FlowConfig
from ..rule.config import RuleConfig
from sift_py.ingestion.flow import FlowConfig
from sift_py.ingestion.rule.config import RuleConfig


class TelemetryConfig:
Expand Down
15 changes: 10 additions & 5 deletions python/lib/sift_py/ingestion/config/yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,21 @@
from typing import Dict, List, Literal, Optional, TypedDict, cast

import yaml
from typing_extensions import NotRequired

from ..channel import ChannelBitFieldElement, ChannelDataType, ChannelEnumType, channel_fqn
from ..flow import ChannelConfig, FlowConfig
from ..rule.config import (
from sift_py.ingestion.channel import (
ChannelBitFieldElement,
ChannelDataType,
ChannelEnumType,
channel_fqn,
)
from sift_py.ingestion.flow import ChannelConfig, FlowConfig
from sift_py.ingestion.rule.config import (
RuleActionAnnotationKind,
RuleActionCreateDataReviewAnnotation,
RuleActionCreatePhaseAnnotation,
RuleConfig,
)
from typing_extensions import NotRequired

from .telemetry import TelemetryConfig


Expand Down
15 changes: 7 additions & 8 deletions python/lib/sift_py/ingestion/config/yaml_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@

import pytest
import yaml

from ..channel import ChannelDataType
from ..rule.config import (
RuleActionCreateDataReviewAnnotation,
RuleActionCreatePhaseAnnotation,
RuleActionKind,
)
from .yaml import (
from sift_py.ingestion.channel import ChannelDataType
from sift_py.ingestion.config.yaml import (
NamedExpressionsYamlSpec,
YamlConfigError,
_try_from_yaml_str,
)
from sift_py.ingestion.rule.config import (
RuleActionCreateDataReviewAnnotation,
RuleActionCreatePhaseAnnotation,
RuleActionKind,
)


def test_telemetry_config():
Expand Down
13 changes: 6 additions & 7 deletions python/lib/sift_py/ingestion/impl/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,15 @@
from sift.runs.v2.runs_pb2 import CreateRunRequest, CreateRunResponse
from sift.runs.v2.runs_pb2_grpc import RunServiceStub
from sift_internal.convert.json import to_json

from ...grpc.transport import SiftChannel
from ..channel import ChannelValue, channel_fqn, empty_value, is_data_type
from ..config.telemetry import TelemetryConfig
from ..flow import FlowConfig
from ..rule.config import RuleConfig
from .ingestion_config import (
from sift_py.grpc.transport import SiftChannel
from sift_py.ingestion.channel import ChannelValue, channel_fqn, empty_value, is_data_type
from sift_py.ingestion.config.telemetry import TelemetryConfig
from sift_py.ingestion.flow import FlowConfig
from sift_py.ingestion.impl.ingestion_config import (
create_ingestion_config,
get_ingestion_config_by_client_key,
)
from sift_py.ingestion.rule.config import RuleConfig


class IngestionServiceImpl:
Expand Down
5 changes: 2 additions & 3 deletions python/lib/sift_py/ingestion/impl/ingestion_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
IngestionConfigServiceStub,
)
from sift_internal.convert.protobuf import try_cast_pb

from ...grpc.transport import SiftChannel
from ..flow import FlowConfig
from sift_py.grpc.transport import SiftChannel
from sift_py.ingestion.flow import FlowConfig


def get_ingestion_config_by_client_key(
Expand Down
14 changes: 10 additions & 4 deletions python/lib/sift_py/ingestion/impl/rule.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
from ...grpc.transport import SiftChannel
from ..rule.config import RuleConfig
from sift.rules.v1.rules_pb2 import UpdateJsonRulesRequest, UpdateJsonRulesResponse, JsonRulesRequest
from typing import List, Optional, cast

from sift.rules.v1.rules_pb2 import (
JsonRulesRequest,
UpdateJsonRulesRequest,
UpdateJsonRulesResponse,
)
from sift.rules.v1.rules_pb2_grpc import RuleServiceStub
from sift_internal.convert.json import to_json
from typing import cast, List, Optional
from sift_py.grpc.transport import SiftChannel
from sift_py.ingestion.rule.config import RuleConfig


def update_rules(
transport_channel: SiftChannel,
Expand Down
3 changes: 1 addition & 2 deletions python/lib/sift_py/ingestion/rule/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
from sift.annotations.v1.annotations_pb2 import AnnotationType
from sift.rules.v1.rules_pb2 import ActionKind
from sift_internal.convert.json import AsJson

from ..channel import ChannelConfig, channel_fqn
from sift_py.ingestion.channel import ChannelConfig, channel_fqn


class RuleConfig(AsJson):
Expand Down
3 changes: 2 additions & 1 deletion python/lib/sift_py/ingestion/rule/config_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from ..channel import ChannelConfig, ChannelDataType
from sift_py.ingestion.channel import ChannelConfig, ChannelDataType

from .config import (
RuleActionCreateDataReviewAnnotation,
RuleActionCreatePhaseAnnotation,
Expand Down
11 changes: 5 additions & 6 deletions python/lib/sift_py/ingestion/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
IngestWithConfigDataStreamRequest,
)
from sift.ingestion_configs.v1.ingestion_configs_pb2 import IngestionConfig

from ..grpc.transport import SiftChannel
from ..ingestion.flow import FlowConfig
from .channel import ChannelValue
from .config.telemetry import TelemetryConfig
from .impl.ingest import IngestionServiceImpl
from sift_py.grpc.transport import SiftChannel
from sift_py.ingestion.channel import ChannelValue
from sift_py.ingestion.config.telemetry import TelemetryConfig
from sift_py.ingestion.flow import FlowConfig
from sift_py.ingestion.impl.ingest import IngestionServiceImpl


class IngestionService(IngestionServiceImpl):
Expand Down

0 comments on commit 9565d75

Please sign in to comment.