-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
37 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,28 @@ | ||
|
||
import logging | ||
from pathlib import Path | ||
from hooks.gen_docs.gen_docs_env_vars import collect_fields | ||
|
||
from kpops.cli.pipeline_config import PipelineConfig | ||
from hooks.gen_docs.gen_docs_env_vars import collect_fields | ||
from kpops.config import KpopsConfig | ||
|
||
log = logging.getLogger("cli_commands_utils") | ||
|
||
|
||
|
||
def touch_yaml_file(file_name, dir_path) -> Path: | ||
file_path = Path(dir_path / (file_name + ".yaml")) | ||
file_path.touch(exist_ok=False) | ||
return file_path | ||
|
||
|
||
def create_config(file_name: str, dir_path: Path) -> None: | ||
file_path = touch_yaml_file(file_name, dir_path) | ||
config_fields = collect_fields(PipelineConfig) | ||
config_fields = collect_fields(KpopsConfig) | ||
with file_path.open(mode="w"): | ||
|
||
... | ||
|
||
|
||
def create_defaults(file_name: str, dir_path: Path) -> None: | ||
file_path = touch_yaml_file(file_name, dir_path) | ||
|
||
|
||
def create_pipeline(file_name: str, dir_path: Path) -> None: | ||
file_path = touch_yaml_file(file_name, dir_path) | ||