dbt-common 1.0.0b2__py3-none-any.whl → 1.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
dbt_common/__about__.py CHANGED
@@ -1 +1 @@
1
- version = "1.0.0b2"
1
+ version = "1.0.1"
dbt_common/constants.py CHANGED
@@ -1 +1,6 @@
1
+ # Prefix which identifies environment variables which contains secrets.
1
2
  SECRET_ENV_PREFIX = "DBT_ENV_SECRET_"
3
+
4
+ # Prefix which identifies environment variables that should not be visible
5
+ # via macros, flags, or other user-facing mechanisms.
6
+ PRIVATE_ENV_PREFIX = "DBT_ENV_PRIVATE_"
dbt_common/context.py CHANGED
@@ -1,13 +1,14 @@
1
1
  from contextvars import ContextVar, copy_context
2
2
  from typing import List, Mapping, Optional
3
3
 
4
- from dbt_common.constants import SECRET_ENV_PREFIX
4
+ from dbt_common.constants import PRIVATE_ENV_PREFIX, SECRET_ENV_PREFIX
5
5
 
6
6
 
7
7
  class InvocationContext:
8
8
  def __init__(self, env: Mapping[str, str]):
9
- self._env = env
9
+ self._env = {k: v for k, v in env.items() if not k.startswith(PRIVATE_ENV_PREFIX)}
10
10
  self._env_secrets: Optional[List[str]] = None
11
+ self._env_private = {k: v for k, v in env.items() if k.startswith(PRIVATE_ENV_PREFIX)}
11
12
  self.recorder = None
12
13
  # This class will also eventually manage the invocation_id, flags, event manager, etc.
13
14
 
@@ -15,6 +16,10 @@ class InvocationContext:
15
16
  def env(self) -> Mapping[str, str]:
16
17
  return self._env
17
18
 
19
+ @property
20
+ def env_private(self) -> Mapping[str, str]:
21
+ return self._env_private
22
+
18
23
  @property
19
24
  def env_secrets(self) -> List[str]:
20
25
  if self._env_secrets is None:
dbt_common/ui.py CHANGED
@@ -80,3 +80,7 @@ def line_wrap_message(msg: str, subtract: int = 0, dedent: bool = True, prefix:
80
80
 
81
81
  def warning_tag(msg: str) -> str:
82
82
  return f'[{yellow("WARNING")}]: {msg}'
83
+
84
+
85
+ def error_tag(msg: str) -> str:
86
+ return f'[{red("ERROR")}]: {msg}'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dbt-common
3
- Version: 1.0.0b2
3
+ Version: 1.0.1
4
4
  Summary: The shared common utilities that dbt-core and adapter implementations use
5
5
  Project-URL: Homepage, https://github.com/dbt-labs/dbt-common
6
6
  Project-URL: Repository, https://github.com/dbt-labs/dbt-common.git
@@ -1,7 +1,7 @@
1
- dbt_common/__about__.py,sha256=vXiRlfYGCr6aapaYU5Pl2NdHg8ZSZM14e-YuwcuA8Qg,20
1
+ dbt_common/__about__.py,sha256=_ZEXZ9OcLtIJ-gPvOkMv1OKAzml7W1MzZe1jHAUZeBE,18
2
2
  dbt_common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- dbt_common/constants.py,sha256=DJIVuTBl5OZpjdFINHon8MNj_XT-Rrp41dAoAuQL2QI,38
4
- dbt_common/context.py,sha256=rtBKqrvzlgqe-rQfNvalCEsTBxMX-IGPtMLVp57iCkY,1482
3
+ dbt_common/constants.py,sha256=YCCsXl2fBwzh7zqvLg22PhfQQF9TUqHjmvuTbdK62wE,280
4
+ dbt_common/context.py,sha256=BhgT7IgyvpZHEtIdFVVuBBBX5LuU7obXT7NvIPeuD2g,1760
5
5
  dbt_common/dataclass_schema.py,sha256=R8YBju2Z-qRfy5eJa-jYWedS43rXk9P6E9ttofFc9xU,5282
6
6
  dbt_common/helper_types.py,sha256=jW5Yv0Gwx4M14IEX4RID7k4s0hJiKHIzU8CxACQ1Y7k,3491
7
7
  dbt_common/invocation.py,sha256=Zw8jRPn75oi2VrUD6qGvaCDtSyIfqm5pJlPpRjs3s1E,202
@@ -9,7 +9,7 @@ dbt_common/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  dbt_common/record.py,sha256=bQ_1fC5qp_RlQxLXq_wHYl5G37BvkzE0d_F2F39PDUA,7015
10
10
  dbt_common/semver.py,sha256=2zoZYCQ7PfswqslT2NHuMGgPGMuMuX-yRThVoqfDWQU,13954
11
11
  dbt_common/tests.py,sha256=6lC_JuRtoYO6cbAF8-R5aTM4HtQiM_EH8X5m_97duGY,315
12
- dbt_common/ui.py,sha256=P7ZkhLLgjTjChR_ZZvTiWU3H_AyRjgU12-EoC44-1o0,2495
12
+ dbt_common/ui.py,sha256=rc2TEM29raBFc_LXcg901pMDD07C2ohwp9qzkE-7pBY,2567
13
13
  dbt_common/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  dbt_common/clients/_jinja_blocks.py,sha256=xoJK9Y0F93U2PKfT_3SJbBopCGYCtl7LiwKuylXnrEE,12947
15
15
  dbt_common/clients/agate_helper.py,sha256=n5Q0_gJPbBhFvjd286NGYGlcTtdEExYmIT3968lppyg,9124
@@ -55,7 +55,7 @@ dbt_common/utils/encoding.py,sha256=6_kSY2FvGNYMg7oX7PrbvVioieydih3Kl7Ii802LaHI,
55
55
  dbt_common/utils/executor.py,sha256=Zyzd1wML3aN-iYn9ZG2Gc_jj5vknmvQNyH-c0RaPIpo,2446
56
56
  dbt_common/utils/formatting.py,sha256=JUn5rzJ-uajs9wPCN0-f2iRFY1pOJF5YjTD9dERuLoc,165
57
57
  dbt_common/utils/jinja.py,sha256=XNfZHuZhLM_R_yPmzYojPm6bF7QOoxIjSWrkJRw6wks,965
58
- dbt_common-1.0.0b2.dist-info/METADATA,sha256=LDEpB4jfIxd4zIN0KG0hjyg7orBvz5A2ichqmu1hQvk,5221
59
- dbt_common-1.0.0b2.dist-info/WHEEL,sha256=uNdcs2TADwSd5pVaP0Z_kcjcvvTUklh2S7bxZMF8Uj0,87
60
- dbt_common-1.0.0b2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
61
- dbt_common-1.0.0b2.dist-info/RECORD,,
58
+ dbt_common-1.0.1.dist-info/METADATA,sha256=qyr7n4d7PzsGe1p2WGd3iuDVkQ6qqieDHR_er_aVa2k,5219
59
+ dbt_common-1.0.1.dist-info/WHEEL,sha256=as-1oFTWSeWBgyzh0O_qF439xqBe6AbBgt4MfYe5zwY,87
60
+ dbt_common-1.0.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
61
+ dbt_common-1.0.1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.22.4
2
+ Generator: hatchling 1.22.5
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any