Skip to content

Commit

Permalink
Rename functions
Browse files Browse the repository at this point in the history
  • Loading branch information
disrupted committed Jul 3, 2024
1 parent 084c70d commit 7a6ae64
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions kpops/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def generate(
environment,
verbose,
)
pipeline = create_pipeline(pipeline_path, kpops_config, environment)
pipeline = _create_pipeline(pipeline_path, kpops_config, environment)
log.info(f"Picked up pipeline '{pipeline_path.parent.name}'")
if steps:
component_names = steps
Expand Down Expand Up @@ -320,7 +320,7 @@ def init(
init_project(path, config_include_opt)


def create_pipeline(
def _create_pipeline(
pipeline_path: Path,
kpops_config: KpopsConfig,
environment: str | None,
Expand All @@ -337,12 +337,12 @@ def create_pipeline(
registry.find_components(kpops_config.components_module)
registry.find_components("kpops.components")

handlers = setup_handlers(kpops_config)
handlers = _setup_handlers(kpops_config)
parser = PipelineGenerator(kpops_config, registry, handlers)
return parser.load_yaml(pipeline_path, environment)


def setup_handlers(config: KpopsConfig) -> ComponentHandlers:
def _setup_handlers(config: KpopsConfig) -> ComponentHandlers:
"""Set up handlers for a component.
:param config: KPOps config.
Expand Down
6 changes: 3 additions & 3 deletions tests/api/test_handlers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from pytest_mock import MockerFixture

from kpops.api import setup_handlers
from kpops.api import _setup_handlers
from kpops.component_handlers import ComponentHandlers
from kpops.component_handlers.kafka_connect.kafka_connect_handler import (
KafkaConnectHandler,
Expand Down Expand Up @@ -35,7 +35,7 @@ def test_set_up_handlers_with_no_schema_handler(mocker: MockerFixture):
topic_handler=topic_handler,
)

actual_handlers = setup_handlers(config)
actual_handlers = _setup_handlers(config)

connector_handler_mock.from_kpops_config.assert_called_once_with(config)

Expand Down Expand Up @@ -72,7 +72,7 @@ def test_set_up_handlers_with_schema_handler(mocker: MockerFixture):
topic_handler=topic_handler,
)

actual_handlers = setup_handlers(config)
actual_handlers = _setup_handlers(config)

schema_handler_mock.load_schema_handler.assert_called_once_with(config)

Expand Down

0 comments on commit 7a6ae64

Please sign in to comment.