Skip to content

Commit

Permalink
Try solve circular import
Browse files Browse the repository at this point in the history
  • Loading branch information
disrupted committed Jul 8, 2024
1 parent cbff01c commit 20368ae
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion hooks/gen_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from pathlib import Path

from hooks import ROOT
from kpops.api.file_type import KpopsFileType
from kpops.const.file_type import KpopsFileType
from kpops.utils.gen_schema import (
gen_config_schema,
gen_defaults_schema,
Expand Down
7 changes: 6 additions & 1 deletion kpops/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@
import typer

import kpops.api as kpops
from kpops.api.file_type import CONFIG_YAML, DEFAULTS_YAML, PIPELINE_YAML, KpopsFileType
from kpops.api.options import FilterType
from kpops.cli.utils import (
collect_pipeline_paths,
)
from kpops.config import ENV_PREFIX
from kpops.const import KPOPS, __version__
from kpops.const.file_type import (
CONFIG_YAML,
DEFAULTS_YAML,
PIPELINE_YAML,
KpopsFileType,
)
from kpops.utils.gen_schema import (
gen_config_schema,
gen_defaults_schema,
Expand Down
2 changes: 1 addition & 1 deletion kpops/cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from collections.abc import Iterable, Iterator
from pathlib import Path

from kpops.api.file_type import PIPELINE_YAML
from kpops.const.file_type import PIPELINE_YAML


def collect_pipeline_paths(pipeline_paths: Iterable[Path]) -> Iterator[Path]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
)
from pydantic.json_schema import SkipJsonSchema

from kpops.api.file_type import KpopsFileType
from kpops.component_handlers import ComponentHandlers
from kpops.config import KpopsConfig
from kpops.const.file_type import KpopsFileType
from kpops.utils import cached_classproperty
from kpops.utils.dict_ops import (
generate_substitution,
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion kpops/utils/cli_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from pydantic.fields import FieldInfo
from pydantic_core import PydanticUndefined

from kpops.api.file_type import KpopsFileType
from kpops.config import KpopsConfig
from kpops.const.file_type import KpopsFileType
from kpops.utils.docstring import describe_object
from kpops.utils.json import is_jsonable
from kpops.utils.pydantic import collect_fields, issubclass_patched
Expand Down
2 changes: 1 addition & 1 deletion tests/compiler/test_pipeline_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from kpops.api.file_type import KpopsFileType
from kpops.const.file_type import KpopsFileType
from kpops.pipeline import PipelineGenerator
from kpops.utils.environment import ENV

Expand Down
2 changes: 1 addition & 1 deletion tests/components/test_base_defaults_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
import pydantic
import pytest

from kpops.api.file_type import DEFAULTS_YAML, PIPELINE_YAML, KpopsFileType
from kpops.component_handlers import ComponentHandlers
from kpops.components.base_components.base_defaults_component import (
BaseDefaultsComponent,
get_defaults_file_paths,
)
from kpops.config import KpopsConfig
from kpops.const.file_type import DEFAULTS_YAML, PIPELINE_YAML, KpopsFileType
from kpops.pipeline import PIPELINE_PATH
from kpops.utils.environment import ENV
from tests.components import PIPELINE_BASE_DIR, RESOURCES_PATH
Expand Down
2 changes: 1 addition & 1 deletion tests/pipeline/test_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

import kpops.api as kpops
from kpops.api.exception import ParsingException, ValidationError
from kpops.api.file_type import PIPELINE_YAML, KpopsFileType
from kpops.cli.main import FilterType, app
from kpops.components.base_components.kafka_connector import KafkaSinkConnector
from kpops.components.base_components.pipeline_component import PipelineComponent
from kpops.const.file_type import PIPELINE_YAML, KpopsFileType

runner = CliRunner()

Expand Down

0 comments on commit 20368ae

Please sign in to comment.