dbt-common 1.0.1__tar.gz → 1.0.2__tar.gz
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-1.0.1 → dbt_common-1.0.2}/PKG-INFO +1 -1
- dbt_common-1.0.2/dbt_common/__about__.py +1 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/constants.py +2 -2
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/events/functions.py +4 -5
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/helper_types.py +13 -1
- dbt_common-1.0.1/dbt_common/__about__.py +0 -1
- {dbt_common-1.0.1 → dbt_common-1.0.2}/.gitignore +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/CHANGELOG.md +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/LICENSE +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/README.md +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/codecov.yml +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/__init__.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/clients/__init__.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/clients/_jinja_blocks.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/clients/agate_helper.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/clients/jinja.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/clients/system.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/context.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/contracts/__init__.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/contracts/config/__init__.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/contracts/config/base.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/contracts/config/materialization.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/contracts/config/metadata.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/contracts/config/properties.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/contracts/constraints.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/contracts/util.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/dataclass_schema.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/events/README.md +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/events/__init__.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/events/base_types.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/events/contextvars.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/events/event_handler.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/events/event_manager.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/events/event_manager_client.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/events/format.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/events/helpers.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/events/interfaces.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/events/logger.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/events/types.proto +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/events/types.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/events/types_pb2.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/exceptions/__init__.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/exceptions/base.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/exceptions/cache.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/exceptions/connection.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/exceptions/contracts.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/exceptions/events.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/exceptions/jinja.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/exceptions/macros.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/exceptions/system.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/invocation.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/py.typed +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/record.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/semver.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/tests.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/ui.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/utils/__init__.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/utils/casting.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/utils/connection.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/utils/dict.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/utils/encoding.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/utils/executor.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/utils/formatting.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/dbt_common/utils/jinja.py +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/docs/arch/adr-0001-build-tooling.md +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/pyproject.toml +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/agate/__init__.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/agate/data_types.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/colorama/__init__.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/isodate/__init__.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/__init__.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/config.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/core/__init__.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/core/const.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/core/helpers.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/core/meta/__init__.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/core/meta/code/__init__.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/core/meta/code/builder.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/core/meta/code/lines.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/core/meta/helpers.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/core/meta/mixin.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/core/meta/types/__init__.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/core/meta/types/common.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/core/meta/types/pack.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/core/meta/types/unpack.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/dialect.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/exceptions.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/helper.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/jsonschema/__init__.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/jsonschema/annotations.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/jsonschema/builder.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/jsonschema/dialects.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/jsonschema/models.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/jsonschema/schema.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/mixins/__init__.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/mixins/dict.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/mixins/json.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/mixins/msgpack.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/mixins/orjson.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/mixins/toml.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/mixins/yaml.pyi +0 -0
- {dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/types.pyi +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: dbt-common
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.2
|
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
|
@@ -0,0 +1 @@
|
|
1
|
+
version = "1.0.2"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Prefix which identifies environment variables which contains secrets.
|
2
|
-
SECRET_ENV_PREFIX = "
|
2
|
+
SECRET_ENV_PREFIX = "DBT_ENV_SECRET"
|
3
3
|
|
4
4
|
# Prefix which identifies environment variables that should not be visible
|
5
5
|
# via macros, flags, or other user-facing mechanisms.
|
6
|
-
PRIVATE_ENV_PREFIX = "
|
6
|
+
PRIVATE_ENV_PREFIX = "DBT_ENV_PRIVATE"
|
@@ -1,6 +1,7 @@
|
|
1
1
|
from pathlib import Path
|
2
2
|
|
3
3
|
from dbt_common.events.event_manager_client import get_event_manager
|
4
|
+
from dbt_common.exceptions import EventCompilationError
|
4
5
|
from dbt_common.invocation import get_invocation_id
|
5
6
|
from dbt_common.helper_types import WarnErrorOptions
|
6
7
|
from dbt_common.utils.encoding import ForgivingJSONEncoder
|
@@ -114,12 +115,10 @@ def msg_to_dict(msg: EventMsg) -> dict:
|
|
114
115
|
|
115
116
|
|
116
117
|
def warn_or_error(event, node=None) -> None:
|
117
|
-
|
118
|
-
|
119
|
-
from dbt_common.exceptions import EventCompilationError
|
120
|
-
|
118
|
+
event_name = type(event).__name__
|
119
|
+
if WARN_ERROR or WARN_ERROR_OPTIONS.includes(event_name):
|
121
120
|
raise EventCompilationError(event.message(), node)
|
122
|
-
|
121
|
+
elif not WARN_ERROR_OPTIONS.silenced(event_name):
|
123
122
|
fire_event(event)
|
124
123
|
|
125
124
|
|
@@ -54,7 +54,7 @@ class IncludeExclude(dbtClassMixin):
|
|
54
54
|
if isinstance(self.exclude, list):
|
55
55
|
self._validate_items(self.exclude)
|
56
56
|
|
57
|
-
def includes(self, item_name: str):
|
57
|
+
def includes(self, item_name: str) -> bool:
|
58
58
|
return (
|
59
59
|
item_name in self.include or self.include in self.INCLUDE_ALL
|
60
60
|
) and item_name not in self.exclude
|
@@ -69,10 +69,22 @@ class WarnErrorOptions(IncludeExclude):
|
|
69
69
|
include: Union[str, List[str]],
|
70
70
|
exclude: Optional[List[str]] = None,
|
71
71
|
valid_error_names: Optional[Set[str]] = None,
|
72
|
+
silence: Optional[List[str]] = None,
|
72
73
|
):
|
74
|
+
self.silence = silence or []
|
73
75
|
self._valid_error_names: Set[str] = valid_error_names or set()
|
74
76
|
super().__init__(include=include, exclude=(exclude or []))
|
75
77
|
|
78
|
+
def __post_init__(self):
|
79
|
+
super().__post_init__()
|
80
|
+
self._validate_items(self.silence)
|
81
|
+
|
82
|
+
def includes(self, item_name: str) -> bool:
|
83
|
+
return super().includes(item_name) and not self.silenced(item_name)
|
84
|
+
|
85
|
+
def silenced(self, item_name: str) -> bool:
|
86
|
+
return item_name in self.silence
|
87
|
+
|
76
88
|
def _validate_items(self, items: List[str]):
|
77
89
|
for item in items:
|
78
90
|
if item not in self._valid_error_names:
|
@@ -1 +0,0 @@
|
|
1
|
-
version = "1.0.1"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/core/meta/code/__init__.pyi
RENAMED
File without changes
|
{dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/core/meta/code/builder.pyi
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/core/meta/types/__init__.pyi
RENAMED
File without changes
|
{dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/core/meta/types/common.pyi
RENAMED
File without changes
|
File without changes
|
{dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/core/meta/types/unpack.pyi
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{dbt_common-1.0.1 → dbt_common-1.0.2}/third-party-stubs/mashumaro/jsonschema/annotations.pyi
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|