From 1a279447debb9aef6aa5e60b2fc94df5650950fd Mon Sep 17 00:00:00 2001 From: Dat Nguyen Date: Sun, 19 Mar 2023 13:09:19 +0700 Subject: [PATCH] Feature/#2 unit test (#12) * Init branch * Some simple tests * Converage 67% * Coverage 81% * Coverage 90% * feat: Coverage 100% * feat: Add CI pipeline * feat: Add CI pipeline * feat: Add CI pipeline * feat: Add CI (debug) * fix: pytest incompatible with python 3.10 * docs: add badges [skip ci] * feat: export xml coverage report --- .flake8 | 2 +- .github/workflows/ci_pr.yml | 48 + .pre-commit-config.yaml | 2 +- .vscode/settings.json | 7 + CONTRIBUTING.md | 10 +- README.md | 12 +- dbterd/adapters/targets/dbml/engine/engine.py | 13 +- .../dbml/strategies/dbml_test_relationship.py | 4 +- dbterd/cli/main.py | 19 + dbterd/cli/params.py | 4 +- dbterd/helpers/file.py | 48 +- dbterd/helpers/jsonify.py | 19 +- poetry.lock | 382 ++--- pyproject.toml | 38 +- samples/dbtresto/catalog.json | 1518 ++++++++++++++++- dbterd/constants.py => tests/unit/__init__.py | 0 tests/unit/adapters/__init__.py | 0 tests/unit/adapters/targets/__init__.py | 0 tests/unit/adapters/targets/dbml/__init__.py | 0 .../unit/adapters/targets/dbml/test_engine.py | 361 ++++ tests/unit/adapters/test_base.py | 44 + tests/unit/adapters/test_factory.py | 13 + tests/unit/cli/__init__py | 0 tests/unit/cli/test_cli.py | 25 + tests/unit/cli/test_runner.py | 90 + tests/unit/helpers/__init__.py | 0 tests/unit/helpers/test_cli_messaging.py | 25 + tests/unit/helpers/test_file.py | 78 + tests/unit/helpers/test_jsonify.py | 57 + tests/unit/test_default.py | 21 + 30 files changed, 2569 insertions(+), 271 deletions(-) create mode 100644 .github/workflows/ci_pr.yml create mode 100644 .vscode/settings.json rename dbterd/constants.py => tests/unit/__init__.py (100%) create mode 100644 tests/unit/adapters/__init__.py create mode 100644 tests/unit/adapters/targets/__init__.py create mode 100644 tests/unit/adapters/targets/dbml/__init__.py create mode 100644 tests/unit/adapters/targets/dbml/test_engine.py create mode 100644 tests/unit/adapters/test_base.py create mode 100644 tests/unit/adapters/test_factory.py create mode 100644 tests/unit/cli/__init__py create mode 100644 tests/unit/cli/test_cli.py create mode 100644 tests/unit/cli/test_runner.py create mode 100644 tests/unit/helpers/__init__.py create mode 100644 tests/unit/helpers/test_cli_messaging.py create mode 100644 tests/unit/helpers/test_file.py create mode 100644 tests/unit/helpers/test_jsonify.py create mode 100644 tests/unit/test_default.py diff --git a/.flake8 b/.flake8 index 9e23f48..612babc 100644 --- a/.flake8 +++ b/.flake8 @@ -1,6 +1,6 @@ [flake8] extend-ignore = E203, E711 -max-line-length = 88 +max-line-length = 130 exclude = .venv, venv, diff --git a/.github/workflows/ci_pr.yml b/.github/workflows/ci_pr.yml new file mode 100644 index 0000000..0f70138 --- /dev/null +++ b/.github/workflows/ci_pr.yml @@ -0,0 +1,48 @@ +name: CI PR + +on: + pull_request: + branches: [ main ] + +jobs: + build-and-test: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: ["3.9", "3.10", "3.11"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + pip install poetry + poetry config virtualenvs.in-project true + + # - name: Cache the virtualenv + # uses: actions/cache@v2 + # with: + # path: ./.venv + # key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }} + + - name: Install dependencies + run: | + poetry install + + - name: Code quality + run: | + poetry run poe lint + + - name: Run tests + run: | + poetry run poe test-cov + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v2 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2e61f52..f847afd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ repos: hooks: - id: trailing-whitespace - id: end-of-file-fixer - - repo: https://gitlab.com/pycqa/flake8 + - repo: https://github.com/pycqa/flake8 rev: 5.0.4 hooks: - id: flake8 diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9b38853 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "python.testing.pytestArgs": [ + "tests" + ], + "python.testing.unittestEnabled": false, + "python.testing.pytestEnabled": true +} \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 14a38d7..36efed7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -40,7 +40,7 @@ There are some tools that will be helpful to you in developing locally. While th ### Tools -We will buy `poertry` in `dbterd` development and testing. +We will buy `poetry` in `dbterd` development and testing. So first install poetry via pip: ```bash @@ -51,6 +51,7 @@ then, start installing the local environment: ```bash python3 -m poetry install python3 -m poetry shell +poe git-hooks pip install -e . dbterd -h ``` @@ -68,7 +69,12 @@ Once you're able to manually test that your code change is working as expected, Finally, you can also run a specific test or group of tests using [`pytest`](https://docs.pytest.org/en/latest/) directly. With a virtualenv active and dev dependencies installed you can do things like: ```bash -pytest . +poe test +``` + +Run test with coverage report: +```bash +poe test-cov ``` > See [pytest usage docs](https://docs.pytest.org/en/6.2.x/usage.html) for an overview of useful command-line options. diff --git a/README.md b/README.md index 72191b3..d6b8220 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@ CLI to generate DBML file from dbt artifact files (required: `manifest.json`, `c [![PyPI version](https://badge.fury.io/py/dbterd.svg)](https://pypi.org/project/dbterd/) ![python-cli](https://img.shields.io/badge/CLI-Python-FFCE3E?labelColor=14354C&logo=python&logoColor=white) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) - +[![python](https://img.shields.io/badge/Python-3.9|3.10|3.11-3776AB.svg?style=flat&logo=python&logoColor=white)](https://www.python.org) +[![codecov](https://codecov.io/gh/datnguye/dbterd/branch/main/graph/badge.svg?token=N7DMQBLH4P)](https://codecov.io/gh/datnguye/dbterd) ``` pip install dbterd --upgrade @@ -36,14 +37,14 @@ Commands: ## Quick examine with existing samples ```bash -# select all models in dbt_resto +# select all models in dbt_resto dbterd run -ad "samples/dbtresto" -o "target" # select only models in dbt_resto excluding staging dbterd run -ad "samples/dbtresto" -o "target" -s model.dbt_resto -ns model.dbt_resto.staging # select only models in schema name "mart" excluding staging dbterd run -ad "samples/dbtresto" -o "target" -s schema:mart -ns model.dbt_resto.staging # select only models in schema full name "dbt.mart" excluding staging -dbterd run -ad "samples/v4-dbtresto" -o "target" -s schema:dbt.mart -ns model.dbt_resto.staging +dbterd run -ad "samples/dbtresto" -o "target" -s schema:dbt.mart -ns model.dbt_resto.staging # other samples dbterd run -ad "samples/fivetranlog" -o "target" @@ -78,9 +79,9 @@ In your dbt project (I am using dbt-resto/[integration_tests](https://github.com ```bash dbt docs generate ``` - + #### 2. Generate DBML -Copy `manifest.json` into a specific folder, and run +Copy `manifest.json` into a specific folder, and run ``` dbterd run -mp "/path/to/dbt/target" -o "/path/to/output" # dbterd run -mp "./target/v4-dbtresto" -o "./target" -s model.dbt_resto -ns model.dbt_resto.staging @@ -115,4 +116,3 @@ Result after applied Model Selection: If you've ever wanted to contribute to this tool, and a great cause, now is your chance! See the contributing docs [CONTRIBUTING.md](https://github.com/datnguye/dbterd/blob/main/CONTRIBUTING.md) for more information - diff --git a/dbterd/adapters/targets/dbml/engine/engine.py b/dbterd/adapters/targets/dbml/engine/engine.py index cb1437c..4c718a3 100644 --- a/dbterd/adapters/targets/dbml/engine/engine.py +++ b/dbterd/adapters/targets/dbml/engine/engine.py @@ -70,7 +70,7 @@ def parse(manifest, catalog, **kwargs): def get_tables(manifest, catalog): - + """Extract tables from dbt artifacts""" tables = [ Table( name=x, @@ -91,7 +91,8 @@ def get_tables(manifest, catalog): for column, metadata in cat_columns.items(): table.columns.append( Column( - name=str(column).lower(), data_type=str(metadata.type).lower() + name=str(column).lower(), + data_type=str(metadata.type).lower(), ) ) @@ -119,6 +120,7 @@ def get_tables(manifest, catalog): def get_relationships(manifest): + """Extract relationships from dbt artifacts based on test relationship""" refs = [ Ref( name=x, @@ -167,12 +169,7 @@ def get_compiled_sql(manifest_node): {columns} from {table} """.format( - columns="\n".join( - [ - f"{x} as {manifest_node.columns[x].data_type or 'varchar'}," - for x in manifest_node.columns - ] - ), + columns=",\n".join([f"{x}" for x in manifest_node.columns]), table=f"{manifest_node.database}.{manifest_node.schema}.undefined", ) diff --git a/dbterd/adapters/targets/dbml/strategies/dbml_test_relationship.py b/dbterd/adapters/targets/dbml/strategies/dbml_test_relationship.py index 4a5054a..3e1f1d3 100644 --- a/dbterd/adapters/targets/dbml/strategies/dbml_test_relationship.py +++ b/dbterd/adapters/targets/dbml/strategies/dbml_test_relationship.py @@ -1,5 +1,5 @@ from dbterd.adapters.targets.dbml.engine import engine -def run(manifest, **kwargs): - return ("output.dbml", engine.parse(manifest, **kwargs)) +def run(manifest, catalog, **kwargs): + return ("output.dbml", engine.parse(manifest, catalog, **kwargs)) diff --git a/dbterd/cli/main.py b/dbterd/cli/main.py index 6b86b1b..7327f14 100644 --- a/dbterd/cli/main.py +++ b/dbterd/cli/main.py @@ -1,4 +1,5 @@ import importlib.metadata +from typing import List import click @@ -10,6 +11,24 @@ __version__ = importlib.metadata.version("dbterd") +# Programmatic invocation +class dbterdRunner: + def __init__(self) -> None: + pass + + def invoke(self, args: List[str]): + try: + dbt_ctx = dbterd.make_context(dbterd.name, args) + return dbterd.invoke(dbt_ctx) + except click.exceptions.Exit as e: + # 0 exit code, expected for --version early exit + if str(e) == "0": + return [], True + raise Exception(f"unhandled exit code {str(e)}") + except (click.NoSuchOption, click.UsageError) as e: + raise Exception(e.message) + + # dbterd @click.group( context_settings={"help_option_names": ["-h", "--help"]}, diff --git a/dbterd/cli/params.py b/dbterd/cli/params.py index 726037d..6627c3a 100644 --- a/dbterd/cli/params.py +++ b/dbterd/cli/params.py @@ -1,5 +1,7 @@ import functools + import click + from dbterd import default @@ -66,6 +68,6 @@ def common_params(func): ) @functools.wraps(func) def wrapper(*args, **kwargs): - return func(*args, **kwargs) + return func(*args, **kwargs) # pragma: no cover return wrapper diff --git a/dbterd/helpers/file.py b/dbterd/helpers/file.py index 60c55ef..cd8c373 100644 --- a/dbterd/helpers/file.py +++ b/dbterd/helpers/file.py @@ -4,11 +4,16 @@ from dbt_artifacts_parser import parser -if sys.platform == "win32": + +def get_sys_platform(): # pragma: no cover + return sys.platform + + +if get_sys_platform() == "win32": # pragma: no cover from ctypes import WinDLL, c_bool else: - WinDLL = None - c_bool = None + WinDLL = None # pragma: no cover + c_bool = None # pragma: no cover def load_file_contents(path: str, strip: bool = True) -> str: @@ -36,7 +41,7 @@ def convert_path(path: str) -> str: # sorry. if len(path) < 250: return path - if _supports_long_paths(): + if supports_long_paths(): return path prefix = "\\\\?\\" @@ -44,7 +49,7 @@ def convert_path(path: str) -> str: if path.startswith(prefix): return path - path = _win_prepare_path(path) + path = win_prepare_path(path) # add the prefix. The check is just in case os.getcwd() does something # unexpected - I believe this if-state should always be True though! @@ -53,8 +58,8 @@ def convert_path(path: str) -> str: return path -def _supports_long_paths() -> bool: - if sys.platform != "win32": +def supports_long_paths(windll_name="ntdll") -> bool: # pragma: no cover + if get_sys_platform() != "win32": return True # Eryk Sun says to use `WinDLL('ntdll')` instead of `windll.ntdll` because # of pointer caching in a comment here: @@ -63,18 +68,18 @@ def _supports_long_paths() -> bool: # he's pretty active on Python windows bugs! else: try: - dll = WinDLL("ntdll") + dll = WinDLL(windll_name) except OSError: # I don't think this happens? you need ntdll to run python return False # not all windows versions have it at all if not hasattr(dll, "RtlAreLongPathsEnabled"): - return False + return False # pragma: no cover # tell windows we want to get back a single unsigned byte (a bool). dll.RtlAreLongPathsEnabled.restype = c_bool return dll.RtlAreLongPathsEnabled() -def _win_prepare_path(path: str) -> str: +def win_prepare_path(path: str) -> str: # pragma: no cover """Given a windows path, prepare it for use by making sure it is absolute and normalized. """ @@ -99,18 +104,17 @@ def _win_prepare_path(path: str) -> str: return path -def read_manifest(manifest_path: str, manifest_version: int): - """Reads in the manifest file, with optional version specification""" - manifest_dict = open_json(f"{manifest_path}/manifest.json") - parser_version = ( - f"parse_manifest_v{manifest_version}" if manifest_version else "parse_manifest" - ) +def read_manifest(path: str, version: int = None): + """Reads in the manifest.json file, with optional version specification""" + _dict = open_json(f"{path}/manifest.json") + parser_version = f"parse_manifest_v{version}" if version else "parse_manifest" parse_func = getattr(parser, parser_version) - manifest_obj = parse_func(manifest=manifest_dict) - return manifest_obj + return parse_func(manifest=_dict) -def read_catalog(catalog_path): - """reads and parses the catalog file""" - catalog_dict = open_json(f"{catalog_path}/catalog.json") - return parser.parse_catalog(catalog=catalog_dict) +def read_catalog(path: str, version: int = None): + """Reads in the catalog.json file, with optional version specification""" + _dict = open_json(f"{path}/catalog.json") + parser_version = f"parse_catalog_v{version}" if version else "parse_catalog" + parse_func = getattr(parser, parser_version) + return parse_func(catalog=_dict) diff --git a/dbterd/helpers/jsonify.py b/dbterd/helpers/jsonify.py index dccf488..3b5cb9c 100644 --- a/dbterd/helpers/jsonify.py +++ b/dbterd/helpers/jsonify.py @@ -2,7 +2,7 @@ import json -class EnhancedJSONEncoder(json.JSONEncoder): +class EnhancedJSONEncoder(json.JSONEncoder): # pragma: no cover def default(self, o): if dataclasses.is_dataclass(o): return dataclasses.asdict(o) @@ -11,21 +11,22 @@ def default(self, o): return super().default(o) -def __mask(obj: str, masks: list = []): +def mask(obj: str, mask_keys: list = ["password", "secret"]): obj_dict = json.loads(obj) for key, value in obj_dict.items(): - if key in masks: - obj_dict[key] = value[0:5] + "***********" - if isinstance(value, dict): - obj_dict[key] = __mask(json.dumps(value, cls=EnhancedJSONEncoder), masks) + print(key) + if key in mask_keys or [x for x in mask_keys if key.startswith(x)]: + obj_dict[key] = value[0:5] + "*" * 10 + # if isinstance(value, dict): + # obj_dict[key] = mask(json.dumps(value, cls=EnhancedJSONEncoder), mask_keys) return obj_dict -def to_json(obj, masks=[]): +def to_json(obj, mask_keys=[]): if not obj: return {} mask_dict = obj - if "__dict__" in mask_dict: - mask_dict = __mask(json.dumps(obj.__dict__, cls=EnhancedJSONEncoder), masks) + # if isinstance(mask_dict, type): + # mask_dict = mask(json.dumps(obj.__dict__, cls=EnhancedJSONEncoder), mask_keys) return json.dumps(mask_dict, indent=4, cls=EnhancedJSONEncoder) diff --git a/poetry.lock b/poetry.lock index 43a3eae..2ba0fff 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2,18 +2,19 @@ [[package]] name = "argcomplete" -version = "2.0.0" +version = "2.1.2" description = "Bash tab completion for argparse" category = "main" optional = false python-versions = ">=3.6" files = [ - {file = "argcomplete-2.0.0-py2.py3-none-any.whl", hash = "sha256:cffa11ea77999bb0dd27bb25ff6dc142a6796142f68d45b1a26b11f58724561e"}, - {file = "argcomplete-2.0.0.tar.gz", hash = "sha256:6372ad78c89d662035101418ae253668445b391755cfe94ea52f1b9d22425b20"}, + {file = "argcomplete-2.1.2-py3-none-any.whl", hash = "sha256:4ba9cdaa28c361d251edce884cd50b4b1215d65cdc881bd204426cdde9f52731"}, + {file = "argcomplete-2.1.2.tar.gz", hash = "sha256:fc82ef070c607b1559b5c720529d63b54d9dcf2dcfc2632b10e6372314a34457"}, ] [package.extras] -test = ["coverage", "flake8", "pexpect", "wheel"] +lint = ["flake8", "mypy"] +test = ["coverage", "flake8", "mypy", "pexpect", "wheel"] [[package]] name = "atomicwrites" @@ -47,14 +48,14 @@ tests-no-zope = ["cloudpickle", "cloudpickle", "hypothesis", "hypothesis", "mypy [[package]] name = "autoflake" -version = "2.0.1" +version = "2.0.2" description = "Removes unused imports and unused variables" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "autoflake-2.0.1-py3-none-any.whl", hash = "sha256:143b0843667734af53532c443e950c787316b9b1155b2273558260b44836e8e4"}, - {file = "autoflake-2.0.1.tar.gz", hash = "sha256:1ce520131b7f396915242fe91e57221f4d42408529bbe3ae93adafed286591e0"}, + {file = "autoflake-2.0.2-py3-none-any.whl", hash = "sha256:a82d8efdcbbb7129a8a23238c529fb9d9919c562e26bb7963ea6890fbfff7d02"}, + {file = "autoflake-2.0.2.tar.gz", hash = "sha256:e0164421ff13f805f08a023e249d84200bd00463d213b490906bfefa67e83830"}, ] [package.dependencies] @@ -135,100 +136,87 @@ files = [ [[package]] name = "charset-normalizer" -version = "3.0.1" +version = "3.1.0" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." category = "main" optional = false -python-versions = "*" +python-versions = ">=3.7.0" files = [ - {file = "charset-normalizer-3.0.1.tar.gz", hash = "sha256:ebea339af930f8ca5d7a699b921106c6e29c617fe9606fa7baa043c1cdae326f"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:88600c72ef7587fe1708fd242b385b6ed4b8904976d5da0893e31df8b3480cb6"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c75ffc45f25324e68ab238cb4b5c0a38cd1c3d7f1fb1f72b5541de469e2247db"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:db72b07027db150f468fbada4d85b3b2729a3db39178abf5c543b784c1254539"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:62595ab75873d50d57323a91dd03e6966eb79c41fa834b7a1661ed043b2d404d"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ff6f3db31555657f3163b15a6b7c6938d08df7adbfc9dd13d9d19edad678f1e8"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:772b87914ff1152b92a197ef4ea40efe27a378606c39446ded52c8f80f79702e"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70990b9c51340e4044cfc394a81f614f3f90d41397104d226f21e66de668730d"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:292d5e8ba896bbfd6334b096e34bffb56161c81408d6d036a7dfa6929cff8783"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:2edb64ee7bf1ed524a1da60cdcd2e1f6e2b4f66ef7c077680739f1641f62f555"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:31a9ddf4718d10ae04d9b18801bd776693487cbb57d74cc3458a7673f6f34639"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:44ba614de5361b3e5278e1241fda3dc1838deed864b50a10d7ce92983797fa76"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:12db3b2c533c23ab812c2b25934f60383361f8a376ae272665f8e48b88e8e1c6"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c512accbd6ff0270939b9ac214b84fb5ada5f0409c44298361b2f5e13f9aed9e"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-win32.whl", hash = "sha256:502218f52498a36d6bf5ea77081844017bf7982cdbe521ad85e64cabee1b608b"}, - {file = "charset_normalizer-3.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:601f36512f9e28f029d9481bdaf8e89e5148ac5d89cffd3b05cd533eeb423b59"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0298eafff88c99982a4cf66ba2efa1128e4ddaca0b05eec4c456bbc7db691d8d"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a8d0fc946c784ff7f7c3742310cc8a57c5c6dc31631269876a88b809dbeff3d3"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:87701167f2a5c930b403e9756fab1d31d4d4da52856143b609e30a1ce7160f3c"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:14e76c0f23218b8f46c4d87018ca2e441535aed3632ca134b10239dfb6dadd6b"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0c0a590235ccd933d9892c627dec5bc7511ce6ad6c1011fdf5b11363022746c1"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8c7fe7afa480e3e82eed58e0ca89f751cd14d767638e2550c77a92a9e749c317"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:79909e27e8e4fcc9db4addea88aa63f6423ebb171db091fb4373e3312cb6d603"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8ac7b6a045b814cf0c47f3623d21ebd88b3e8cf216a14790b455ea7ff0135d18"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:72966d1b297c741541ca8cf1223ff262a6febe52481af742036a0b296e35fa5a"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:f9d0c5c045a3ca9bedfc35dca8526798eb91a07aa7a2c0fee134c6c6f321cbd7"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:5995f0164fa7df59db4746112fec3f49c461dd6b31b841873443bdb077c13cfc"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:4a8fcf28c05c1f6d7e177a9a46a1c52798bfe2ad80681d275b10dcf317deaf0b"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:761e8904c07ad053d285670f36dd94e1b6ab7f16ce62b9805c475b7aa1cffde6"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-win32.whl", hash = "sha256:71140351489970dfe5e60fc621ada3e0f41104a5eddaca47a7acb3c1b851d6d3"}, - {file = "charset_normalizer-3.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:9ab77acb98eba3fd2a85cd160851816bfce6871d944d885febf012713f06659c"}, - {file = "charset_normalizer-3.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:84c3990934bae40ea69a82034912ffe5a62c60bbf6ec5bc9691419641d7d5c9a"}, - {file = "charset_normalizer-3.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:74292fc76c905c0ef095fe11e188a32ebd03bc38f3f3e9bcb85e4e6db177b7ea"}, - {file = "charset_normalizer-3.0.1-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c95a03c79bbe30eec3ec2b7f076074f4281526724c8685a42872974ef4d36b72"}, - {file = "charset_normalizer-3.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f4c39b0e3eac288fedc2b43055cfc2ca7a60362d0e5e87a637beac5d801ef478"}, - {file = "charset_normalizer-3.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:df2c707231459e8a4028eabcd3cfc827befd635b3ef72eada84ab13b52e1574d"}, - {file = "charset_normalizer-3.0.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:93ad6d87ac18e2a90b0fe89df7c65263b9a99a0eb98f0a3d2e079f12a0735837"}, - {file = "charset_normalizer-3.0.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:59e5686dd847347e55dffcc191a96622f016bc0ad89105e24c14e0d6305acbc6"}, - {file = "charset_normalizer-3.0.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:cd6056167405314a4dc3c173943f11249fa0f1b204f8b51ed4bde1a9cd1834dc"}, - {file = "charset_normalizer-3.0.1-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:083c8d17153ecb403e5e1eb76a7ef4babfc2c48d58899c98fcaa04833e7a2f9a"}, - {file = "charset_normalizer-3.0.1-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:f5057856d21e7586765171eac8b9fc3f7d44ef39425f85dbcccb13b3ebea806c"}, - {file = "charset_normalizer-3.0.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:7eb33a30d75562222b64f569c642ff3dc6689e09adda43a082208397f016c39a"}, - {file = "charset_normalizer-3.0.1-cp36-cp36m-win32.whl", hash = "sha256:95dea361dd73757c6f1c0a1480ac499952c16ac83f7f5f4f84f0658a01b8ef41"}, - {file = "charset_normalizer-3.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:eaa379fcd227ca235d04152ca6704c7cb55564116f8bc52545ff357628e10602"}, - {file = "charset_normalizer-3.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:3e45867f1f2ab0711d60c6c71746ac53537f1684baa699f4f668d4c6f6ce8e14"}, - {file = "charset_normalizer-3.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cadaeaba78750d58d3cc6ac4d1fd867da6fc73c88156b7a3212a3cd4819d679d"}, - {file = "charset_normalizer-3.0.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:911d8a40b2bef5b8bbae2e36a0b103f142ac53557ab421dc16ac4aafee6f53dc"}, - {file = "charset_normalizer-3.0.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:503e65837c71b875ecdd733877d852adbc465bd82c768a067badd953bf1bc5a3"}, - {file = "charset_normalizer-3.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a60332922359f920193b1d4826953c507a877b523b2395ad7bc716ddd386d866"}, - {file = "charset_normalizer-3.0.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:16a8663d6e281208d78806dbe14ee9903715361cf81f6d4309944e4d1e59ac5b"}, - {file = "charset_normalizer-3.0.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:a16418ecf1329f71df119e8a65f3aa68004a3f9383821edcb20f0702934d8087"}, - {file = "charset_normalizer-3.0.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:9d9153257a3f70d5f69edf2325357251ed20f772b12e593f3b3377b5f78e7ef8"}, - {file = "charset_normalizer-3.0.1-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:02a51034802cbf38db3f89c66fb5d2ec57e6fe7ef2f4a44d070a593c3688667b"}, - {file = "charset_normalizer-3.0.1-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:2e396d70bc4ef5325b72b593a72c8979999aa52fb8bcf03f701c1b03e1166918"}, - {file = "charset_normalizer-3.0.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:11b53acf2411c3b09e6af37e4b9005cba376c872503c8f28218c7243582df45d"}, - {file = "charset_normalizer-3.0.1-cp37-cp37m-win32.whl", hash = "sha256:0bf2dae5291758b6f84cf923bfaa285632816007db0330002fa1de38bfcb7154"}, - {file = "charset_normalizer-3.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:2c03cc56021a4bd59be889c2b9257dae13bf55041a3372d3295416f86b295fb5"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:024e606be3ed92216e2b6952ed859d86b4cfa52cd5bc5f050e7dc28f9b43ec42"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:4b0d02d7102dd0f997580b51edc4cebcf2ab6397a7edf89f1c73b586c614272c"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:358a7c4cb8ba9b46c453b1dd8d9e431452d5249072e4f56cfda3149f6ab1405e"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:81d6741ab457d14fdedc215516665050f3822d3e56508921cc7239f8c8e66a58"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8b8af03d2e37866d023ad0ddea594edefc31e827fee64f8de5611a1dbc373174"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9cf4e8ad252f7c38dd1f676b46514f92dc0ebeb0db5552f5f403509705e24753"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e696f0dd336161fca9adbb846875d40752e6eba585843c768935ba5c9960722b"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c22d3fe05ce11d3671297dc8973267daa0f938b93ec716e12e0f6dee81591dc1"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:109487860ef6a328f3eec66f2bf78b0b72400280d8f8ea05f69c51644ba6521a"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:37f8febc8ec50c14f3ec9637505f28e58d4f66752207ea177c1d67df25da5aed"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:f97e83fa6c25693c7a35de154681fcc257c1c41b38beb0304b9c4d2d9e164479"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:a152f5f33d64a6be73f1d30c9cc82dfc73cec6477ec268e7c6e4c7d23c2d2291"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:39049da0ffb96c8cbb65cbf5c5f3ca3168990adf3551bd1dee10c48fce8ae820"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-win32.whl", hash = "sha256:4457ea6774b5611f4bed5eaa5df55f70abde42364d498c5134b7ef4c6958e20e"}, - {file = "charset_normalizer-3.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:e62164b50f84e20601c1ff8eb55620d2ad25fb81b59e3cd776a1902527a788af"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:8eade758719add78ec36dc13201483f8e9b5d940329285edcd5f70c0a9edbd7f"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8499ca8f4502af841f68135133d8258f7b32a53a1d594aa98cc52013fff55678"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3fc1c4a2ffd64890aebdb3f97e1278b0cc72579a08ca4de8cd2c04799a3a22be"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:00d3ffdaafe92a5dc603cb9bd5111aaa36dfa187c8285c543be562e61b755f6b"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c2ac1b08635a8cd4e0cbeaf6f5e922085908d48eb05d44c5ae9eabab148512ca"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f6f45710b4459401609ebebdbcfb34515da4fc2aa886f95107f556ac69a9147e"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ae1de54a77dc0d6d5fcf623290af4266412a7c4be0b1ff7444394f03f5c54e3"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3b590df687e3c5ee0deef9fc8c547d81986d9a1b56073d82de008744452d6541"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ab5de034a886f616a5668aa5d098af2b5385ed70142090e2a31bcbd0af0fdb3d"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9cb3032517f1627cc012dbc80a8ec976ae76d93ea2b5feaa9d2a5b8882597579"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:608862a7bf6957f2333fc54ab4399e405baad0163dc9f8d99cb236816db169d4"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:0f438ae3532723fb6ead77e7c604be7c8374094ef4ee2c5e03a3a17f1fca256c"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:356541bf4381fa35856dafa6a965916e54bed415ad8a24ee6de6e37deccf2786"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-win32.whl", hash = "sha256:39cf9ed17fe3b1bc81f33c9ceb6ce67683ee7526e65fde1447c772afc54a1bb8"}, - {file = "charset_normalizer-3.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:0a11e971ed097d24c534c037d298ad32c6ce81a45736d31e0ff0ad37ab437d59"}, - {file = "charset_normalizer-3.0.1-py3-none-any.whl", hash = "sha256:7e189e2e1d3ed2f4aebabd2d5b0f931e883676e51c7624826e0a4e5fe8a0bf24"}, + {file = "charset-normalizer-3.1.0.tar.gz", hash = "sha256:34e0a2f9c370eb95597aae63bf85eb5e96826d81e3dcf88b8886012906f509b5"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e0ac8959c929593fee38da1c2b64ee9778733cdf03c482c9ff1d508b6b593b2b"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d7fc3fca01da18fbabe4625d64bb612b533533ed10045a2ac3dd194bfa656b60"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:04eefcee095f58eaabe6dc3cc2262f3bcd776d2c67005880894f447b3f2cb9c1"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:20064ead0717cf9a73a6d1e779b23d149b53daf971169289ed2ed43a71e8d3b0"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1435ae15108b1cb6fffbcea2af3d468683b7afed0169ad718451f8db5d1aff6f"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c84132a54c750fda57729d1e2599bb598f5fa0344085dbde5003ba429a4798c0"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75f2568b4189dda1c567339b48cba4ac7384accb9c2a7ed655cd86b04055c795"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:11d3bcb7be35e7b1bba2c23beedac81ee893ac9871d0ba79effc7fc01167db6c"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:891cf9b48776b5c61c700b55a598621fdb7b1e301a550365571e9624f270c203"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:5f008525e02908b20e04707a4f704cd286d94718f48bb33edddc7d7b584dddc1"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:b06f0d3bf045158d2fb8837c5785fe9ff9b8c93358be64461a1089f5da983137"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:49919f8400b5e49e961f320c735388ee686a62327e773fa5b3ce6721f7e785ce"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:22908891a380d50738e1f978667536f6c6b526a2064156203d418f4856d6e86a"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-win32.whl", hash = "sha256:12d1a39aa6b8c6f6248bb54550efcc1c38ce0d8096a146638fd4738e42284448"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:65ed923f84a6844de5fd29726b888e58c62820e0769b76565480e1fdc3d062f8"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9a3267620866c9d17b959a84dd0bd2d45719b817245e49371ead79ed4f710d19"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6734e606355834f13445b6adc38b53c0fd45f1a56a9ba06c2058f86893ae8017"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f8303414c7b03f794347ad062c0516cee0e15f7a612abd0ce1e25caf6ceb47df"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aaf53a6cebad0eae578f062c7d462155eada9c172bd8c4d250b8c1d8eb7f916a"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3dc5b6a8ecfdc5748a7e429782598e4f17ef378e3e272eeb1340ea57c9109f41"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e1b25e3ad6c909f398df8921780d6a3d120d8c09466720226fc621605b6f92b1"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0ca564606d2caafb0abe6d1b5311c2649e8071eb241b2d64e75a0d0065107e62"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b82fab78e0b1329e183a65260581de4375f619167478dddab510c6c6fb04d9b6"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:bd7163182133c0c7701b25e604cf1611c0d87712e56e88e7ee5d72deab3e76b5"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:11d117e6c63e8f495412d37e7dc2e2fff09c34b2d09dbe2bee3c6229577818be"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:cf6511efa4801b9b38dc5546d7547d5b5c6ef4b081c60b23e4d941d0eba9cbeb"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:abc1185d79f47c0a7aaf7e2412a0eb2c03b724581139193d2d82b3ad8cbb00ac"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cb7b2ab0188829593b9de646545175547a70d9a6e2b63bf2cd87a0a391599324"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-win32.whl", hash = "sha256:c36bcbc0d5174a80d6cccf43a0ecaca44e81d25be4b7f90f0ed7bcfbb5a00909"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:cca4def576f47a09a943666b8f829606bcb17e2bc2d5911a46c8f8da45f56755"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0c95f12b74681e9ae127728f7e5409cbbef9cd914d5896ef238cc779b8152373"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fca62a8301b605b954ad2e9c3666f9d97f63872aa4efcae5492baca2056b74ab"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ac0aa6cd53ab9a31d397f8303f92c42f534693528fafbdb997c82bae6e477ad9"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c3af8e0f07399d3176b179f2e2634c3ce9c1301379a6b8c9c9aeecd481da494f"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3a5fc78f9e3f501a1614a98f7c54d3969f3ad9bba8ba3d9b438c3bc5d047dd28"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:628c985afb2c7d27a4800bfb609e03985aaecb42f955049957814e0491d4006d"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:74db0052d985cf37fa111828d0dd230776ac99c740e1a758ad99094be4f1803d"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:1e8fcdd8f672a1c4fc8d0bd3a2b576b152d2a349782d1eb0f6b8e52e9954731d"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:04afa6387e2b282cf78ff3dbce20f0cc071c12dc8f685bd40960cc68644cfea6"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:dd5653e67b149503c68c4018bf07e42eeed6b4e956b24c00ccdf93ac79cdff84"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d2686f91611f9e17f4548dbf050e75b079bbc2a82be565832bc8ea9047b61c8c"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-win32.whl", hash = "sha256:4155b51ae05ed47199dc5b2a4e62abccb274cee6b01da5b895099b61b1982974"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-win_amd64.whl", hash = "sha256:322102cdf1ab682ecc7d9b1c5eed4ec59657a65e1c146a0da342b78f4112db23"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e633940f28c1e913615fd624fcdd72fdba807bf53ea6925d6a588e84e1151531"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:3a06f32c9634a8705f4ca9946d667609f52cf130d5548881401f1eb2c39b1e2c"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7381c66e0561c5757ffe616af869b916c8b4e42b367ab29fedc98481d1e74e14"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3573d376454d956553c356df45bb824262c397c6e26ce43e8203c4c540ee0acb"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e89df2958e5159b811af9ff0f92614dabf4ff617c03a4c1c6ff53bf1c399e0e1"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:78cacd03e79d009d95635e7d6ff12c21eb89b894c354bd2b2ed0b4763373693b"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:de5695a6f1d8340b12a5d6d4484290ee74d61e467c39ff03b39e30df62cf83a0"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1c60b9c202d00052183c9be85e5eaf18a4ada0a47d188a83c8f5c5b23252f649"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:f645caaf0008bacf349875a974220f1f1da349c5dbe7c4ec93048cdc785a3326"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ea9f9c6034ea2d93d9147818f17c2a0860d41b71c38b9ce4d55f21b6f9165a11"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:80d1543d58bd3d6c271b66abf454d437a438dff01c3e62fdbcd68f2a11310d4b"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:73dc03a6a7e30b7edc5b01b601e53e7fc924b04e1835e8e407c12c037e81adbd"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6f5c2e7bc8a4bf7c426599765b1bd33217ec84023033672c1e9a8b35eaeaaaf8"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-win32.whl", hash = "sha256:12a2b561af122e3d94cdb97fe6fb2bb2b82cef0cdca131646fdb940a1eda04f0"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:3160a0fd9754aab7d47f95a6b63ab355388d890163eb03b2d2b87ab0a30cfa59"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:38e812a197bf8e71a59fe55b757a84c1f946d0ac114acafaafaf21667a7e169e"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6baf0baf0d5d265fa7944feb9f7451cc316bfe30e8df1a61b1bb08577c554f31"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:8f25e17ab3039b05f762b0a55ae0b3632b2e073d9c8fc88e89aca31a6198e88f"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3747443b6a904001473370d7810aa19c3a180ccd52a7157aacc264a5ac79265e"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b116502087ce8a6b7a5f1814568ccbd0e9f6cfd99948aa59b0e241dc57cf739f"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d16fd5252f883eb074ca55cb622bc0bee49b979ae4e8639fff6ca3ff44f9f854"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:21fa558996782fc226b529fdd2ed7866c2c6ec91cee82735c98a197fae39f706"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6f6c7a8a57e9405cad7485f4c9d3172ae486cfef1344b5ddd8e5239582d7355e"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ac3775e3311661d4adace3697a52ac0bab17edd166087d493b52d4f4f553f9f0"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:10c93628d7497c81686e8e5e557aafa78f230cd9e77dd0c40032ef90c18f2230"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:6f4f4668e1831850ebcc2fd0b1cd11721947b6dc7c00bf1c6bd3c929ae14f2c7"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:0be65ccf618c1e7ac9b849c315cc2e8a8751d9cfdaa43027d4f6624bd587ab7e"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:53d0a3fa5f8af98a1e261de6a3943ca631c526635eb5817a87a59d9a57ebf48f"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-win32.whl", hash = "sha256:a04f86f41a8916fe45ac5024ec477f41f886b3c435da2d4e3d2709b22ab02af1"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:830d2948a5ec37c386d3170c483063798d7879037492540f10a475e3fd6f244b"}, + {file = "charset_normalizer-3.1.0-py3-none-any.whl", hash = "sha256:3d9098b479e78c85080c98e1e35ff40b4a31d8953102bb0fd7d1b6f8a2111a3d"}, ] [[package]] @@ -363,14 +351,14 @@ http = ["httpx"] [[package]] name = "dbt-artifacts-parser" -version = "0.2.4" +version = "0.2.5" description = "A dbt artifacts parser in python" category = "main" optional = false python-versions = ">=3.7.0" files = [ - {file = "dbt-artifacts-parser-0.2.4.tar.gz", hash = "sha256:21314afba0a8edb8fc318cb624134ae1fc5a81dd851b12c62c6d692c92a639ce"}, - {file = "dbt_artifacts_parser-0.2.4-py3-none-any.whl", hash = "sha256:597ac9914da70e0eac74d1462ee67779cf803f8d3b99d7c0d0f7cea0bd759dfe"}, + {file = "dbt-artifacts-parser-0.2.5.tar.gz", hash = "sha256:174c6b5f44e41b1bbd0055d7a1439bc07a2be445aca26948382f3ab427b8228c"}, + {file = "dbt_artifacts_parser-0.2.5-py3-none-any.whl", hash = "sha256:2a8332f7605001cc92f8fbb261cc0bd8551f3e2f624abb2d61ad92b064b41e45"}, ] [package.dependencies] @@ -432,19 +420,19 @@ idna = ">=2.0.0" [[package]] name = "filelock" -version = "3.9.0" +version = "3.10.0" description = "A platform independent file lock." category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "filelock-3.9.0-py3-none-any.whl", hash = "sha256:f58d535af89bb9ad5cd4df046f741f8553a418c01a7856bf0d173bbc9f6bd16d"}, - {file = "filelock-3.9.0.tar.gz", hash = "sha256:7b319f24340b51f55a2bf7a12ac0755a9b03e718311dac567a0f4f7fabd2f5de"}, + {file = "filelock-3.10.0-py3-none-any.whl", hash = "sha256:e90b34656470756edf8b19656785c5fea73afa1953f3e1b0d645cef11cab3182"}, + {file = "filelock-3.10.0.tar.gz", hash = "sha256:3199fd0d3faea8b911be52b663dfccceb84c95949dd13179aa21436d1a79c4ce"}, ] [package.extras] -docs = ["furo (>=2022.12.7)", "sphinx (>=5.3)", "sphinx-autodoc-typehints (>=1.19.5)"] -testing = ["covdefaults (>=2.2.2)", "coverage (>=7.0.1)", "pytest (>=7.2)", "pytest-cov (>=4)", "pytest-timeout (>=2.1)"] +docs = ["furo (>=2022.12.7)", "sphinx (>=6.1.3)", "sphinx-autodoc-typehints (>=1.22,!=1.23.4)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.2.1)", "pytest (>=7.2.2)", "pytest-cov (>=4)", "pytest-timeout (>=2.1)"] [[package]] name = "flake8" @@ -476,14 +464,14 @@ files = [ [[package]] name = "identify" -version = "2.5.18" +version = "2.5.21" description = "File identification library for Python" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "identify-2.5.18-py2.py3-none-any.whl", hash = "sha256:93aac7ecf2f6abf879b8f29a8002d3c6de7086b8c28d88e1ad15045a15ab63f9"}, - {file = "identify-2.5.18.tar.gz", hash = "sha256:89e144fa560cc4cffb6ef2ab5e9fb18ed9f9b3cb054384bab4b95c12f6c309fe"}, + {file = "identify-2.5.21-py2.py3-none-any.whl", hash = "sha256:69edcaffa8e91ae0f77d397af60f148b6b45a8044b2cc6d99cafa5b04793ff00"}, + {file = "identify-2.5.21.tar.gz", hash = "sha256:7671a05ef9cfaf8ff63b15d45a91a1147a03aaccb2976d4e9bd047cbbc508471"}, ] [package.extras] @@ -536,6 +524,18 @@ files = [ docs = ["jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx"] testing = ["pygments", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] +[[package]] +name = "iniconfig" +version = "2.0.0" +description = "brain-dead simple config-ini parsing" +category = "dev" +optional = false +python-versions = ">=3.7" +files = [ + {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, + {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, +] + [[package]] name = "isort" version = "5.12.0" @@ -594,18 +594,18 @@ format-nongpl = ["fqdn", "idna", "isoduration", "jsonpointer (>1.13)", "rfc3339- [[package]] name = "jsonschema-spec" -version = "0.1.3" +version = "0.1.4" description = "JSONSchema Spec with object-oriented paths" category = "main" optional = false python-versions = ">=3.7.0,<4.0.0" files = [ - {file = "jsonschema_spec-0.1.3-py3-none-any.whl", hash = "sha256:b3cde007ad65c2e631e2f8653cf187124a2c714d02d9fafbab68ad64bf5745d6"}, - {file = "jsonschema_spec-0.1.3.tar.gz", hash = "sha256:8d8db7c255e524fab1016a952a9143e5b6e3c074f4ed25d1878f8e97806caec0"}, + {file = "jsonschema_spec-0.1.4-py3-none-any.whl", hash = "sha256:34471d8b60e1f06d174236c4d3cf9590fbf3cff1cc733b28d15cd83672bcd062"}, + {file = "jsonschema_spec-0.1.4.tar.gz", hash = "sha256:824c743197bbe2104fcc6dce114a4082bf7f7efdebf16683510cb0ec6d8d53d0"}, ] [package.dependencies] -jsonschema = ">=4.0.0,<5.0.0" +jsonschema = ">=4.0.0,<4.18.0" pathable = ">=0.4.1,<0.5.0" PyYAML = ">=5.1" typing-extensions = ">=4.3.0,<5.0.0" @@ -728,18 +728,6 @@ files = [ {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, ] -[[package]] -name = "more-itertools" -version = "9.1.0" -description = "More routines for operating on iterables, beyond itertools" -category = "dev" -optional = false -python-versions = ">=3.7" -files = [ - {file = "more-itertools-9.1.0.tar.gz", hash = "sha256:cabaa341ad0389ea83c17a94566a53ae4c9d07349861ecb14dc6d0345cf9ac5d"}, - {file = "more_itertools-9.1.0-py3-none-any.whl", hash = "sha256:d2bc7f02446e86a68911e58ded76d6561eea00cddfb2a91e7019bbb586c799f3"}, -] - [[package]] name = "mypy-extensions" version = "1.0.0" @@ -852,26 +840,26 @@ files = [ [[package]] name = "pathspec" -version = "0.11.0" +version = "0.11.1" description = "Utility library for gitignore style pattern matching of file paths." category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "pathspec-0.11.0-py3-none-any.whl", hash = "sha256:3a66eb970cbac598f9e5ccb5b2cf58930cd8e3ed86d393d541eaf2d8b1705229"}, - {file = "pathspec-0.11.0.tar.gz", hash = "sha256:64d338d4e0914e91c1792321e6907b5a593f1ab1851de7fc269557a21b30ebbc"}, + {file = "pathspec-0.11.1-py3-none-any.whl", hash = "sha256:d8af70af76652554bd134c22b3e8a1cc46ed7d91edcdd721ef1a0c51a84a5293"}, + {file = "pathspec-0.11.1.tar.gz", hash = "sha256:2798de800fa92780e33acca925945e9a19a133b715067cf165b8866c15a31687"}, ] [[package]] name = "platformdirs" -version = "3.1.0" +version = "3.1.1" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "platformdirs-3.1.0-py3-none-any.whl", hash = "sha256:13b08a53ed71021350c9e300d4ea8668438fb0046ab3937ac9a29913a1a1350a"}, - {file = "platformdirs-3.1.0.tar.gz", hash = "sha256:accc3665857288317f32c7bebb5a8e482ba717b474f3fc1d18ca7f9214be0cef"}, + {file = "platformdirs-3.1.1-py3-none-any.whl", hash = "sha256:e5986afb596e4bb5bde29a79ac9061aa955b94fca2399b7aaac4090860920dd8"}, + {file = "platformdirs-3.1.1.tar.gz", hash = "sha256:024996549ee88ec1a9aa99ff7f8fc819bb59e2c3477b410d90a16d32d6e707aa"}, ] [package.extras] @@ -880,18 +868,19 @@ test = ["appdirs (==1.4.4)", "covdefaults (>=2.2.2)", "pytest (>=7.2.1)", "pytes [[package]] name = "pluggy" -version = "0.13.1" +version = "1.0.0" description = "plugin and hook calling mechanisms for python" category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=3.6" files = [ - {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, - {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"}, + {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, + {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, ] [package.extras] dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] [[package]] name = "poethepoet" @@ -985,48 +974,48 @@ files = [ [[package]] name = "pydantic" -version = "1.10.5" +version = "1.10.6" description = "Data validation and settings management using python type hints" category = "main" optional = false python-versions = ">=3.7" files = [ - {file = "pydantic-1.10.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5920824fe1e21cbb3e38cf0f3dd24857c8959801d1031ce1fac1d50857a03bfb"}, - {file = "pydantic-1.10.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:3bb99cf9655b377db1a9e47fa4479e3330ea96f4123c6c8200e482704bf1eda2"}, - {file = "pydantic-1.10.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2185a3b3d98ab4506a3f6707569802d2d92c3a7ba3a9a35683a7709ea6c2aaa2"}, - {file = "pydantic-1.10.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f582cac9d11c227c652d3ce8ee223d94eb06f4228b52a8adaafa9fa62e73d5c9"}, - {file = "pydantic-1.10.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:c9e5b778b6842f135902e2d82624008c6a79710207e28e86966cd136c621bfee"}, - {file = "pydantic-1.10.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:72ef3783be8cbdef6bca034606a5de3862be6b72415dc5cb1fb8ddbac110049a"}, - {file = "pydantic-1.10.5-cp310-cp310-win_amd64.whl", hash = "sha256:45edea10b75d3da43cfda12f3792833a3fa70b6eee4db1ed6aed528cef17c74e"}, - {file = "pydantic-1.10.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:63200cd8af1af2c07964546b7bc8f217e8bda9d0a2ef0ee0c797b36353914984"}, - {file = "pydantic-1.10.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:305d0376c516b0dfa1dbefeae8c21042b57b496892d721905a6ec6b79494a66d"}, - {file = "pydantic-1.10.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1fd326aff5d6c36f05735c7c9b3d5b0e933b4ca52ad0b6e4b38038d82703d35b"}, - {file = "pydantic-1.10.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6bb0452d7b8516178c969d305d9630a3c9b8cf16fcf4713261c9ebd465af0d73"}, - {file = "pydantic-1.10.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:9a9d9155e2a9f38b2eb9374c88f02fd4d6851ae17b65ee786a87d032f87008f8"}, - {file = "pydantic-1.10.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:f836444b4c5ece128b23ec36a446c9ab7f9b0f7981d0d27e13a7c366ee163f8a"}, - {file = "pydantic-1.10.5-cp311-cp311-win_amd64.whl", hash = "sha256:8481dca324e1c7b715ce091a698b181054d22072e848b6fc7895cd86f79b4449"}, - {file = "pydantic-1.10.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:87f831e81ea0589cd18257f84386bf30154c5f4bed373b7b75e5cb0b5d53ea87"}, - {file = "pydantic-1.10.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7ce1612e98c6326f10888df951a26ec1a577d8df49ddcaea87773bfbe23ba5cc"}, - {file = "pydantic-1.10.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:58e41dd1e977531ac6073b11baac8c013f3cd8706a01d3dc74e86955be8b2c0c"}, - {file = "pydantic-1.10.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:6a4b0aab29061262065bbdede617ef99cc5914d1bf0ddc8bcd8e3d7928d85bd6"}, - {file = "pydantic-1.10.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:36e44a4de37b8aecffa81c081dbfe42c4d2bf9f6dff34d03dce157ec65eb0f15"}, - {file = "pydantic-1.10.5-cp37-cp37m-win_amd64.whl", hash = "sha256:261f357f0aecda005934e413dfd7aa4077004a174dafe414a8325e6098a8e419"}, - {file = "pydantic-1.10.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b429f7c457aebb7fbe7cd69c418d1cd7c6fdc4d3c8697f45af78b8d5a7955760"}, - {file = "pydantic-1.10.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:663d2dd78596c5fa3eb996bc3f34b8c2a592648ad10008f98d1348be7ae212fb"}, - {file = "pydantic-1.10.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:51782fd81f09edcf265823c3bf43ff36d00db246eca39ee765ef58dc8421a642"}, - {file = "pydantic-1.10.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c428c0f64a86661fb4873495c4fac430ec7a7cef2b8c1c28f3d1a7277f9ea5ab"}, - {file = "pydantic-1.10.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:76c930ad0746c70f0368c4596020b736ab65b473c1f9b3872310a835d852eb19"}, - {file = "pydantic-1.10.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:3257bd714de9db2102b742570a56bf7978e90441193acac109b1f500290f5718"}, - {file = "pydantic-1.10.5-cp38-cp38-win_amd64.whl", hash = "sha256:f5bee6c523d13944a1fdc6f0525bc86dbbd94372f17b83fa6331aabacc8fd08e"}, - {file = "pydantic-1.10.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:532e97c35719f137ee5405bd3eeddc5c06eb91a032bc755a44e34a712420daf3"}, - {file = "pydantic-1.10.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ca9075ab3de9e48b75fa8ccb897c34ccc1519177ad8841d99f7fd74cf43be5bf"}, - {file = "pydantic-1.10.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bd46a0e6296346c477e59a954da57beaf9c538da37b9df482e50f836e4a7d4bb"}, - {file = "pydantic-1.10.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3353072625ea2a9a6c81ad01b91e5c07fa70deb06368c71307529abf70d23325"}, - {file = "pydantic-1.10.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:3f9d9b2be177c3cb6027cd67fbf323586417868c06c3c85d0d101703136e6b31"}, - {file = "pydantic-1.10.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:b473d00ccd5c2061fd896ac127b7755baad233f8d996ea288af14ae09f8e0d1e"}, - {file = "pydantic-1.10.5-cp39-cp39-win_amd64.whl", hash = "sha256:5f3bc8f103b56a8c88021d481410874b1f13edf6e838da607dcb57ecff9b4594"}, - {file = "pydantic-1.10.5-py3-none-any.whl", hash = "sha256:7c5b94d598c90f2f46b3a983ffb46ab806a67099d118ae0da7ef21a2a4033b28"}, - {file = "pydantic-1.10.5.tar.gz", hash = "sha256:9e337ac83686645a46db0e825acceea8e02fca4062483f40e9ae178e8bd1103a"}, + {file = "pydantic-1.10.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f9289065611c48147c1dd1fd344e9d57ab45f1d99b0fb26c51f1cf72cd9bcd31"}, + {file = "pydantic-1.10.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8c32b6bba301490d9bb2bf5f631907803135e8085b6aa3e5fe5a770d46dd0160"}, + {file = "pydantic-1.10.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd9b9e98068fa1068edfc9eabde70a7132017bdd4f362f8b4fd0abed79c33083"}, + {file = "pydantic-1.10.6-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1c84583b9df62522829cbc46e2b22e0ec11445625b5acd70c5681ce09c9b11c4"}, + {file = "pydantic-1.10.6-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:b41822064585fea56d0116aa431fbd5137ce69dfe837b599e310034171996084"}, + {file = "pydantic-1.10.6-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:61f1f08adfaa9cc02e0cbc94f478140385cbd52d5b3c5a657c2fceb15de8d1fb"}, + {file = "pydantic-1.10.6-cp310-cp310-win_amd64.whl", hash = "sha256:32937835e525d92c98a1512218db4eed9ddc8f4ee2a78382d77f54341972c0e7"}, + {file = "pydantic-1.10.6-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:bbd5c531b22928e63d0cb1868dee76123456e1de2f1cb45879e9e7a3f3f1779b"}, + {file = "pydantic-1.10.6-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e277bd18339177daa62a294256869bbe84df1fb592be2716ec62627bb8d7c81d"}, + {file = "pydantic-1.10.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:89f15277d720aa57e173954d237628a8d304896364b9de745dcb722f584812c7"}, + {file = "pydantic-1.10.6-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b243b564cea2576725e77aeeda54e3e0229a168bc587d536cd69941e6797543d"}, + {file = "pydantic-1.10.6-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:3ce13a558b484c9ae48a6a7c184b1ba0e5588c5525482681db418268e5f86186"}, + {file = "pydantic-1.10.6-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:3ac1cd4deed871dfe0c5f63721e29debf03e2deefa41b3ed5eb5f5df287c7b70"}, + {file = "pydantic-1.10.6-cp311-cp311-win_amd64.whl", hash = "sha256:b1eb6610330a1dfba9ce142ada792f26bbef1255b75f538196a39e9e90388bf4"}, + {file = "pydantic-1.10.6-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:4ca83739c1263a044ec8b79df4eefc34bbac87191f0a513d00dd47d46e307a65"}, + {file = "pydantic-1.10.6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ea4e2a7cb409951988e79a469f609bba998a576e6d7b9791ae5d1e0619e1c0f2"}, + {file = "pydantic-1.10.6-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:53de12b4608290992a943801d7756f18a37b7aee284b9ffa794ee8ea8153f8e2"}, + {file = "pydantic-1.10.6-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:60184e80aac3b56933c71c48d6181e630b0fbc61ae455a63322a66a23c14731a"}, + {file = "pydantic-1.10.6-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:415a3f719ce518e95a92effc7ee30118a25c3d032455d13e121e3840985f2efd"}, + {file = "pydantic-1.10.6-cp37-cp37m-win_amd64.whl", hash = "sha256:72cb30894a34d3a7ab6d959b45a70abac8a2a93b6480fc5a7bfbd9c935bdc4fb"}, + {file = "pydantic-1.10.6-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:3091d2eaeda25391405e36c2fc2ed102b48bac4b384d42b2267310abae350ca6"}, + {file = "pydantic-1.10.6-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:751f008cd2afe812a781fd6aa2fb66c620ca2e1a13b6a2152b1ad51553cb4b77"}, + {file = "pydantic-1.10.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:12e837fd320dd30bd625be1b101e3b62edc096a49835392dcf418f1a5ac2b832"}, + {file = "pydantic-1.10.6-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:587d92831d0115874d766b1f5fddcdde0c5b6c60f8c6111a394078ec227fca6d"}, + {file = "pydantic-1.10.6-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:476f6674303ae7965730a382a8e8d7fae18b8004b7b69a56c3d8fa93968aa21c"}, + {file = "pydantic-1.10.6-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:3a2be0a0f32c83265fd71a45027201e1278beaa82ea88ea5b345eea6afa9ac7f"}, + {file = "pydantic-1.10.6-cp38-cp38-win_amd64.whl", hash = "sha256:0abd9c60eee6201b853b6c4be104edfba4f8f6c5f3623f8e1dba90634d63eb35"}, + {file = "pydantic-1.10.6-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6195ca908045054dd2d57eb9c39a5fe86409968b8040de8c2240186da0769da7"}, + {file = "pydantic-1.10.6-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:43cdeca8d30de9a897440e3fb8866f827c4c31f6c73838e3a01a14b03b067b1d"}, + {file = "pydantic-1.10.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4c19eb5163167489cb1e0161ae9220dadd4fc609a42649e7e84a8fa8fff7a80f"}, + {file = "pydantic-1.10.6-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:012c99a9c0d18cfde7469aa1ebff922e24b0c706d03ead96940f5465f2c9cf62"}, + {file = "pydantic-1.10.6-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:528dcf7ec49fb5a84bf6fe346c1cc3c55b0e7603c2123881996ca3ad79db5bfc"}, + {file = "pydantic-1.10.6-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:163e79386c3547c49366e959d01e37fc30252285a70619ffc1b10ede4758250a"}, + {file = "pydantic-1.10.6-cp39-cp39-win_amd64.whl", hash = "sha256:189318051c3d57821f7233ecc94708767dd67687a614a4e8f92b4a020d4ffd06"}, + {file = "pydantic-1.10.6-py3-none-any.whl", hash = "sha256:acc6783751ac9c9bc4680379edd6d286468a1dc8d7d9906cd6f1186ed682b2b0"}, + {file = "pydantic-1.10.6.tar.gz", hash = "sha256:cf95adb0d1671fc38d8c43dd921ad5814a735e7d9b4d9e437c088002863854fd"}, ] [package.dependencies] @@ -1118,28 +1107,27 @@ tests = ["pytest"] [[package]] name = "pytest" -version = "5.4.3" +version = "6.2.5" description = "pytest: simple powerful testing with Python" category = "dev" optional = false -python-versions = ">=3.5" +python-versions = ">=3.6" files = [ - {file = "pytest-5.4.3-py3-none-any.whl", hash = "sha256:5c0db86b698e8f170ba4582a492248919255fcd4c79b1ee64ace34301fb589a1"}, - {file = "pytest-5.4.3.tar.gz", hash = "sha256:7979331bfcba207414f5e1263b5a0f8f521d0f457318836a7355531ed1a4c7d8"}, + {file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"}, + {file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"}, ] [package.dependencies] atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} -attrs = ">=17.4.0" +attrs = ">=19.2.0" colorama = {version = "*", markers = "sys_platform == \"win32\""} -more-itertools = ">=4.0.0" +iniconfig = "*" packaging = "*" -pluggy = ">=0.12,<1.0" -py = ">=1.5.0" -wcwidth = "*" +pluggy = ">=0.12,<2.0" +py = ">=1.8.2" +toml = "*" [package.extras] -checkqa-mypy = ["mypy (==v0.761)"] testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] [[package]] @@ -1310,14 +1298,14 @@ files = [ [[package]] name = "setuptools" -version = "67.4.0" +version = "67.6.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "setuptools-67.4.0-py3-none-any.whl", hash = "sha256:f106dee1b506dee5102cc3f3e9e68137bbad6d47b616be7991714b0c62204251"}, - {file = "setuptools-67.4.0.tar.gz", hash = "sha256:e5fd0a713141a4a105412233c63dc4e17ba0090c8e8334594ac790ec97792330"}, + {file = "setuptools-67.6.0-py3-none-any.whl", hash = "sha256:b78aaa36f6b90a074c1fa651168723acbf45d14cb1196b6f02c0fd07f17623b2"}, + {file = "setuptools-67.6.0.tar.gz", hash = "sha256:2ee892cd5f29f3373097f5a814697e397cf3ce313616df0af11231e2ad118077"}, ] [package.extras] @@ -1436,14 +1424,14 @@ files = [ [[package]] name = "urllib3" -version = "1.26.14" +version = "1.26.15" description = "HTTP library with thread-safe connection pooling, file post, and more." category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" files = [ - {file = "urllib3-1.26.14-py2.py3-none-any.whl", hash = "sha256:75edcdc2f7d85b137124a6c3c9fc3933cdeaa12ecb9a6a959f22797a0feca7e1"}, - {file = "urllib3-1.26.14.tar.gz", hash = "sha256:076907bf8fd355cde77728471316625a4d2f7e713c125f51953bb5b3eecf4f72"}, + {file = "urllib3-1.26.15-py2.py3-none-any.whl", hash = "sha256:aa751d169e23c7479ce47a0cb0da579e3ede798f994f5816a74e4f4500dcea42"}, + {file = "urllib3-1.26.15.tar.gz", hash = "sha256:8a388717b9476f934a21484e8c8e61875ab60644d29b9b39e11e4b9dc1c6b305"}, ] [package.extras] @@ -1453,14 +1441,14 @@ socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [[package]] name = "virtualenv" -version = "20.20.0" +version = "20.21.0" description = "Virtual Python Environment builder" category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "virtualenv-20.20.0-py3-none-any.whl", hash = "sha256:3c22fa5a7c7aa106ced59934d2c20a2ecb7f49b4130b8bf444178a16b880fa45"}, - {file = "virtualenv-20.20.0.tar.gz", hash = "sha256:a8a4b8ca1e28f864b7514a253f98c1d62b64e31e77325ba279248c65fb4fcef4"}, + {file = "virtualenv-20.21.0-py3-none-any.whl", hash = "sha256:31712f8f2a17bd06234fa97fdf19609e789dd4e3e4bf108c3da71d710651adbc"}, + {file = "virtualenv-20.21.0.tar.gz", hash = "sha256:f50e3e60f990a0757c9b68333c9fdaa72d7188caa417f96af9e52407831a3b68"}, ] [package.dependencies] @@ -1472,18 +1460,6 @@ platformdirs = ">=2.4,<4" docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=6.1.3)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=22.12)"] test = ["covdefaults (>=2.2.2)", "coverage (>=7.1)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23)", "pytest (>=7.2.1)", "pytest-env (>=0.8.1)", "pytest-freezegun (>=0.4.2)", "pytest-mock (>=3.10)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)"] -[[package]] -name = "wcwidth" -version = "0.2.6" -description = "Measures the displayed width of unicode strings in a terminal" -category = "dev" -optional = false -python-versions = "*" -files = [ - {file = "wcwidth-0.2.6-py2.py3-none-any.whl", hash = "sha256:795b138f6875577cd91bba52baf9e445cd5118fd32723b460e30a0af30ea230e"}, - {file = "wcwidth-0.2.6.tar.gz", hash = "sha256:a5220780a404dbe3353789870978e472cfe477761f06ee55077256e509b156d0"}, -] - [[package]] name = "zipp" version = "3.15.0" @@ -1503,4 +1479,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "11efe97a043bb9887196e851c78e55ecc3cb04da44d09fa6cc21d0f9a92a04c0" +content-hash = "de2f5d027ba8bc3bdb740ce2031a72e5d97d5e703175fc727593d05800920750" diff --git a/pyproject.toml b/pyproject.toml index 13340b6..ee19729 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,7 @@ dbt-artifacts-parser = "^0.2.3" sqlparse = "^0.4.3" [tool.poetry.dev-dependencies] -pytest = "^5.2" +pytest = "^6.2.5" pytest-sugar = "^0.9.6" black = "^22.10.0" coverage = {version = "^6.5.0", extras = ["toml"]} @@ -49,20 +49,6 @@ autoflake = "^2.0.1" requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" -[tool.poe.tasks] -git-hooks = { shell = "pre-commit install --install-hooks && pre-commit install --hook-type commit-msg" } -format = [ - {cmd = "autoflake ."}, - {cmd = "black ."}, - {cmd = "isort ."}, -] -lint = [ - {cmd = "black --check ."}, - {cmd = "isort --check-only ."}, - {cmd = "flake8 ."}, - -] - [tool.isort] multi_line_output = 3 force_to_top = ["os"] @@ -76,3 +62,25 @@ remove-all-unused-imports = true ignore-init-module-imports = true remove-unused-variables = true ignore-pass-statements = false + +[tool.poe.tasks] +git-hooks = { shell = "pre-commit install --install-hooks && pre-commit install --hook-type commit-msg" } +format = [ + {cmd = "autoflake ."}, + {cmd = "black ."}, + {cmd = "isort ."}, +] +lint = [ + {cmd = "black --check ."}, + {cmd = "isort --check-only ."}, + {cmd = "flake8 ."}, +] +test = [ + {cmd = "pytest ."}, +] +test-cov = [ + {cmd = "pytest --version"}, + {cmd = "coverage run -m pytest ."}, + {cmd = "coverage report --show-missing"}, + {cmd = "coverage xml"}, +] diff --git a/samples/dbtresto/catalog.json b/samples/dbtresto/catalog.json index 50b3d45..92dbefa 100644 --- a/samples/dbtresto/catalog.json +++ b/samples/dbtresto/catalog.json @@ -1 +1,1517 @@ -{"metadata": {"dbt_schema_version": "https://schemas.getdbt.com/dbt/catalog/v1.json", "dbt_version": "1.0.3", "generated_at": "2023-03-05T07:12:00.527271Z", "invocation_id": "16e5c041-bc83-4128-b29a-18f05de6ffdf", "env": {}}, "nodes": {"model.integration_tests.verify_get_base_times_hour": {"metadata": {"type": "VIEW", "schema": "dbo", "name": "verify_get_base_times_hour", "database": "dbt", "comment": null, "owner": "dbo"}, "columns": {"time_value": {"type": "datetime", "index": 1, "name": "time_value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.integration_tests.verify_get_base_times_hour"}, "model.integration_tests.verify_get_base_times_second": {"metadata": {"type": "VIEW", "schema": "dbo", "name": "verify_get_base_times_second", "database": "dbt", "comment": null, "owner": "dbo"}, "columns": {"time_value": {"type": "datetime", "index": 1, "name": "time_value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.integration_tests.verify_get_base_times_second"}, "model.integration_tests.verify_get_time_dimension_hour": {"metadata": {"type": "VIEW", "schema": "dbo", "name": "verify_get_time_dimension_hour", "database": "dbt", "comment": null, "owner": "dbo"}, "columns": {"time_value": {"type": "datetime", "index": 1, "name": "time_value", "comment": null}, "time_string": {"type": "nvarchar", "index": 2, "name": "time_string", "comment": null}, "time24_string": {"type": "nvarchar", "index": 3, "name": "time24_string", "comment": null}, "hour_number": {"type": "int", "index": 4, "name": "hour_number", "comment": null}, "hour_name": {"type": "nvarchar", "index": 5, "name": "hour_name", "comment": null}, "hour24_number": {"type": "int", "index": 6, "name": "hour24_number", "comment": null}, "hour24_name": {"type": "nvarchar", "index": 7, "name": "hour24_name", "comment": null}, "time_key": {"type": "bigint", "index": 8, "name": "time_key", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.integration_tests.verify_get_time_dimension_hour"}, "model.integration_tests.verify_datepart": {"metadata": {"type": "BASE TABLE", "schema": "dbo", "name": "verify_datepart", "database": "dbt", "comment": null, "owner": "dbo"}, "columns": {"input": {"type": "datetime", "index": 1, "name": "input", "comment": null}, "date_part": {"type": "varchar", "index": 2, "name": "date_part", "comment": null}, "actual": {"type": "int", "index": 3, "name": "actual", "comment": null}, "expected": {"type": "int", "index": 4, "name": "expected", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.integration_tests.verify_datepart"}, "model.integration_tests.verify_generate_schema_name": {"metadata": {"type": "VIEW", "schema": "dbo", "name": "verify_generate_schema_name", "database": "dbt", "comment": null, "owner": "dbo"}, "columns": {"actual": {"type": "varchar", "index": 1, "name": "actual", "comment": null}, "expected": {"type": "varchar", "index": 2, "name": "expected", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.integration_tests.verify_generate_schema_name"}, "model.integration_tests.verify_get_time_key": {"metadata": {"type": "VIEW", "schema": "dbo", "name": "verify_get_time_key", "database": "dbt", "comment": null, "owner": "dbo"}, "columns": {"actual": {"type": "nvarchar", "index": 1, "name": "actual", "comment": null}, "expected": {"type": "varchar", "index": 2, "name": "expected", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.integration_tests.verify_get_time_key"}, "model.integration_tests.verify_get_time_dimension_second": {"metadata": {"type": "BASE TABLE", "schema": "dbo", "name": "verify_get_time_dimension_second", "database": "dbt", "comment": null, "owner": "dbo"}, "columns": {"time_value": {"type": "datetime", "index": 1, "name": "time_value", "comment": null}, "time_string": {"type": "nvarchar", "index": 2, "name": "time_string", "comment": null}, "time24_string": {"type": "nvarchar", "index": 3, "name": "time24_string", "comment": null}, "hour_number": {"type": "int", "index": 4, "name": "hour_number", "comment": null}, "hour_name": {"type": "nvarchar", "index": 5, "name": "hour_name", "comment": null}, "hour24_number": {"type": "int", "index": 6, "name": "hour24_number", "comment": null}, "hour24_name": {"type": "nvarchar", "index": 7, "name": "hour24_name", "comment": null}, "minute_number": {"type": "int", "index": 8, "name": "minute_number", "comment": null}, "hour_minute_name": {"type": "nvarchar", "index": 9, "name": "hour_minute_name", "comment": null}, "hour24_minute_name": {"type": "nvarchar", "index": 10, "name": "hour24_minute_name", "comment": null}, "second_number": {"type": "int", "index": 11, "name": "second_number", "comment": null}, "time_key": {"type": "bigint", "index": 12, "name": "time_key", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.integration_tests.verify_get_time_dimension_second"}, "model.integration_tests.verify_get_base_times_minute": {"metadata": {"type": "VIEW", "schema": "dbo", "name": "verify_get_base_times_minute", "database": "dbt", "comment": null, "owner": "dbo"}, "columns": {"time_value": {"type": "datetime", "index": 1, "name": "time_value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.integration_tests.verify_get_base_times_minute"}, "model.integration_tests.verify_get_time_dimension_minute": {"metadata": {"type": "VIEW", "schema": "dbo", "name": "verify_get_time_dimension_minute", "database": "dbt", "comment": null, "owner": "dbo"}, "columns": {"time_value": {"type": "datetime", "index": 1, "name": "time_value", "comment": null}, "time_string": {"type": "nvarchar", "index": 2, "name": "time_string", "comment": null}, "time24_string": {"type": "nvarchar", "index": 3, "name": "time24_string", "comment": null}, "hour_number": {"type": "int", "index": 4, "name": "hour_number", "comment": null}, "hour_name": {"type": "nvarchar", "index": 5, "name": "hour_name", "comment": null}, "hour24_number": {"type": "int", "index": 6, "name": "hour24_number", "comment": null}, "hour24_name": {"type": "nvarchar", "index": 7, "name": "hour24_name", "comment": null}, "minute_number": {"type": "int", "index": 8, "name": "minute_number", "comment": null}, "hour_minute_name": {"type": "nvarchar", "index": 9, "name": "hour_minute_name", "comment": null}, "hour24_minute_name": {"type": "nvarchar", "index": 10, "name": "hour24_minute_name", "comment": null}, "time_key": {"type": "bigint", "index": 11, "name": "time_key", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.integration_tests.verify_get_time_dimension_minute"}, "model.integration_tests.verify_get_table_alias": {"metadata": {"type": "VIEW", "schema": "dbo", "name": "verify_get_table_alias_dat", "database": "dbt", "comment": null, "owner": "dbo"}, "columns": {"actual": {"type": "varchar", "index": 1, "name": "actual", "comment": null}, "expected": {"type": "varchar", "index": 2, "name": "expected", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.integration_tests.verify_get_table_alias"}, "model.integration_tests.verify_if_column_value_to_match_regex": {"metadata": {"type": "VIEW", "schema": "dbo", "name": "verify_if_column_value_to_match_regex", "database": "dbt", "comment": null, "owner": "dbo"}, "columns": {"text_only": {"type": "varchar", "index": 1, "name": "text_only", "comment": null}, "number_only": {"type": "varchar", "index": 2, "name": "number_only", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.integration_tests.verify_if_column_value_to_match_regex"}, "model.integration_tests.verify_materialized_view": {"metadata": {"type": "VIEW", "schema": "dbo", "name": "verify_materialized_view", "database": "dbt", "comment": null, "owner": "dbo"}, "columns": {"time_key": {"type": "int", "index": 1, "name": "time_key", "comment": null}, "time_value": {"type": "int", "index": 2, "name": "time_value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.integration_tests.verify_materialized_view"}, "model.integration_tests.verify_money_to_words_en": {"metadata": {"type": "VIEW", "schema": "dbo", "name": "verify_money_to_words_en", "database": "dbt", "comment": null, "owner": "dbo"}, "columns": {"actual": {"type": "nvarchar", "index": 1, "name": "actual", "comment": null}, "input": {"type": "numeric", "index": 2, "name": "input", "comment": null}, "expected": {"type": "varchar", "index": 3, "name": "expected", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.integration_tests.verify_money_to_words_en"}, "model.dbt_resto.fact_number_scoring": {"metadata": {"type": "BASE TABLE", "schema": "mart", "name": "fact_number_scoring", "database": "dbt", "comment": null, "owner": "mart"}, "columns": {"fact_key": {"type": "varchar", "index": 1, "name": "fact_key", "comment": null}, "forecast_date": {"type": "date", "index": 2, "name": "forecast_date", "comment": null}, "number_value": {"type": "int", "index": 3, "name": "number_value", "comment": null}, "score_1": {"type": "int", "index": 4, "name": "score_1", "comment": null}, "score_2": {"type": "int", "index": 5, "name": "score_2", "comment": null}, "score_3": {"type": "int", "index": 6, "name": "score_3", "comment": null}, "score_4": {"type": "int", "index": 7, "name": "score_4", "comment": null}, "score_5": {"type": "int", "index": 8, "name": "score_5", "comment": null}, "score_6": {"type": "int", "index": 9, "name": "score_6", "comment": null}, "rank_pos_1": {"type": "float", "index": 10, "name": "rank_pos_1", "comment": null}, "rank_pos_2": {"type": "float", "index": 11, "name": "rank_pos_2", "comment": null}, "rank_pos_3": {"type": "float", "index": 12, "name": "rank_pos_3", "comment": null}, "rank_pos_4": {"type": "float", "index": 13, "name": "rank_pos_4", "comment": null}, "rank_pos_5": {"type": "float", "index": 14, "name": "rank_pos_5", "comment": null}, "rank_pos_6": {"type": "float", "index": 15, "name": "rank_pos_6", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.dbt_resto.fact_number_scoring"}, "model.dbt_resto.staging_power655_box": {"metadata": {"type": "BASE TABLE", "schema": "staging", "name": "staging_power655_box", "database": "dbt", "comment": null, "owner": "staging"}, "columns": {"sk_box": {"type": "varchar", "index": 1, "name": "sk_box", "comment": null}, "box_date": {"type": "date", "index": 2, "name": "box_date", "comment": null}, "box_id": {"type": "varchar", "index": 3, "name": "box_id", "comment": null}, "box_name": {"type": "nvarchar", "index": 4, "name": "box_name", "comment": null}, "box_result_numbers": {"type": "nvarchar", "index": 5, "name": "box_result_numbers", "comment": null}, "box_result_number_1": {"type": "int", "index": 6, "name": "box_result_number_1", "comment": null}, "box_result_number_2": {"type": "int", "index": 7, "name": "box_result_number_2", "comment": null}, "box_result_number_3": {"type": "int", "index": 8, "name": "box_result_number_3", "comment": null}, "box_result_number_4": {"type": "int", "index": 9, "name": "box_result_number_4", "comment": null}, "box_result_number_5": {"type": "int", "index": 10, "name": "box_result_number_5", "comment": null}, "box_result_number_6": {"type": "int", "index": 11, "name": "box_result_number_6", "comment": null}, "box_result_number_7": {"type": "int", "index": 12, "name": "box_result_number_7", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.dbt_resto.staging_power655_box"}, "seed.dbt_resto.vietlot_power655_data": {"metadata": {"type": "BASE TABLE", "schema": "landing", "name": "power655_data", "database": "dbt", "comment": null, "owner": "landing"}, "columns": {"box_date": {"type": "datetime", "index": 1, "name": "box_date", "comment": null}, "box_id": {"type": "varchar", "index": 2, "name": "box_id", "comment": null}, "box_name": {"type": "nvarchar", "index": 3, "name": "box_name", "comment": null}, "box_result_numbers": {"type": "nvarchar", "index": 4, "name": "box_result_numbers", "comment": null}, "box_results": {"type": "nvarchar", "index": 5, "name": "box_results", "comment": null}, "created_at": {"type": "datetime", "index": 6, "name": "created_at", "comment": null}, "updated_at": {"type": "datetime", "index": 7, "name": "updated_at", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "seed.dbt_resto.vietlot_power655_data"}, "model.dbt_resto.staging_power655_box_detail": {"metadata": {"type": "BASE TABLE", "schema": "staging", "name": "staging_power655_box_detail", "database": "dbt", "comment": null, "owner": "staging"}, "columns": {"sk_box_detail": {"type": "varchar", "index": 1, "name": "sk_box_detail", "comment": null}, "box_id": {"type": "varchar", "index": 2, "name": "box_id", "comment": null}, "prize_name_raw": {"type": "nvarchar", "index": 3, "name": "prize_name_raw", "comment": null}, "prize_name": {"type": "nvarchar", "index": 4, "name": "prize_name", "comment": null}, "prize_won": {"type": "int", "index": 5, "name": "prize_won", "comment": null}, "prize_value_raw": {"type": "nvarchar", "index": 6, "name": "prize_value_raw", "comment": null}, "prize_value": {"type": "float", "index": 7, "name": "prize_value", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.dbt_resto.staging_power655_box_detail"}, "model.dbt_resto.fact_result": {"metadata": {"type": "BASE TABLE", "schema": "mart", "name": "fact_result", "database": "dbt", "comment": null, "owner": "mart"}, "columns": {"fact_result_key": {"type": "varchar", "index": 1, "name": "fact_result_key", "comment": null}, "box_key": {"type": "varchar", "index": 2, "name": "box_key", "comment": null}, "prize_key": {"type": "varchar", "index": 3, "name": "prize_key", "comment": null}, "date_key": {"type": "date", "index": 4, "name": "date_key", "comment": null}, "no_of_won": {"type": "int", "index": 5, "name": "no_of_won", "comment": null}, "prize_value": {"type": "float", "index": 6, "name": "prize_value", "comment": null}, "prize_paid": {"type": "float", "index": 7, "name": "prize_paid", "comment": null}, "is_prize_taken": {"type": "int", "index": 8, "name": "is_prize_taken", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.dbt_resto.fact_result"}, "model.dbt_resto.dim_date": {"metadata": {"type": "BASE TABLE", "schema": "mart", "name": "dim_date", "database": "dbt", "comment": null, "owner": "mart"}, "columns": {"date_key": {"type": "date", "index": 1, "name": "date_key", "comment": null}, "box_date": {"type": "date", "index": 2, "name": "box_date", "comment": null}, "box_day": {"type": "int", "index": 3, "name": "box_day", "comment": null}, "box_week": {"type": "int", "index": 4, "name": "box_week", "comment": null}, "box_month": {"type": "int", "index": 5, "name": "box_month", "comment": null}, "box_month_name": {"type": "varchar", "index": 6, "name": "box_month_name", "comment": null}, "box_year": {"type": "int", "index": 7, "name": "box_year", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.dbt_resto.dim_date"}, "model.dbt_resto.dim_box": {"metadata": {"type": "BASE TABLE", "schema": "mart", "name": "dim_box", "database": "dbt", "comment": null, "owner": "mart"}, "columns": {"box_key": {"type": "varchar", "index": 1, "name": "box_key", "comment": null}, "box_id": {"type": "varchar", "index": 2, "name": "box_id", "comment": null}, "box_date": {"type": "date", "index": 3, "name": "box_date", "comment": null}, "box_result_numbers": {"type": "nvarchar", "index": 4, "name": "box_result_numbers", "comment": null}, "box_result_number_1": {"type": "int", "index": 5, "name": "box_result_number_1", "comment": null}, "box_result_number_2": {"type": "int", "index": 6, "name": "box_result_number_2", "comment": null}, "box_result_number_3": {"type": "int", "index": 7, "name": "box_result_number_3", "comment": null}, "box_result_number_4": {"type": "int", "index": 8, "name": "box_result_number_4", "comment": null}, "box_result_number_5": {"type": "int", "index": 9, "name": "box_result_number_5", "comment": null}, "box_result_number_6": {"type": "int", "index": 10, "name": "box_result_number_6", "comment": null}, "box_result_number_7": {"type": "int", "index": 11, "name": "box_result_number_7", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.dbt_resto.dim_box"}, "model.dbt_resto.fact_number_forecast": {"metadata": {"type": "BASE TABLE", "schema": "mart", "name": "fact_number_forecast", "database": "dbt", "comment": null, "owner": "mart"}, "columns": {"forecast_date": {"type": "date", "index": 1, "name": "forecast_date", "comment": null}, "last_box_date": {"type": "date", "index": 2, "name": "last_box_date", "comment": null}, "forecast_numbers": {"type": "varchar", "index": 3, "name": "forecast_numbers", "comment": null}, "last_box_result_numbers": {"type": "nvarchar", "index": 4, "name": "last_box_result_numbers", "comment": null}, "forecast_1": {"type": "int", "index": 5, "name": "forecast_1", "comment": null}, "last_box_result_number_1": {"type": "int", "index": 6, "name": "last_box_result_number_1", "comment": null}, "forecast_2": {"type": "int", "index": 7, "name": "forecast_2", "comment": null}, "last_box_result_number_2": {"type": "int", "index": 8, "name": "last_box_result_number_2", "comment": null}, "forecast_3": {"type": "int", "index": 9, "name": "forecast_3", "comment": null}, "last_box_result_number_3": {"type": "int", "index": 10, "name": "last_box_result_number_3", "comment": null}, "forecast_4": {"type": "int", "index": 11, "name": "forecast_4", "comment": null}, "last_box_result_number_4": {"type": "int", "index": 12, "name": "last_box_result_number_4", "comment": null}, "forecast_5": {"type": "int", "index": 13, "name": "forecast_5", "comment": null}, "last_box_result_number_5": {"type": "int", "index": 14, "name": "last_box_result_number_5", "comment": null}, "forecast_6": {"type": "int", "index": 15, "name": "forecast_6", "comment": null}, "last_box_result_number_6": {"type": "int", "index": 16, "name": "last_box_result_number_6", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.dbt_resto.fact_number_forecast"}, "model.dbt_resto.fact_number": {"metadata": {"type": "BASE TABLE", "schema": "mart", "name": "fact_number", "database": "dbt", "comment": null, "owner": "mart"}, "columns": {"number_value": {"type": "int", "index": 1, "name": "number_value", "comment": null}, "occurrence": {"type": "int", "index": 2, "name": "occurrence", "comment": null}, "occurrence_pos_1": {"type": "int", "index": 3, "name": "occurrence_pos_1", "comment": null}, "occurrence_pos_2": {"type": "int", "index": 4, "name": "occurrence_pos_2", "comment": null}, "occurrence_pos_3": {"type": "int", "index": 5, "name": "occurrence_pos_3", "comment": null}, "occurrence_pos_4": {"type": "int", "index": 6, "name": "occurrence_pos_4", "comment": null}, "occurrence_pos_5": {"type": "int", "index": 7, "name": "occurrence_pos_5", "comment": null}, "occurrence_pos_6": {"type": "int", "index": 8, "name": "occurrence_pos_6", "comment": null}, "occurrence_pos_7": {"type": "int", "index": 9, "name": "occurrence_pos_7", "comment": null}, "last_appearance": {"type": "date", "index": 10, "name": "last_appearance", "comment": null}, "last_appearance_pos_1": {"type": "date", "index": 11, "name": "last_appearance_pos_1", "comment": null}, "last_appearance_pos_2": {"type": "date", "index": 12, "name": "last_appearance_pos_2", "comment": null}, "last_appearance_pos_3": {"type": "date", "index": 13, "name": "last_appearance_pos_3", "comment": null}, "last_appearance_pos_4": {"type": "date", "index": 14, "name": "last_appearance_pos_4", "comment": null}, "last_appearance_pos_5": {"type": "date", "index": 15, "name": "last_appearance_pos_5", "comment": null}, "last_appearance_pos_6": {"type": "date", "index": 16, "name": "last_appearance_pos_6", "comment": null}, "last_appearance_pos_7": {"type": "date", "index": 17, "name": "last_appearance_pos_7", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.dbt_resto.fact_number"}, "model.integration_tests.verify_str_to_date": {"metadata": {"type": "VIEW", "schema": "dbo", "name": "verify_str_to_date", "database": "dbt", "comment": null, "owner": "dbo"}, "columns": {"actual": {"type": "date", "index": 1, "name": "actual", "comment": null}, "expected": {"type": "date", "index": 2, "name": "expected", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.integration_tests.verify_str_to_date"}, "model.dbt_resto.fact_set_number": {"metadata": {"type": "BASE TABLE", "schema": "mart", "name": "fact_set_number", "database": "dbt", "comment": null, "owner": "mart"}, "columns": {"box_result_numbers": {"type": "nvarchar", "index": 1, "name": "box_result_numbers", "comment": null}, "occurrence": {"type": "int", "index": 2, "name": "occurrence", "comment": null}, "last_appearance": {"type": "date", "index": 3, "name": "last_appearance", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.dbt_resto.fact_set_number"}, "model.dbt_resto.dim_prize": {"metadata": {"type": "BASE TABLE", "schema": "mart", "name": "dim_prize", "database": "dbt", "comment": null, "owner": "mart"}, "columns": {"prize_key": {"type": "varchar", "index": 1, "name": "prize_key", "comment": null}, "prize_name": {"type": "nvarchar", "index": 2, "name": "prize_name", "comment": null}, "prize_order": {"type": "int", "index": 3, "name": "prize_order", "comment": null}}, "stats": {"has_stats": {"id": "has_stats", "label": "Has Stats?", "value": false, "include": false, "description": "Indicates whether there are statistics for this table"}}, "unique_id": "model.dbt_resto.dim_prize"}}, "sources": {}, "errors": null} \ No newline at end of file +{ + "metadata": { + "dbt_schema_version": "https://schemas.getdbt.com/dbt/catalog/v1.json", + "dbt_version": "1.0.3", + "generated_at": "2023-03-05T07:12:00.527271Z", + "invocation_id": "16e5c041-bc83-4128-b29a-18f05de6ffdf", + "env": {} + }, + "nodes": { + "model.integration_tests.verify_get_base_times_hour": { + "metadata": { + "type": "VIEW", + "schema": "dbo", + "name": "verify_get_base_times_hour", + "database": "dbt", + "comment": null, + "owner": "dbo" + }, + "columns": { + "time_value": { + "type": "datetime", + "index": 1, + "name": "time_value", + "comment": null + } + }, + "stats": { + "has_stats": { + "id": "has_stats", + "label": "Has Stats?", + "value": false, + "include": false, + "description": "Indicates whether there are statistics for this table" + } + }, + "unique_id": "model.integration_tests.verify_get_base_times_hour" + }, + "model.integration_tests.verify_get_base_times_second": { + "metadata": { + "type": "VIEW", + "schema": "dbo", + "name": "verify_get_base_times_second", + "database": "dbt", + "comment": null, + "owner": "dbo" + }, + "columns": { + "time_value": { + "type": "datetime", + "index": 1, + "name": "time_value", + "comment": null + } + }, + "stats": { + "has_stats": { + "id": "has_stats", + "label": "Has Stats?", + "value": false, + "include": false, + "description": "Indicates whether there are statistics for this table" + } + }, + "unique_id": "model.integration_tests.verify_get_base_times_second" + }, + "model.integration_tests.verify_get_time_dimension_hour": { + "metadata": { + "type": "VIEW", + "schema": "dbo", + "name": "verify_get_time_dimension_hour", + "database": "dbt", + "comment": null, + "owner": "dbo" + }, + "columns": { + "time_value": { + "type": "datetime", + "index": 1, + "name": "time_value", + "comment": null + }, + "time_string": { + "type": "nvarchar", + "index": 2, + "name": "time_string", + "comment": null + }, + "time24_string": { + "type": "nvarchar", + "index": 3, + "name": "time24_string", + "comment": null + }, + "hour_number": { + "type": "int", + "index": 4, + "name": "hour_number", + "comment": null + }, + "hour_name": { + "type": "nvarchar", + "index": 5, + "name": "hour_name", + "comment": null + }, + "hour24_number": { + "type": "int", + "index": 6, + "name": "hour24_number", + "comment": null + }, + "hour24_name": { + "type": "nvarchar", + "index": 7, + "name": "hour24_name", + "comment": null + }, + "time_key": { + "type": "bigint", + "index": 8, + "name": "time_key", + "comment": null + } + }, + "stats": { + "has_stats": { + "id": "has_stats", + "label": "Has Stats?", + "value": false, + "include": false, + "description": "Indicates whether there are statistics for this table" + } + }, + "unique_id": "model.integration_tests.verify_get_time_dimension_hour" + }, + "model.integration_tests.verify_datepart": { + "metadata": { + "type": "BASE TABLE", + "schema": "dbo", + "name": "verify_datepart", + "database": "dbt", + "comment": null, + "owner": "dbo" + }, + "columns": { + "input": { + "type": "datetime", + "index": 1, + "name": "input", + "comment": null + }, + "date_part": { + "type": "varchar", + "index": 2, + "name": "date_part", + "comment": null + }, + "actual": { + "type": "int", + "index": 3, + "name": "actual", + "comment": null + }, + "expected": { + "type": "int", + "index": 4, + "name": "expected", + "comment": null + } + }, + "stats": { + "has_stats": { + "id": "has_stats", + "label": "Has Stats?", + "value": false, + "include": false, + "description": "Indicates whether there are statistics for this table" + } + }, + "unique_id": "model.integration_tests.verify_datepart" + }, + "model.integration_tests.verify_generate_schema_name": { + "metadata": { + "type": "VIEW", + "schema": "dbo", + "name": "verify_generate_schema_name", + "database": "dbt", + "comment": null, + "owner": "dbo" + }, + "columns": { + "actual": { + "type": "varchar", + "index": 1, + "name": "actual", + "comment": null + }, + "expected": { + "type": "varchar", + "index": 2, + "name": "expected", + "comment": null + } + }, + "stats": { + "has_stats": { + "id": "has_stats", + "label": "Has Stats?", + "value": false, + "include": false, + "description": "Indicates whether there are statistics for this table" + } + }, + "unique_id": "model.integration_tests.verify_generate_schema_name" + }, + "model.integration_tests.verify_get_time_key": { + "metadata": { + "type": "VIEW", + "schema": "dbo", + "name": "verify_get_time_key", + "database": "dbt", + "comment": null, + "owner": "dbo" + }, + "columns": { + "actual": { + "type": "nvarchar", + "index": 1, + "name": "actual", + "comment": null + }, + "expected": { + "type": "varchar", + "index": 2, + "name": "expected", + "comment": null + } + }, + "stats": { + "has_stats": { + "id": "has_stats", + "label": "Has Stats?", + "value": false, + "include": false, + "description": "Indicates whether there are statistics for this table" + } + }, + "unique_id": "model.integration_tests.verify_get_time_key" + }, + "model.integration_tests.verify_get_time_dimension_second": { + "metadata": { + "type": "BASE TABLE", + "schema": "dbo", + "name": "verify_get_time_dimension_second", + "database": "dbt", + "comment": null, + "owner": "dbo" + }, + "columns": { + "time_value": { + "type": "datetime", + "index": 1, + "name": "time_value", + "comment": null + }, + "time_string": { + "type": "nvarchar", + "index": 2, + "name": "time_string", + "comment": null + }, + "time24_string": { + "type": "nvarchar", + "index": 3, + "name": "time24_string", + "comment": null + }, + "hour_number": { + "type": "int", + "index": 4, + "name": "hour_number", + "comment": null + }, + "hour_name": { + "type": "nvarchar", + "index": 5, + "name": "hour_name", + "comment": null + }, + "hour24_number": { + "type": "int", + "index": 6, + "name": "hour24_number", + "comment": null + }, + "hour24_name": { + "type": "nvarchar", + "index": 7, + "name": "hour24_name", + "comment": null + }, + "minute_number": { + "type": "int", + "index": 8, + "name": "minute_number", + "comment": null + }, + "hour_minute_name": { + "type": "nvarchar", + "index": 9, + "name": "hour_minute_name", + "comment": null + }, + "hour24_minute_name": { + "type": "nvarchar", + "index": 10, + "name": "hour24_minute_name", + "comment": null + }, + "second_number": { + "type": "int", + "index": 11, + "name": "second_number", + "comment": null + }, + "time_key": { + "type": "bigint", + "index": 12, + "name": "time_key", + "comment": null + } + }, + "stats": { + "has_stats": { + "id": "has_stats", + "label": "Has Stats?", + "value": false, + "include": false, + "description": "Indicates whether there are statistics for this table" + } + }, + "unique_id": "model.integration_tests.verify_get_time_dimension_second" + }, + "model.integration_tests.verify_get_base_times_minute": { + "metadata": { + "type": "VIEW", + "schema": "dbo", + "name": "verify_get_base_times_minute", + "database": "dbt", + "comment": null, + "owner": "dbo" + }, + "columns": { + "time_value": { + "type": "datetime", + "index": 1, + "name": "time_value", + "comment": null + } + }, + "stats": { + "has_stats": { + "id": "has_stats", + "label": "Has Stats?", + "value": false, + "include": false, + "description": "Indicates whether there are statistics for this table" + } + }, + "unique_id": "model.integration_tests.verify_get_base_times_minute" + }, + "model.integration_tests.verify_get_time_dimension_minute": { + "metadata": { + "type": "VIEW", + "schema": "dbo", + "name": "verify_get_time_dimension_minute", + "database": "dbt", + "comment": null, + "owner": "dbo" + }, + "columns": { + "time_value": { + "type": "datetime", + "index": 1, + "name": "time_value", + "comment": null + }, + "time_string": { + "type": "nvarchar", + "index": 2, + "name": "time_string", + "comment": null + }, + "time24_string": { + "type": "nvarchar", + "index": 3, + "name": "time24_string", + "comment": null + }, + "hour_number": { + "type": "int", + "index": 4, + "name": "hour_number", + "comment": null + }, + "hour_name": { + "type": "nvarchar", + "index": 5, + "name": "hour_name", + "comment": null + }, + "hour24_number": { + "type": "int", + "index": 6, + "name": "hour24_number", + "comment": null + }, + "hour24_name": { + "type": "nvarchar", + "index": 7, + "name": "hour24_name", + "comment": null + }, + "minute_number": { + "type": "int", + "index": 8, + "name": "minute_number", + "comment": null + }, + "hour_minute_name": { + "type": "nvarchar", + "index": 9, + "name": "hour_minute_name", + "comment": null + }, + "hour24_minute_name": { + "type": "nvarchar", + "index": 10, + "name": "hour24_minute_name", + "comment": null + }, + "time_key": { + "type": "bigint", + "index": 11, + "name": "time_key", + "comment": null + } + }, + "stats": { + "has_stats": { + "id": "has_stats", + "label": "Has Stats?", + "value": false, + "include": false, + "description": "Indicates whether there are statistics for this table" + } + }, + "unique_id": "model.integration_tests.verify_get_time_dimension_minute" + }, + "model.integration_tests.verify_get_table_alias": { + "metadata": { + "type": "VIEW", + "schema": "dbo", + "name": "verify_get_table_alias_dat", + "database": "dbt", + "comment": null, + "owner": "dbo" + }, + "columns": { + "actual": { + "type": "varchar", + "index": 1, + "name": "actual", + "comment": null + }, + "expected": { + "type": "varchar", + "index": 2, + "name": "expected", + "comment": null + } + }, + "stats": { + "has_stats": { + "id": "has_stats", + "label": "Has Stats?", + "value": false, + "include": false, + "description": "Indicates whether there are statistics for this table" + } + }, + "unique_id": "model.integration_tests.verify_get_table_alias" + }, + "model.integration_tests.verify_if_column_value_to_match_regex": { + "metadata": { + "type": "VIEW", + "schema": "dbo", + "name": "verify_if_column_value_to_match_regex", + "database": "dbt", + "comment": null, + "owner": "dbo" + }, + "columns": { + "text_only": { + "type": "varchar", + "index": 1, + "name": "text_only", + "comment": null + }, + "number_only": { + "type": "varchar", + "index": 2, + "name": "number_only", + "comment": null + } + }, + "stats": { + "has_stats": { + "id": "has_stats", + "label": "Has Stats?", + "value": false, + "include": false, + "description": "Indicates whether there are statistics for this table" + } + }, + "unique_id": "model.integration_tests.verify_if_column_value_to_match_regex" + }, + "model.integration_tests.verify_materialized_view": { + "metadata": { + "type": "VIEW", + "schema": "dbo", + "name": "verify_materialized_view", + "database": "dbt", + "comment": null, + "owner": "dbo" + }, + "columns": { + "time_key": { + "type": "int", + "index": 1, + "name": "time_key", + "comment": null + }, + "time_value": { + "type": "int", + "index": 2, + "name": "time_value", + "comment": null + } + }, + "stats": { + "has_stats": { + "id": "has_stats", + "label": "Has Stats?", + "value": false, + "include": false, + "description": "Indicates whether there are statistics for this table" + } + }, + "unique_id": "model.integration_tests.verify_materialized_view" + }, + "model.integration_tests.verify_money_to_words_en": { + "metadata": { + "type": "VIEW", + "schema": "dbo", + "name": "verify_money_to_words_en", + "database": "dbt", + "comment": null, + "owner": "dbo" + }, + "columns": { + "actual": { + "type": "nvarchar", + "index": 1, + "name": "actual", + "comment": null + }, + "input": { + "type": "numeric", + "index": 2, + "name": "input", + "comment": null + }, + "expected": { + "type": "varchar", + "index": 3, + "name": "expected", + "comment": null + } + }, + "stats": { + "has_stats": { + "id": "has_stats", + "label": "Has Stats?", + "value": false, + "include": false, + "description": "Indicates whether there are statistics for this table" + } + }, + "unique_id": "model.integration_tests.verify_money_to_words_en" + }, + "model.dbt_resto.fact_number_scoring": { + "metadata": { + "type": "BASE TABLE", + "schema": "mart", + "name": "fact_number_scoring", + "database": "dbt", + "comment": null, + "owner": "mart" + }, + "columns": { + "fact_key": { + "type": "varchar", + "index": 1, + "name": "fact_key", + "comment": null + }, + "forecast_date": { + "type": "date", + "index": 2, + "name": "forecast_date", + "comment": null + }, + "number_value": { + "type": "int", + "index": 3, + "name": "number_value", + "comment": null + }, + "score_1": { + "type": "int", + "index": 4, + "name": "score_1", + "comment": null + }, + "score_2": { + "type": "int", + "index": 5, + "name": "score_2", + "comment": null + }, + "score_3": { + "type": "int", + "index": 6, + "name": "score_3", + "comment": null + }, + "score_4": { + "type": "int", + "index": 7, + "name": "score_4", + "comment": null + }, + "score_5": { + "type": "int", + "index": 8, + "name": "score_5", + "comment": null + }, + "score_6": { + "type": "int", + "index": 9, + "name": "score_6", + "comment": null + }, + "rank_pos_1": { + "type": "float", + "index": 10, + "name": "rank_pos_1", + "comment": null + }, + "rank_pos_2": { + "type": "float", + "index": 11, + "name": "rank_pos_2", + "comment": null + }, + "rank_pos_3": { + "type": "float", + "index": 12, + "name": "rank_pos_3", + "comment": null + }, + "rank_pos_4": { + "type": "float", + "index": 13, + "name": "rank_pos_4", + "comment": null + }, + "rank_pos_5": { + "type": "float", + "index": 14, + "name": "rank_pos_5", + "comment": null + }, + "rank_pos_6": { + "type": "float", + "index": 15, + "name": "rank_pos_6", + "comment": null + } + }, + "stats": { + "has_stats": { + "id": "has_stats", + "label": "Has Stats?", + "value": false, + "include": false, + "description": "Indicates whether there are statistics for this table" + } + }, + "unique_id": "model.dbt_resto.fact_number_scoring" + }, + "model.dbt_resto.staging_power655_box": { + "metadata": { + "type": "BASE TABLE", + "schema": "staging", + "name": "staging_power655_box", + "database": "dbt", + "comment": null, + "owner": "staging" + }, + "columns": { + "sk_box": { + "type": "varchar", + "index": 1, + "name": "sk_box", + "comment": null + }, + "box_date": { + "type": "date", + "index": 2, + "name": "box_date", + "comment": null + }, + "box_id": { + "type": "varchar", + "index": 3, + "name": "box_id", + "comment": null + }, + "box_name": { + "type": "nvarchar", + "index": 4, + "name": "box_name", + "comment": null + }, + "box_result_numbers": { + "type": "nvarchar", + "index": 5, + "name": "box_result_numbers", + "comment": null + }, + "box_result_number_1": { + "type": "int", + "index": 6, + "name": "box_result_number_1", + "comment": null + }, + "box_result_number_2": { + "type": "int", + "index": 7, + "name": "box_result_number_2", + "comment": null + }, + "box_result_number_3": { + "type": "int", + "index": 8, + "name": "box_result_number_3", + "comment": null + }, + "box_result_number_4": { + "type": "int", + "index": 9, + "name": "box_result_number_4", + "comment": null + }, + "box_result_number_5": { + "type": "int", + "index": 10, + "name": "box_result_number_5", + "comment": null + }, + "box_result_number_6": { + "type": "int", + "index": 11, + "name": "box_result_number_6", + "comment": null + }, + "box_result_number_7": { + "type": "int", + "index": 12, + "name": "box_result_number_7", + "comment": null + } + }, + "stats": { + "has_stats": { + "id": "has_stats", + "label": "Has Stats?", + "value": false, + "include": false, + "description": "Indicates whether there are statistics for this table" + } + }, + "unique_id": "model.dbt_resto.staging_power655_box" + }, + "seed.dbt_resto.vietlot_power655_data": { + "metadata": { + "type": "BASE TABLE", + "schema": "landing", + "name": "power655_data", + "database": "dbt", + "comment": null, + "owner": "landing" + }, + "columns": { + "box_date": { + "type": "datetime", + "index": 1, + "name": "box_date", + "comment": null + }, + "box_id": { + "type": "varchar", + "index": 2, + "name": "box_id", + "comment": null + }, + "box_name": { + "type": "nvarchar", + "index": 3, + "name": "box_name", + "comment": null + }, + "box_result_numbers": { + "type": "nvarchar", + "index": 4, + "name": "box_result_numbers", + "comment": null + }, + "box_results": { + "type": "nvarchar", + "index": 5, + "name": "box_results", + "comment": null + }, + "created_at": { + "type": "datetime", + "index": 6, + "name": "created_at", + "comment": null + }, + "updated_at": { + "type": "datetime", + "index": 7, + "name": "updated_at", + "comment": null + } + }, + "stats": { + "has_stats": { + "id": "has_stats", + "label": "Has Stats?", + "value": false, + "include": false, + "description": "Indicates whether there are statistics for this table" + } + }, + "unique_id": "seed.dbt_resto.vietlot_power655_data" + }, + "model.dbt_resto.staging_power655_box_detail": { + "metadata": { + "type": "BASE TABLE", + "schema": "staging", + "name": "staging_power655_box_detail", + "database": "dbt", + "comment": null, + "owner": "staging" + }, + "columns": { + "sk_box_detail": { + "type": "varchar", + "index": 1, + "name": "sk_box_detail", + "comment": null + }, + "box_id": { + "type": "varchar", + "index": 2, + "name": "box_id", + "comment": null + }, + "prize_name_raw": { + "type": "nvarchar", + "index": 3, + "name": "prize_name_raw", + "comment": null + }, + "prize_name": { + "type": "nvarchar", + "index": 4, + "name": "prize_name", + "comment": null + }, + "prize_won": { + "type": "int", + "index": 5, + "name": "prize_won", + "comment": null + }, + "prize_value_raw": { + "type": "nvarchar", + "index": 6, + "name": "prize_value_raw", + "comment": null + }, + "prize_value": { + "type": "float", + "index": 7, + "name": "prize_value", + "comment": null + } + }, + "stats": { + "has_stats": { + "id": "has_stats", + "label": "Has Stats?", + "value": false, + "include": false, + "description": "Indicates whether there are statistics for this table" + } + }, + "unique_id": "model.dbt_resto.staging_power655_box_detail" + }, + "model.dbt_resto.fact_result": { + "metadata": { + "type": "BASE TABLE", + "schema": "mart", + "name": "fact_result", + "database": "dbt", + "comment": null, + "owner": "mart" + }, + "columns": { + "fact_result_key": { + "type": "varchar", + "index": 1, + "name": "fact_result_key", + "comment": null + }, + "box_key": { + "type": "varchar", + "index": 2, + "name": "box_key", + "comment": null + }, + "prize_key": { + "type": "varchar", + "index": 3, + "name": "prize_key", + "comment": null + }, + "date_key": { + "type": "date", + "index": 4, + "name": "date_key", + "comment": null + }, + "no_of_won": { + "type": "int", + "index": 5, + "name": "no_of_won", + "comment": null + }, + "prize_value": { + "type": "float", + "index": 6, + "name": "prize_value", + "comment": null + }, + "prize_paid": { + "type": "float", + "index": 7, + "name": "prize_paid", + "comment": null + }, + "is_prize_taken": { + "type": "int", + "index": 8, + "name": "is_prize_taken", + "comment": null + } + }, + "stats": { + "has_stats": { + "id": "has_stats", + "label": "Has Stats?", + "value": false, + "include": false, + "description": "Indicates whether there are statistics for this table" + } + }, + "unique_id": "model.dbt_resto.fact_result" + }, + "model.dbt_resto.dim_date": { + "metadata": { + "type": "BASE TABLE", + "schema": "mart", + "name": "dim_date", + "database": "dbt", + "comment": null, + "owner": "mart" + }, + "columns": { + "date_key": { + "type": "date", + "index": 1, + "name": "date_key", + "comment": null + }, + "box_date": { + "type": "date", + "index": 2, + "name": "box_date", + "comment": null + }, + "box_day": { + "type": "int", + "index": 3, + "name": "box_day", + "comment": null + }, + "box_week": { + "type": "int", + "index": 4, + "name": "box_week", + "comment": null + }, + "box_month": { + "type": "int", + "index": 5, + "name": "box_month", + "comment": null + }, + "box_month_name": { + "type": "varchar", + "index": 6, + "name": "box_month_name", + "comment": null + }, + "box_year": { + "type": "int", + "index": 7, + "name": "box_year", + "comment": null + } + }, + "stats": { + "has_stats": { + "id": "has_stats", + "label": "Has Stats?", + "value": false, + "include": false, + "description": "Indicates whether there are statistics for this table" + } + }, + "unique_id": "model.dbt_resto.dim_date" + }, + "model.dbt_resto.dim_box": { + "metadata": { + "type": "BASE TABLE", + "schema": "mart", + "name": "dim_box", + "database": "dbt", + "comment": null, + "owner": "mart" + }, + "columns": { + "box_key": { + "type": "varchar", + "index": 1, + "name": "box_key", + "comment": null + }, + "box_id": { + "type": "varchar", + "index": 2, + "name": "box_id", + "comment": null + }, + "box_date": { + "type": "date", + "index": 3, + "name": "box_date", + "comment": null + }, + "box_result_numbers": { + "type": "nvarchar", + "index": 4, + "name": "box_result_numbers", + "comment": null + }, + "box_result_number_1": { + "type": "int", + "index": 5, + "name": "box_result_number_1", + "comment": null + }, + "box_result_number_2": { + "type": "int", + "index": 6, + "name": "box_result_number_2", + "comment": null + }, + "box_result_number_3": { + "type": "int", + "index": 7, + "name": "box_result_number_3", + "comment": null + }, + "box_result_number_4": { + "type": "int", + "index": 8, + "name": "box_result_number_4", + "comment": null + }, + "box_result_number_5": { + "type": "int", + "index": 9, + "name": "box_result_number_5", + "comment": null + }, + "box_result_number_6": { + "type": "int", + "index": 10, + "name": "box_result_number_6", + "comment": null + }, + "box_result_number_7": { + "type": "int", + "index": 11, + "name": "box_result_number_7", + "comment": null + } + }, + "stats": { + "has_stats": { + "id": "has_stats", + "label": "Has Stats?", + "value": false, + "include": false, + "description": "Indicates whether there are statistics for this table" + } + }, + "unique_id": "model.dbt_resto.dim_box" + }, + "model.dbt_resto.fact_number_forecast": { + "metadata": { + "type": "BASE TABLE", + "schema": "mart", + "name": "fact_number_forecast", + "database": "dbt", + "comment": null, + "owner": "mart" + }, + "columns": { + "forecast_date": { + "type": "date", + "index": 1, + "name": "forecast_date", + "comment": null + }, + "last_box_date": { + "type": "date", + "index": 2, + "name": "last_box_date", + "comment": null + }, + "forecast_numbers": { + "type": "varchar", + "index": 3, + "name": "forecast_numbers", + "comment": null + }, + "last_box_result_numbers": { + "type": "nvarchar", + "index": 4, + "name": "last_box_result_numbers", + "comment": null + }, + "forecast_1": { + "type": "int", + "index": 5, + "name": "forecast_1", + "comment": null + }, + "last_box_result_number_1": { + "type": "int", + "index": 6, + "name": "last_box_result_number_1", + "comment": null + }, + "forecast_2": { + "type": "int", + "index": 7, + "name": "forecast_2", + "comment": null + }, + "last_box_result_number_2": { + "type": "int", + "index": 8, + "name": "last_box_result_number_2", + "comment": null + }, + "forecast_3": { + "type": "int", + "index": 9, + "name": "forecast_3", + "comment": null + }, + "last_box_result_number_3": { + "type": "int", + "index": 10, + "name": "last_box_result_number_3", + "comment": null + }, + "forecast_4": { + "type": "int", + "index": 11, + "name": "forecast_4", + "comment": null + }, + "last_box_result_number_4": { + "type": "int", + "index": 12, + "name": "last_box_result_number_4", + "comment": null + }, + "forecast_5": { + "type": "int", + "index": 13, + "name": "forecast_5", + "comment": null + }, + "last_box_result_number_5": { + "type": "int", + "index": 14, + "name": "last_box_result_number_5", + "comment": null + }, + "forecast_6": { + "type": "int", + "index": 15, + "name": "forecast_6", + "comment": null + }, + "last_box_result_number_6": { + "type": "int", + "index": 16, + "name": "last_box_result_number_6", + "comment": null + } + }, + "stats": { + "has_stats": { + "id": "has_stats", + "label": "Has Stats?", + "value": false, + "include": false, + "description": "Indicates whether there are statistics for this table" + } + }, + "unique_id": "model.dbt_resto.fact_number_forecast" + }, + "model.dbt_resto.fact_number": { + "metadata": { + "type": "BASE TABLE", + "schema": "mart", + "name": "fact_number", + "database": "dbt", + "comment": null, + "owner": "mart" + }, + "columns": { + "number_value": { + "type": "int", + "index": 1, + "name": "number_value", + "comment": null + }, + "occurrence": { + "type": "int", + "index": 2, + "name": "occurrence", + "comment": null + }, + "occurrence_pos_1": { + "type": "int", + "index": 3, + "name": "occurrence_pos_1", + "comment": null + }, + "occurrence_pos_2": { + "type": "int", + "index": 4, + "name": "occurrence_pos_2", + "comment": null + }, + "occurrence_pos_3": { + "type": "int", + "index": 5, + "name": "occurrence_pos_3", + "comment": null + }, + "occurrence_pos_4": { + "type": "int", + "index": 6, + "name": "occurrence_pos_4", + "comment": null + }, + "occurrence_pos_5": { + "type": "int", + "index": 7, + "name": "occurrence_pos_5", + "comment": null + }, + "occurrence_pos_6": { + "type": "int", + "index": 8, + "name": "occurrence_pos_6", + "comment": null + }, + "occurrence_pos_7": { + "type": "int", + "index": 9, + "name": "occurrence_pos_7", + "comment": null + }, + "last_appearance": { + "type": "date", + "index": 10, + "name": "last_appearance", + "comment": null + }, + "last_appearance_pos_1": { + "type": "date", + "index": 11, + "name": "last_appearance_pos_1", + "comment": null + }, + "last_appearance_pos_2": { + "type": "date", + "index": 12, + "name": "last_appearance_pos_2", + "comment": null + }, + "last_appearance_pos_3": { + "type": "date", + "index": 13, + "name": "last_appearance_pos_3", + "comment": null + }, + "last_appearance_pos_4": { + "type": "date", + "index": 14, + "name": "last_appearance_pos_4", + "comment": null + }, + "last_appearance_pos_5": { + "type": "date", + "index": 15, + "name": "last_appearance_pos_5", + "comment": null + }, + "last_appearance_pos_6": { + "type": "date", + "index": 16, + "name": "last_appearance_pos_6", + "comment": null + }, + "last_appearance_pos_7": { + "type": "date", + "index": 17, + "name": "last_appearance_pos_7", + "comment": null + } + }, + "stats": { + "has_stats": { + "id": "has_stats", + "label": "Has Stats?", + "value": false, + "include": false, + "description": "Indicates whether there are statistics for this table" + } + }, + "unique_id": "model.dbt_resto.fact_number" + }, + "model.integration_tests.verify_str_to_date": { + "metadata": { + "type": "VIEW", + "schema": "dbo", + "name": "verify_str_to_date", + "database": "dbt", + "comment": null, + "owner": "dbo" + }, + "columns": { + "actual": { + "type": "date", + "index": 1, + "name": "actual", + "comment": null + }, + "expected": { + "type": "date", + "index": 2, + "name": "expected", + "comment": null + } + }, + "stats": { + "has_stats": { + "id": "has_stats", + "label": "Has Stats?", + "value": false, + "include": false, + "description": "Indicates whether there are statistics for this table" + } + }, + "unique_id": "model.integration_tests.verify_str_to_date" + }, + "model.dbt_resto.fact_set_number": { + "metadata": { + "type": "BASE TABLE", + "schema": "mart", + "name": "fact_set_number", + "database": "dbt", + "comment": null, + "owner": "mart" + }, + "columns": { + "box_result_numbers": { + "type": "nvarchar", + "index": 1, + "name": "box_result_numbers", + "comment": null + }, + "occurrence": { + "type": "int", + "index": 2, + "name": "occurrence", + "comment": null + }, + "last_appearance": { + "type": "date", + "index": 3, + "name": "last_appearance", + "comment": null + } + }, + "stats": { + "has_stats": { + "id": "has_stats", + "label": "Has Stats?", + "value": false, + "include": false, + "description": "Indicates whether there are statistics for this table" + } + }, + "unique_id": "model.dbt_resto.fact_set_number" + }, + "model.dbt_resto.dim_prize": { + "metadata": { + "type": "BASE TABLE", + "schema": "mart", + "name": "dim_prize", + "database": "dbt", + "comment": null, + "owner": "mart" + }, + "columns": { + "prize_key": { + "type": "varchar", + "index": 1, + "name": "prize_key", + "comment": null + }, + "prize_name": { + "type": "nvarchar", + "index": 2, + "name": "prize_name", + "comment": null + }, + "prize_order": { + "type": "int", + "index": 3, + "name": "prize_order", + "comment": null + } + }, + "stats": { + "has_stats": { + "id": "has_stats", + "label": "Has Stats?", + "value": false, + "include": false, + "description": "Indicates whether there are statistics for this table" + } + }, + "unique_id": "model.dbt_resto.dim_prize" + } + }, + "sources": {}, + "errors": null +} diff --git a/dbterd/constants.py b/tests/unit/__init__.py similarity index 100% rename from dbterd/constants.py rename to tests/unit/__init__.py diff --git a/tests/unit/adapters/__init__.py b/tests/unit/adapters/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/unit/adapters/targets/__init__.py b/tests/unit/adapters/targets/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/unit/adapters/targets/dbml/__init__.py b/tests/unit/adapters/targets/dbml/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/unit/adapters/targets/dbml/test_engine.py b/tests/unit/adapters/targets/dbml/test_engine.py new file mode 100644 index 0000000..b97c04f --- /dev/null +++ b/tests/unit/adapters/targets/dbml/test_engine.py @@ -0,0 +1,361 @@ +from dataclasses import dataclass +from unittest import mock +from unittest.mock import MagicMock + +import pytest + +from dbterd.adapters.targets.dbml.engine import engine +from dbterd.adapters.targets.dbml.engine.meta import Column, Ref, Table + + +@dataclass +class DummyManifestV6: + compiled_sql: str = "compiled_sql" + + +@dataclass +class DummyManifestV7: + compiled_code: str = "compiled_code" + + +@dataclass +class DummyManifestError: + raw_sql: str = "raw_sql" + + +@dataclass +class DummyManifestHasColumns: + columns = dict({"col1": None, "col2": None}) + database = "database_dummy" + schema = "schema_dummy" + + +@dataclass +class ManifestNodeTestMetaData: + kwargs: dict + + +@dataclass +class ManifestNode: + test_metadata: ManifestNodeTestMetaData + meta: dict + columns: dict + raw_sql: str = "" + database: str = "" + schema_: str = "" + + +@dataclass +class ManifestNodeColumn: + name: str + data_type: str = "unknown" + + +@dataclass +class DummyManifestRel: + parent_map = dict( + { + "test.dbt_resto.relationships_table1": ["table2", "table1"], + "test.dbt_resto.relationships_table2": ["table2", "table1"], + "test.dbt_resto.relationships_table3": ["tabley", "tablex"], + "test.dbt_resto.relationships_tablex": ["y", "x"], + } + ) + nodes = { + "test.dbt_resto.relationships_table1": ManifestNode( + test_metadata=ManifestNodeTestMetaData( + kwargs={"column_name": "f1", "field": "f2"} + ), + meta={}, + columns={}, + ), + "test.dbt_resto.relationships_table2": ManifestNode( + test_metadata=ManifestNodeTestMetaData( + kwargs={"column_name": "f1", "field": "f2"} + ), + meta={}, + columns={}, + ), + "test.dbt_resto.relationships_table3": ManifestNode( + test_metadata=ManifestNodeTestMetaData( + kwargs={"column_name": "f1", "field": "f2"} + ), + meta={}, + columns={}, + ), + "test.dbt_resto.relationships_tablex": ManifestNode( + test_metadata=ManifestNodeTestMetaData( + kwargs={"column_name": "x", "field": "y"} + ), + meta={"ignore_in_erd": 1}, + columns={}, + ), + } + + +@dataclass +class DummyManifestTable: + nodes = { + "model.dbt_resto.table1": ManifestNode( + test_metadata=ManifestNodeTestMetaData(kwargs={}), + meta={}, + raw_sql="--raw_sql--", + database="--database--", + schema_="--schema--", + columns={}, + ), + "model.dbt_resto.table_dummy_columns": ManifestNode( + test_metadata=ManifestNodeTestMetaData(kwargs={}), + meta={}, + raw_sql="--raw_sql--", + database="--database--", + schema_="--schema--", + columns={}, + ), + "model.dbt_resto.table2": ManifestNode( + test_metadata=ManifestNodeTestMetaData(kwargs={}), + meta={}, + raw_sql="--raw_sql2--", + database="--database2--", + schema_="--schema2--", + columns={ + "name2": ManifestNodeColumn(name="name2"), + "name3": ManifestNodeColumn(name="name3"), + }, + ), + } + + +@dataclass +class CatalogNode: + columns: dict + + +@dataclass +class CatalogNodeColumn: + type: str + + +@dataclass +class DummyCatalogTable: + nodes = { + "model.dbt_resto.table1": CatalogNode( + columns={"name1": CatalogNodeColumn(type="--name1-type--")} + ), + "model.dbt_resto.table2": CatalogNode( + columns={"name3": CatalogNodeColumn(type="--name3-type--")} + ), + } + + +class TestDbmlEngine: + @pytest.mark.parametrize( + "tables, relationships, select, expected", + [ + ( + [ + Table( + name="model.dbt_resto.table1", + database="--database--", + schema="--schema--", + columns=[Column(name="name1", data_type="--name1-type--")], + raw_sql="--irrelevant--", + ) + ], + [], + "", + """//Tables (based on the selection criteria) + //--configured at schema: --database--.--schema-- + Table "model.dbt_resto.table1" { + "name1" "--name1-type--" + } + //Refs (based on the DBT Relationship Tests) + """, + ), + ( + [ + Table( + name="model.dbt_resto.table1", + database="--database--", + schema="--schema--", + columns=[Column(name="name1", data_type="--name1-type--")], + raw_sql="--irrelevant--", + ), + Table( + name="model.dbt_resto.table2", + database="--database2--", + schema="--schema2--", + columns=[Column(name="name2", data_type="--name2-type2--")], + raw_sql="--irrelevant--", + ), + ], + [ + Ref( + name="test.dbt_resto.relationships_table1", + table_map=["model.dbt_resto.table2", "model.dbt_resto.table1"], + column_map=["name2", "name1"], + ), + Ref( + name="test.dbt_resto.relationships_table1", + table_map=["model.dbt_resto.table2", "model.dbt_resto.table1"], + column_map=["name-notexist2", "name-notexist1"], + ), + ], + "", + """//Tables (based on the selection criteria) + //--configured at schema: --database--.--schema-- + Table "model.dbt_resto.table1" { + "name1" "--name1-type--" + "name-notexist1" "unknown" + } + //--configured at schema: --database2--.--schema2-- + Table "model.dbt_resto.table2" { + "name2" "--name2-type2--" + "name-notexist2" "unknown" + } + //Refs (based on the DBT Relationship Tests) + Ref: "model.dbt_resto.table1"."name1" > "model.dbt_resto.table2"."name2" + Ref: "model.dbt_resto.table1"."name-notexist1" > "model.dbt_resto.table2"."name-notexist2" + """, + ), + ( + [ + Table( + name="model.dbt_resto.table1", + database="--database--", + schema="--schema--", + columns=[Column(name="name1", data_type="--name1-type--")], + raw_sql="--irrelevant--", + ), + Table( + name="model.dbt_resto.table2", + database="--database2--", + schema="--schema2--", + columns=[Column(name="name2", data_type="--name2-type2--")], + raw_sql="--irrelevant--", + ), + ], + [ + Ref( + name="test.dbt_resto.relationships_table1", + table_map=["model.dbt_resto.table2", "model.dbt_resto.table1"], + column_map=["name2", "name1"], + ) + ], + "schema:--schema--", + """//Tables (based on the selection criteria) + //--configured at schema: --database--.--schema-- + Table "model.dbt_resto.table1" { + "name1" "--name1-type--" + } + //Refs (based on the DBT Relationship Tests) + """, + ), + ], + ) + def test_parse(self, tables, relationships, select, expected): + with mock.patch( + "dbterd.adapters.targets.dbml.engine.engine.get_tables", return_value=tables + ) as mock_get_tables: + with mock.patch( + "dbterd.adapters.targets.dbml.engine.engine.get_relationships", + return_value=relationships, + ) as mock_get_relationships: + dbml = engine.parse( + manifest="--manifest--", catalog="--catalog--", select=select + ) + print("dbml ", dbml.replace(" ", "").replace("\n", "")) + print("expected", expected.replace(" ", "").replace("\n", "")) + assert dbml.replace(" ", "").replace("\n", "") == str(expected).replace( + " ", "" + ).replace("\n", "") + mock_get_tables.assert_called_once() + mock_get_relationships.assert_called_once() + + @pytest.mark.parametrize( + "manifest, catalog, expected", + [ + ( + DummyManifestTable(), + DummyCatalogTable(), + [ + Table( + name="model.dbt_resto.table1", + database="--database--", + schema="--schema--", + columns=[Column(name="name1", data_type="--name1-type--")], + raw_sql="--irrelevant--", + ), + Table( + name="model.dbt_resto.table_dummy_columns", + database="--database--", + schema="--schema--", + columns=[Column()], + raw_sql="--irrelevant--", + ), + Table( + name="model.dbt_resto.table2", + database="--database2--", + schema="--schema2--", + columns=[ + Column(name="name3", data_type="--name3-type--"), + Column(name="name2"), + ], + raw_sql="--irrelevant--", + ), + ], + ) + ], + ) + def test_get_tables(self, manifest, catalog, expected): + with mock.patch( + "dbterd.adapters.targets.dbml.engine.engine.get_compiled_sql", + return_value="--irrelevant--", + ) as mock_get_compiled_sql: + assert engine.get_tables(manifest, catalog) == expected + mock_get_compiled_sql.assert_called() + + @pytest.mark.parametrize( + "manifest, expected", + [ + (DummyManifestV6(), "compiled_sql"), + (DummyManifestV7(), "compiled_code"), + (DummyManifestError(), "raw_sql"), + ( + DummyManifestHasColumns(), + """select + col1, + col2 + from database_dummy.schema_dummy.undefined + """, + ), + ], + ) + def test_get_compiled(self, manifest, expected): + assert engine.get_compiled_sql(manifest_node=manifest).replace(" ", "").replace( + "\n", "" + ) == str(expected).replace(" ", "").replace("\n", "") + + @pytest.mark.parametrize( + "manifest, expected", + [ + ( + DummyManifestRel(), + [ + Ref( + name="test.dbt_resto.relationships_table1", + table_map=["table2", "table1"], + column_map=["f2", "f1"], + ), + Ref( + name="test.dbt_resto.relationships_table3", + table_map=["tabley", "tablex"], + column_map=["f2", "f1"], + ), + ], + ), + (MagicMock(return_value={"parent_map": [], "nodes": {}}), []), + ], + ) + def test_get_relationships(self, manifest, expected): + assert engine.get_relationships(manifest) == expected diff --git a/tests/unit/adapters/test_base.py b/tests/unit/adapters/test_base.py new file mode 100644 index 0000000..9a6732a --- /dev/null +++ b/tests/unit/adapters/test_base.py @@ -0,0 +1,44 @@ +from pathlib import Path +from unittest import mock + +import click + +from dbterd.adapters.worker import DbtWorker + + +class TestBase: + # .run( + # target="dbml", + # algo="test_relationship", + # artifacts_dir="/", + # output="/" + # ) + + def test_worker(self): + worker = DbtWorker(ctx=click.Context(command=click.BaseCommand("dummy"))) + assert worker.filename_manifest == "manifest.json" + assert worker.filename_catalog == "catalog.json" + + def test___read_manifest(self): + worker = DbtWorker(ctx=click.Context(command=click.BaseCommand("dummy"))) + with mock.patch( + "dbterd.helpers.file.read_manifest", return_value=dict({}) + ) as mock_read_manifest: + with mock.patch( + "dbterd.helpers.cli_messaging.check_existence" + ) as mock_check_existence: + assert worker._Executor__read_manifest(mp=Path.cwd()) == dict({}) + mock_check_existence.assert_called_once_with(Path.cwd(), "manifest.json") + mock_read_manifest.assert_called_once_with(Path.cwd(), None) + + def test___read_catalog(self): + worker = DbtWorker(ctx=click.Context(command=click.BaseCommand("dummy"))) + with mock.patch( + "dbterd.helpers.file.read_catalog", return_value=dict({}) + ) as mock_read_catalog: + with mock.patch( + "dbterd.helpers.cli_messaging.check_existence" + ) as mock_check_existence: + assert worker._Executor__read_catalog(cp=Path.cwd()) == dict({}) + mock_check_existence.assert_called_once_with(Path.cwd(), "catalog.json") + mock_read_catalog.assert_called_once_with(Path.cwd()) diff --git a/tests/unit/adapters/test_factory.py b/tests/unit/adapters/test_factory.py new file mode 100644 index 0000000..9f81108 --- /dev/null +++ b/tests/unit/adapters/test_factory.py @@ -0,0 +1,13 @@ +import pytest + +from dbterd.adapters import factory +from dbterd.adapters.targets import dbml + + +class TestFactory: + def test_load_executor_failed(self): + with pytest.raises(Exception): + factory.load_executor(name="dummy") + + def test_load_executor(self): + assert factory.load_executor(name="dbml") == dbml diff --git a/tests/unit/cli/__init__py b/tests/unit/cli/__init__py new file mode 100644 index 0000000..e69de29 diff --git a/tests/unit/cli/test_cli.py b/tests/unit/cli/test_cli.py new file mode 100644 index 0000000..16d870d --- /dev/null +++ b/tests/unit/cli/test_cli.py @@ -0,0 +1,25 @@ +import click + +from dbterd.cli.main import dbterd + + +class TestCLI: + def test_commands_have_docstrings(self): + def run_test(commands): + for command in commands.values(): + if type(command) is click.Command: + assert command.__doc__ is not None + + run_test(dbterd.commands) + + def test_unhidden_params_have_help_texts(self): + def run_test(command): + for param in command.params: + # arguments can't have help text + if not isinstance(param, click.Argument) and not param.hidden: + assert param.help is not None + if type(command) is click.Group: + for command in command.commands.values(): + run_test(command) + + run_test(dbterd) diff --git a/tests/unit/cli/test_runner.py b/tests/unit/cli/test_runner.py new file mode 100644 index 0000000..4a60e2d --- /dev/null +++ b/tests/unit/cli/test_runner.py @@ -0,0 +1,90 @@ +from unittest import mock + +import click +import pytest + +from dbterd.cli.main import dbterdRunner +from dbterd.default import default_output_path + + +class TestRunner: + @pytest.fixture + def dbterd(self) -> dbterdRunner: + return dbterdRunner() + + def test_runner_unhandled_exception(self, dbterd: dbterdRunner) -> None: + with mock.patch( + "dbterd.cli.main.dbterd.make_context", side_effect=click.exceptions.Exit(-1) + ): + with pytest.raises(Exception): + dbterd.invoke(["debug"]) + + def test_group_invalid_option(self, dbterd: dbterdRunner) -> None: + with pytest.raises(Exception): + dbterd.invoke(["--invalid-option"]) + + def test_command_invalid_option(self, dbterd: dbterdRunner) -> None: + with pytest.raises(Exception): + dbterd.invoke(["run", "--invalid-option"]) + + def test_invalid_command(self, dbterd: dbterdRunner) -> None: + with pytest.raises(Exception): + dbterd.invoke(["invalid-command"]) + + def test_invoke_version(self, dbterd: dbterdRunner) -> None: + dbterd.invoke(["--version"]) + + def test_invoke_help(self, dbterd: dbterdRunner) -> None: + dbterd.invoke(["-h"]) + dbterd.invoke(["--help"]) + + def test_invoke_debug(self, dbterd: dbterdRunner) -> None: + dbterd.invoke(["debug"]) + + def test_invoke_run_with_invalid_artifact_path(self, dbterd: dbterdRunner) -> None: + with pytest.raises(click.exceptions.FileError): + dbterd.invoke(["run", "--artifacts-dir", "/path/invalid"]) + + def test_invoke_run_with_invalid_target(self, dbterd: dbterdRunner) -> None: + invalid_target = "invalid-target" + with pytest.raises(Exception) as e: + dbterd.invoke(["run", "--target", invalid_target]) + assert str(e) == (f"Could not find adapter target type {invalid_target}!") + + def test_invoke_run_with_invalid_strategy(self, dbterd: dbterdRunner) -> None: + invalid_strategy = "invalid-strategy" + with mock.patch( + "dbterd.adapters.base.Executor._Executor__read_manifest", return_value=None + ) as mock_read_m: + with mock.patch( + "dbterd.adapters.base.Executor._Executor__read_catalog", + return_value=None, + ) as mock_read_c: + with pytest.raises(TypeError): + dbterd.invoke(["run", "--algo", invalid_strategy]) + mock_read_m.assert_called_once() + mock_read_c.assert_called_once() + + def test_invoke_run_ok(self, dbterd: dbterdRunner) -> None: + with mock.patch( + "dbterd.adapters.base.Executor._Executor__read_manifest", return_value=None + ) as mock_read_m: + with mock.patch( + "dbterd.adapters.base.Executor._Executor__read_catalog", + return_value=None, + ) as mock_read_c: + with mock.patch( + "dbterd.adapters.targets.dbml.engine.engine.parse", + return_value="--irrelevant--", + ) as mock_engine_parse: + with mock.patch("builtins.open", mock.mock_open()) as mock_open_w: + dbterd.invoke(["run"]) + mock_read_m.assert_called_once() + mock_read_c.assert_called_once() + mock_engine_parse.assert_called_once() + mock_open_w.assert_called_once_with( + f"{default_output_path()}/output.dbml", "w" + ) + + dbterd.invoke(["run", "--output", "/custom/path"]) + mock_open_w.assert_called_with("/custom/path/output.dbml", "w") diff --git a/tests/unit/helpers/__init__.py b/tests/unit/helpers/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/unit/helpers/test_cli_messaging.py b/tests/unit/helpers/test_cli_messaging.py new file mode 100644 index 0000000..cd8bf2c --- /dev/null +++ b/tests/unit/helpers/test_cli_messaging.py @@ -0,0 +1,25 @@ +from pathlib import Path +from unittest import mock + +import click +import pytest +from dbt_artifacts_parser import parser + +from dbterd.helpers import cli_messaging, file + + +class TestCliMessaging: + def test_check_existence_invalid_dir(self): + with pytest.raises(click.FileError): + cli_messaging.check_existence(path_str="not-exist-dir", filename="dummy") + + def test_check_existence_invalid_file(self): + with pytest.raises(click.FileError): + cli_messaging.check_existence(path_str=str(Path.cwd()), filename="dummy") + + @mock.patch("dbterd.helpers.file.open_json") + def test_handle_read_errors(self, mock_file_open_json): + mock_file_open_json.return_value = "not json" + with pytest.raises(click.FileError): + with cli_messaging.handle_read_errors("dummy-file", "dummy-message"): + parser.parse_catalog(catalog=file.open_json("dummy-path")) diff --git a/tests/unit/helpers/test_file.py b/tests/unit/helpers/test_file.py new file mode 100644 index 0000000..e9c25cd --- /dev/null +++ b/tests/unit/helpers/test_file.py @@ -0,0 +1,78 @@ +from unittest import mock + +import pytest + +from dbterd.helpers import file + + +class TestFile: + def test_load_file_contents(self): + with mock.patch( + "builtins.open", + mock.mock_open(read_data=str.encode("data", encoding="utf-8")), + ) as mock_file: + assert file.load_file_contents(path="path/to/open") == "data" + mock_file.assert_called_with("path/to/open", "rb") + + def test_load_file_contents_without_strip(self): + with mock.patch( + "builtins.open", + mock.mock_open( + read_data=str.encode("data with trailing space ", encoding="utf-8") + ), + ) as mock_file: + assert ( + file.load_file_contents(path="path/to/open", strip=False) + == "data with trailing space " + ) + mock_file.assert_called_with("path/to/open", "rb") + + @mock.patch("dbterd.helpers.file.load_file_contents") + def test_open_json(self, mock_load_file_contents): + json_data = '{"data": "dummy"}' + mock_load_file_contents.return_value = json_data + assert file.open_json(file.load_file_contents(path="path/to/open")) == dict( + {"data": "dummy"} + ) + + def test_convert_path_length_249(self): + path_249 = 249 * "x" + assert file.convert_path(path=path_249) == path_249 + + @mock.patch("dbterd.helpers.file.supports_long_paths", return_value=True) + def test_convert_path_supports_long_paths(self, mock_supports_long_paths): + path_250 = 250 * "x" + assert file.convert_path(path=path_250) == path_250 + mock_supports_long_paths.assert_called_once() + + @mock.patch("dbterd.helpers.file.supports_long_paths", return_value=False) + def test_convert_path_not_supports_long_path_1(self, mock_supports_long_paths): + path_250_prefix = "\\\\?\\" + 250 * "x" # with prefix + assert file.convert_path(path=path_250_prefix) == path_250_prefix + mock_supports_long_paths.assert_called_once() + + def test_convert_path_not_supports_long_path_2(self): + path_250_noprefix = 250 * "x" + with mock.patch( + "dbterd.helpers.file.supports_long_paths", return_value=False + ) as mock_supports_long_paths: + with mock.patch( + "dbterd.helpers.file.win_prepare_path", return_value="win/path" + ) as mock_win_prepare_path: + assert file.convert_path(path=path_250_noprefix) == "\\\\?\\win/path" + mock_supports_long_paths.assert_called_once() + mock_win_prepare_path.assert_called_with(path_250_noprefix) + + @mock.patch("dbterd.helpers.file.open_json") + def test_read_manifest_error(self, mock_open_json): + mock_open_json.return_value = dict({"data": "dummy"}) + with pytest.raises(ValueError): + file.read_manifest(path="path/to/manifest") + mock_open_json.assert_called_with("path/to/manifest/manifest.json") + + @mock.patch("dbterd.helpers.file.open_json") + def test_read_catalog_error(self, mock_open_json): + mock_open_json.return_value = dict({"data": "dummy"}) + with pytest.raises(ValueError): + file.read_catalog(path="path/to/catalog") + mock_open_json.assert_called_with("path/to/catalog/catalog.json") diff --git a/tests/unit/helpers/test_jsonify.py b/tests/unit/helpers/test_jsonify.py new file mode 100644 index 0000000..e81c703 --- /dev/null +++ b/tests/unit/helpers/test_jsonify.py @@ -0,0 +1,57 @@ +import dataclasses +import json + +import pytest + +from dbterd.helpers import jsonify + + +class Dummy: + def __init__(self, str, secret_str) -> None: + self.json_str = str + self.secret_json_str = secret_str + + +@dataclasses.dataclass +class DummyData: + json_str: str + secret: str + + +class TestFile: + @pytest.mark.parametrize( + "input, ouput", + [ + ('{"data":"dummy"}', dict({"data": "dummy"})), + ( + '{"password":"this is a secret password"}', + dict({"password": "this " + "*" * 10}), + ), + ], + ) + def test_mask(self, input, ouput): + assert jsonify.mask(obj=input) == ouput + + def test_mask_with_class(self): + obj = Dummy(str="dummy", secret_str="this is a secret") + assert jsonify.mask( + json.dumps(obj.__dict__, cls=jsonify.EnhancedJSONEncoder) + ) == dict({"json_str": "dummy", "secret_json_str": "this " + "*" * 10}) + + def test_to_json_none(self): + assert jsonify.to_json(obj=None) == {} + + @pytest.mark.parametrize( + "input", + [ + (dict({"data": {"child_data": "dummy"}})), + (dict({"data": "dummy"})), + (dict({"data": {}})), + ], + ) + def test_to_json_has_pretty_format(self, input): + assert jsonify.to_json(obj=input) == json.dumps( + input, + indent=4, + cls=jsonify.EnhancedJSONEncoder, + ) diff --git a/tests/unit/test_default.py b/tests/unit/test_default.py new file mode 100644 index 0000000..c1f333e --- /dev/null +++ b/tests/unit/test_default.py @@ -0,0 +1,21 @@ +from pathlib import Path + +import pytest + +from dbterd import default + + +class TestDefault: + def test_default_artifact_path(self): + assert default.default_artifact_path() == str(Path.cwd() / "target") + + def test_default_output_path(self): + assert default.default_output_path() == str(Path.cwd() / "target") + + @pytest.mark.parametrize("target", [("dbml")]) + def test_default_target(self, target): + assert default.default_target() == target + + @pytest.mark.parametrize("algo", [("test_relationship")]) + def test_deafult_algo(self, algo): + assert default.deafult_algo() == algo