Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make markdown links relative and adjust package dependencies slightly #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ verify_ssl = true

[packages]
# Also need to be added to setup.py
pydantic = "~= 1.9.1"
requests = "~= 2.28.0"
typer = "~= 0.4.2"
google-cloud-storage = "~= 2.4.0"
pydantic = "~= 1.9"
requests = "~= 2.28"
typer = "~= 0.4"
google-cloud-storage = "~= 2.4"
rich = "~= 13.3"

[dev-packages]
Expand Down
561 changes: 283 additions & 278 deletions Pipfile.lock

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,19 @@ More information can be found on the package's [README](src/dbttoolkit/dbt_cloud

## Installation

This project requires Python 3.8+. You can install the latest version of this package from PyPI by running the
This project requires Python 3.8+. You can install the latest version of this package from PyPI by running the
command below.

```shell
$ pip install dbt-toolkit

```

Including dbt-cloud and google cloud bucket support

```shell
$ pip install dbt-toolkit[cloud-support]

```

## Development
Expand Down
14 changes: 9 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,14 @@
python_requires=">=3.8, <4",
setup_requires=["wheel", "setuptools_scm"],
install_requires=[
"requests ~= 2.28.0",
"typer ~= 0.4.2",
"google-cloud-storage ~= 2.4.0",
"pydantic ~= 1.9.1",
"rich ~= 13.3.5",
"typer ~= 0.4",
"pydantic ~= 1.9",
"rich ~= 13.3",
],
extras_require={
"cloud-support": [
"google-cloud-storage ~= 2.4",
"requests ~= 2.28",
]
},
)
2 changes: 1 addition & 1 deletion src/dbttoolkit/documentation/presentation/formatters.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def format_node_link_in_markdown(node_id: str) -> str:
"""
node_type = node_id.split(".")[0]

return f"[{node_id}](/#!/{node_type}/{node_id})"
return f"[{node_id}](#!/{node_type}/{node_id})"


def format_upstream_descriptions_to_human_readable(descriptions_from_upstream: ColumnDescriptionWithSource) -> str:
Expand Down
10 changes: 5 additions & 5 deletions tests/documentation/actions/test_propagate.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_propagation_1_level(transformed_artifact: Mapping):
assert (
description == "Name column of the user table in the source. "
"[propagated from [source.dbt_sample_project.raw.user]"
"(/#!/source/source.dbt_sample_project.raw.user)]"
"(#!/source/source.dbt_sample_project.raw.user)]"
)


Expand All @@ -39,7 +39,7 @@ def test_propagation_2_level(transformed_artifact: Mapping):
assert (
description == "Name column of the user table in the source. "
"[propagated from [source.dbt_sample_project.raw.user]"
"(/#!/source/source.dbt_sample_project.raw.user)]"
"(#!/source/source.dbt_sample_project.raw.user)]"
)


Expand All @@ -63,7 +63,7 @@ def test_alias(transformed_artifact: Mapping):
assert (
propagated_description
== original_description
+ " [propagated from [source.dbt_sample_project.raw.user](/#!/source/source.dbt_sample_project.raw.user)]"
+ " [propagated from [source.dbt_sample_project.raw.user](#!/source/source.dbt_sample_project.raw.user)]"
)


Expand All @@ -77,11 +77,11 @@ def test_2_parents(transformed_artifact: Mapping):
expected = (
"Name column of the city table in the source. "
"[propagated from [source.dbt_sample_project.raw.city]"
"(/#!/source/source.dbt_sample_project.raw.city)]"
"(#!/source/source.dbt_sample_project.raw.city)]"
"\n\n"
"Name column of the user table in the source. "
"[propagated from [source.dbt_sample_project.raw.user]"
"(/#!/source/source.dbt_sample_project.raw.user)]"
"(#!/source/source.dbt_sample_project.raw.user)]"
)

assert description == expected
Expand Down
4 changes: 2 additions & 2 deletions tests/documentation/presentation/test_formatters.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
[
(
"model.project.model_path.model_name",
"[model.project.model_path.model_name](/#!/model/model.project.model_path.model_name)",
"[model.project.model_path.model_name](#!/model/model.project.model_path.model_name)",
),
(
"source.project.source_path.source_name",
"[source.project.source_path.source_name](/#!/source/source.project.source_path.source_name)",
"[source.project.source_path.source_name](#!/source/source.project.source_path.source_name)",
),
],
ids=["model", "source"],
Expand Down