Skip to content

Commit 110a17a

Browse files
github-actions[bot]SanthinPiotrSierkin-Kip-pekalagithub-actions
authored
Release 0.22.0 (#85)
* [DATA-366] Update datahub package and add dbt extra (#79) * feat: update datahub package and add dbt extra * fix: replace datahub requirements * fix: pre-commit coma Co-authored-by: Piotr Sierkin <piotr.sierkin@getindata.com> * Documentation improvement (#80) * Documentation improvement * dp compile default environment has been set to local * GitPython is not required anymore (#83) Installation docs upgrade * chore: bump datahub (#84) Co-authored-by: Piotr Sierkin <piotr.sierkin@getindata.com> * FIX #85 - Bump version and CHANGELOG for release 0.22.0 Co-authored-by: Piotr Sierkin <psierkin@gmail.com> Co-authored-by: Piotr Sierkin <piotr.sierkin@getindata.com> Co-authored-by: Piotr Pękala <piotr.pekala@getindata.com> Co-authored-by: github-actions <github-actions@github.com>
1 parent f108bd3 commit 110a17a

File tree

8 files changed

+67
-29
lines changed

8 files changed

+67
-29
lines changed

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
## [Unreleased]
44

5+
## [0.22.0] - 2022-08-22
6+
7+
- `dp compile` default environment hes been set to `local`
8+
- GitPython is not required anymore
9+
- Installation documentation upgrade
10+
511
## [0.21.0] - 2022-07-19
612

713
- Documentation improvements
@@ -211,7 +217,9 @@
211217
- Draft of `dp init`, `dp create`, `dp template new`, `dp template list` and `dp dbt`
212218
- Draft of `dp compile` and `dp deploy`
213219

214-
[Unreleased]: https://github.com/getindata/data-pipelines-cli/compare/0.21.0...HEAD
220+
[Unreleased]: https://github.com/getindata/data-pipelines-cli/compare/0.22.0...HEAD
221+
222+
[0.22.0]: https://github.com/getindata/data-pipelines-cli/compare/0.21.0...0.22.0
215223

216224
[0.21.0]: https://github.com/getindata/data-pipelines-cli/compare/0.20.1...0.21.0
217225

data_pipelines_cli/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
pipelines.
66
"""
77

8-
version = "0.21.0"
8+
version = "0.22.0"

data_pipelines_cli/cli_commands/compile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def compile_project(
128128
)
129129
@click.option(
130130
"--env",
131-
default="base",
131+
default="local",
132132
type=str,
133133
show_default=True,
134134
required=True,

data_pipelines_cli/cli_commands/publish.py

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,21 @@
77
import yaml
88
from dbt.contracts.graph.manifest import Manifest, ManifestNode
99
from dbt.contracts.graph.parsed import ColumnInfo
10-
from git import Repo
1110

1211
from ..cli_constants import BUILD_DIR
13-
from ..cli_utils import echo_info
12+
from ..cli_utils import echo_info, echo_warning
1413
from ..config_generation import read_dictionary_from_config_directory
1514
from ..data_structures import DbtModel, DbtSource, DbtTableColumn
1615
from ..errors import DataPipelinesError
1716

17+
try:
18+
from git import Repo
19+
20+
GIT_EXISTS = True
21+
except ImportError:
22+
echo_warning("Git support not installed.")
23+
GIT_EXISTS = False
24+
1825

1926
def _get_project_name_and_version() -> Tuple[str, str]:
2027
with open(pathlib.Path.cwd().joinpath("dbt_project.yml"), "r") as f:
@@ -132,17 +139,18 @@ def _copy_publication_to_repo(package_dest: pathlib.Path, package_path: pathlib.
132139
shutil.copytree(package_path, package_dest)
133140

134141

135-
def _configure_git_env(repo: Repo, config: Dict[str, Any]) -> None:
136-
repo.config_writer().set_value("user", "name", config["username"]).release()
137-
repo.config_writer().set_value("user", "email", config["email"]).release()
142+
if GIT_EXISTS:
138143

144+
def _configure_git_env(repo: Repo, config: Dict[str, Any]) -> None:
145+
repo.config_writer().set_value("user", "name", config["username"]).release()
146+
repo.config_writer().set_value("user", "email", config["email"]).release()
139147

140-
def _commit_and_push_changes(repo: Repo, project_name: str, project_version: str) -> None:
141-
echo_info("Publishing")
142-
repo.git.add(all=True)
143-
repo.index.commit(f"Publication from project {project_name}, version: {project_version}")
144-
origin = repo.remote(name="origin")
145-
origin.push()
148+
def _commit_and_push_changes(repo: Repo, project_name: str, project_version: str) -> None:
149+
echo_info("Publishing")
150+
repo.git.add(all=True)
151+
repo.index.commit(f"Publication from project {project_name}, version: {project_version}")
152+
origin = repo.remote(name="origin")
153+
origin.push()
146154

147155

148156
def publish_package(package_path: pathlib.Path, key_path: str, env: str) -> None:

docs/installation.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/installation.rst

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Installation
2+
------------
3+
Use the package manager `pip <https://pip.pypa.io/en/stable/>`_ to
4+
install `data-pipelines-cli <https://pypi.org/project/data-pipelines-cli/>`_:
5+
6+
7+
.. code-block:: bash
8+
9+
pip install data-pipelines-cli[<flags>]
10+
11+
Depending on the systems that you want to integrate with you need to provide different flags in square brackets. You can provide comma separate list of flags, for example:
12+
13+
.. code-block:: bash
14+
15+
pip install data-pipelines-cli[gcs,git,bigquery]
16+
17+
18+
Depending on the data storage you have you can use:
19+
20+
* bigquery
21+
* snowflake
22+
* redshift
23+
* postgres
24+
25+
If you need git integration for loading packages published by other projects or publish them by yourself you will need:
26+
27+
* git
28+
29+
If you want to deploy created artifacts (docker images and DataHub metadata) add the following flags:
30+
31+
* docker
32+
* datahub
33+
34+
These are not usually used by a person user.

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.21.0
2+
current_version = 0.22.0
33

44
[bumpversion:file:setup.py]
55

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"redshift": ["dbt-redshift==1.1.0"],
3434
# ---
3535
"docker": ["docker>=5.0"],
36-
"datahub": ["acryl-datahub[dbt]>=0.8.39"],
36+
"datahub": ["acryl-datahub[dbt]==0.8.43.2"],
3737
"git": ["GitPython==3.1.26"],
3838
"tests": [
3939
"pytest>=6.2.2, <7.0.0",
@@ -64,7 +64,7 @@
6464

6565
setup(
6666
name="data_pipelines_cli",
67-
version="0.21.0",
67+
version="0.22.0",
6868
description="CLI for data platform",
6969
long_description=README,
7070
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)