Skip to content

Commit

Permalink
Bug/#36 quote escaping in description (#41)
Browse files Browse the repository at this point in the history
* fix: #36 escaping quote and minor bug in 1.2.2

* feat: update pipelines
  • Loading branch information
datnguye committed May 13, 2023
1 parent 80f6f15 commit f5cbebb
Show file tree
Hide file tree
Showing 10 changed files with 11,378 additions and 6,620 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
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: Cache the virtualenv
uses: actions/cache@v2
with:
path: ./.venv
key: ${{ runner.os }}-${{ matrix.python-version }}-venv-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Base Code Coverage
name: Upload Base CodeCov

on:
release:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Deploy MkDocs Site
name: Build and Deploy Docs Site

on:
workflow_dispatch:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish
name: Publish PYPI

on:
release:
Expand Down
2 changes: 1 addition & 1 deletion dbterd/adapters/algos/test_relationship.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def get_table_map(test_node, **kwargs):
Returns:
list: [to model, from model]
"""
map = test_node.depends_on.get("nodes", [])
map = test_node.depends_on.nodes or []
rule = get_algo_rule(**kwargs)
to_model = str(test_node.test_metadata.kwargs.get(rule.get("t_to", "to"), {}))
if f'("{map[1].split(".")[-1]}")'.lower() in to_model.replace("'", '"').lower():
Expand Down
6 changes: 4 additions & 2 deletions dbterd/adapters/targets/dbml/dbml_test_relationship.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import json

from dbterd.adapters.algos import test_relationship


Expand Down Expand Up @@ -37,10 +39,10 @@ def parse(manifest, catalog, **kwargs):
columns="\n".join(
[
str.format(
'"{0}" "{1}"{2}',
' "{0}" "{1}"{2}',
x.name,
x.data_type,
str.format(" [note: {1}{0}{1}]", x.description, chr(34))
str.format(" [note: {0}]", json.dumps(x.description))
if x.description
else "",
)
Expand Down
Loading

0 comments on commit f5cbebb

Please sign in to comment.