Repository: getindata/data-pipelines-cli (language: python)

Issue:
Release 0.19.0
Bump version and CHANGELOG for next release.


Discussion / hints:

Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 139714b..4e716ce 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,12 @@
 
 ## [Unreleased]
 
+## [0.19.0] - 2022-04-25
+
+### Added
+
+-   `dp seed` command acting as a wrapper for `dbt seed`.
+
 ## [0.18.0] - 2022-04-19
 
 ### Added
@@ -191,7 +197,9 @@
 -   Draft of `dp init`, `dp create`, `dp template new`, `dp template list` and `dp dbt`
 -   Draft of `dp compile` and `dp deploy`
 
-[Unreleased]: https://github.com/getindata/data-pipelines-cli/compare/0.18.0...HEAD
+[Unreleased]: https://github.com/getindata/data-pipelines-cli/compare/0.19.0...HEAD
+
+[0.19.0]: https://github.com/getindata/data-pipelines-cli/compare/0.18.0...0.19.0
 
 [0.18.0]: https://github.com/getindata/data-pipelines-cli/compare/0.17.0...0.18.0
 
diff --git a/data_pipelines_cli/__init__.py b/data_pipelines_cli/__init__.py
index 431f73d..8d93f40 100644
--- a/data_pipelines_cli/__init__.py
+++ b/data_pipelines_cli/__init__.py
@@ -5,4 +5,4 @@
 pipelines.
 """
 
-version = "0.18.0"
+version = "0.19.0"
diff --git a/data_pipelines_cli/cli.py b/data_pipelines_cli/cli.py
index 7f71ac0..c6845e9 100644
--- a/data_pipelines_cli/cli.py
+++ b/data_pipelines_cli/cli.py
@@ -12,6 +12,7 @@
 from .cli_commands.prepare_env import prepare_env_command
 from .cli_commands.publish import publish_command
 from .cli_commands.run import run_command
+from .cli_commands.seed import seed_command
 from .cli_commands.template import list_templates_command
 from .cli_commands.test import test_command
 from .cli_commands.update import update_command
@@ -42,9 +43,10 @@ def cli() -> None:
 _cli.add_command(docs_command)
 _cli.add_command(generate_group)
 _cli.add_command(init_command)
+_cli.add_command(list_templates_command)
 _cli.add_command(prepare_env_command)
 _cli.add_command(publish_command)
 _cli.add_command(run_command)
-_cli.add_command(list_templates_command)
+_cli.add_command(seed_command)
 _cli.add_command(test_command)
 _cli.add_command(update_command)
diff --git a/data_pipelines_cli/cli_commands/seed.py b/data_pipelines_cli/cli_commands/seed.py
new file mode 100644
index 0000000..18791a0
--- /dev/null
+++ b/data_pipelines_cli/cli_commands/seed.py
@@ -0,0 +1,29 @@
+import click
+
+from ..config_generation import get_profiles_dir_build_path
+from ..dbt_utils import run_dbt_command
+from .compile import compile_project
+
+
+def seed(env: str) -> None:
+    """
+    Run the project on the local machine.
+
+    :param env: Name of the environment
+    :type env: str
+    """
+    compile_project(env)
+    profiles_path = get_profiles_dir_build_path(env)
+    run_dbt_command(("seed",), env, profiles_path)
+
+
+@click.command(name="seed", help="Run 'dbt seed'")
+@click.option(
+    "--env",
+    default="local",
+    type=str,
+    show_default=True,
+    help="Name of the environment",
+)
+def seed_command(env: str) -> None:
+    seed(env)
diff --git a/docs/source/data_pipelines_cli.cli_commands.rst b/docs/source/data_pipelines_cli.cli_commands.rst
index fddc206..a86ebfe 100644
--- a/docs/source/data_pipelines_cli.cli_commands.rst
+++ b/docs/source/data_pipelines_cli.cli_commands.rst
@@ -88,6 +88,14 @@ data\_pipelines\_cli.cli\_commands.run module
    :undoc-members:
    :show-inheritance:
 
+data\_pipelines\_cli.cli\_commands.seed module
+----------------------------------------------
+
+.. automodule:: data_pipelines_cli.cli_commands.seed
+   :members:
+   :undoc-members:
+   :show-inheritance:
+
 data\_pipelines\_cli.cli\_commands.template module
 --------------------------------------------------
 
diff --git a/setup.cfg b/setup.cfg
index 478a16f..945f18c 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 0.18.0
+current_version = 0.19.0
 
 [bumpversion:file:setup.py]
 
diff --git a/setup.py b/setup.py
index 87c7c65..d7b0b2f 100644
--- a/setup.py
+++ b/setup.py
@@ -61,7 +61,7 @@
 
 setup(
     name="data_pipelines_cli",
-    version="0.18.0",
+    version="0.19.0",
     description="CLI for data platform",
     long_description=README,
     long_description_content_type="text/markdown",


Test patch:
diff --git a/tests/cli_commands/test_run_test.py b/tests/cli_commands/test_run_test.py
index 444b7c7..e02f146 100644
--- a/tests/cli_commands/test_run_test.py
+++ b/tests/cli_commands/test_run_test.py
@@ -10,7 +10,7 @@
 
 
 class RunTestCommandTestCase(unittest.TestCase):
-    commands_to_test = ["run", "test", "docs-serve"]
+    commands_to_test = ["run", "test", "seed", "docs-serve"]
     goldens_dir_path = pathlib.Path(__file__).parent.parent.joinpath("goldens")
 
     def setUp(self) -> None: