Skip to content

Commit

Permalink
Merge pull request #168 from tosh2230/set-numpy-version
Browse files Browse the repository at this point in the history
Set numpy version range
  • Loading branch information
tosh2230 authored Oct 26, 2024
2 parents 103f680 + 837b362 commit b0a0086
Show file tree
Hide file tree
Showing 5 changed files with 1,648 additions and 1,408 deletions.
3,027 changes: 1,627 additions & 1,400 deletions poetry.lock

Large diffs are not rendered by default.

15 changes: 14 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ dbt-bigquery = { version = ">=1.8", optional = true }
dbt-core = { version = ">=1.8", optional = true }
google-cloud-bigquery = { version = ">=3.0", optional = true }
google-cloud-storage = { version = ">=2.0", optional = true }
numpy = [
{ version = "<2.0, >=1.26", python = ">=3.9", optional = true },
{ version = "<1.25", python = "=3.8", optional = true }
]
protobuf = { version = ">=3.20.2", optional = true }
psycopg2 = { version = ">=2.9.3", optional = true }
rsa = { version = ">=4.7", optional = true }
Expand All @@ -33,7 +37,16 @@ SQLAlchemy = { version = ">=2.0", optional = true }
networkx = { version = ">=2.3,<2.8.1", optional = true }

[tool.poetry.extras]
dbt-bigquery = ["dbt-adapters", "dbt-core", "dbt-bigquery", "google-cloud-bigquery", "protobuf", "networkx", "rsa"]
dbt-bigquery = [
"dbt-adapters",
"dbt-core",
"dbt-bigquery",
"google-cloud-bigquery",
"numpy",
"protobuf",
"networkx",
"rsa"
]
gcs = ["google-cloud-storage", "protobuf", "rsa"]
redash = ["psycopg2", "SQLAlchemy"]
s3 = ["boto3", "boto3-stubs"]
Expand Down
6 changes: 3 additions & 3 deletions src/stairlight/map.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,14 @@ def remap(
),
)

upstairs_extra_labels = [
upstairs_extra_labels: list[dict[str, Any]] = [
extra_label.get(MappingConfigKey.LABELS, {})
for extra_label in extra_labels
if extra_label.get(MappingConfigKey.TABLE_NAME)
== upstair_table_reference.TableName
]
upstairs_extra_label = (
upstairs_extra_labels[0] if upstairs_extra_labels else []
upstairs_extra_labels[0] if upstairs_extra_labels else {}
)
upstair_template = self.create_upstair_template(
template=template,
Expand Down Expand Up @@ -237,7 +237,7 @@ def create_upstair_template(
Args:
template (Template): Template class
mapped_labels (dict[str, Any]): Labels in mapping section
extra_labels (list[dict[str, Any]]): Extra labels
extra_label (dict[str, Any]): Extra labels
upstairs (str): Upstairs table's Name
Returns:
Expand Down
4 changes: 2 additions & 2 deletions tests/dbt/project_01/models/example/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ models:
columns:
- name: id
description: "The primary key for this table"
tests:
data_tests:
- unique
- not_null

Expand All @@ -16,6 +16,6 @@ models:
columns:
- name: id
description: "The primary key for this table"
tests:
data_tests:
- unique
- not_null
4 changes: 2 additions & 2 deletions tests/dbt/project_02/models_a/example/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ models:
columns:
- name: id
description: "The primary key for this table"
tests:
data_tests:
- unique
- not_null

Expand All @@ -16,6 +16,6 @@ models:
columns:
- name: id
description: "The primary key for this table"
tests:
data_tests:
- unique
- not_null

0 comments on commit b0a0086

Please sign in to comment.