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

Update dependencies #162

Merged
merged 5 commits into from
May 31, 2024
Merged
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
3,655 changes: 2,094 additions & 1,561 deletions poetry.lock

Large diffs are not rendered by default.

23 changes: 12 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,42 +11,43 @@ packages = [

[tool.poetry.dependencies]
python = ">=3.8,<4"
PyYAML = ">=5.0"
PyYAML = { version = "!=6.0.0,!=5.4.0,!=5.4.1" }
Jinja2 = ">=2.10.3"

# For unit tests
boto3-stubs = {version = ">=1.24.17", extras = ["s3"]}

# optional dependencies
google-cloud-storage = { version = ">=2.0.0", optional = true }
psycopg2 = { version = ">=2.9.3", optional = true }
SQLAlchemy = { version = ">=1.4.31", optional = true }
dbt-core = { version = ">=1.4", optional = true }
dbt-bigquery = { version = ">=1.1", optional = true }
google-cloud-bigquery = { version = ">=2.0", optional = true }
protobuf = { version = ">=3.20.2", optional = true }
boto3 = { version = ">=1.24.14", optional = true }
dbt-adapters = { version = "~1.1.1", optional = true }
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 }
protobuf = { version = ">=3.20.2", optional = true }
psycopg2 = { version = ">=2.9.3", optional = true }
rsa = { version = ">=4.7", optional = true }
SQLAlchemy = { version = ">=2.0", optional = true }

# To avoid not in poetry.lock metadata
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"]
gcs = ["google-cloud-storage", "protobuf", "rsa"]
redash = ["psycopg2", "SQLAlchemy"]
dbt-bigquery = ["dbt-core", "dbt-bigquery", "google-cloud-bigquery", "protobuf", "networkx", "rsa"]
s3 = ["boto3", "boto3-stubs"]

[tool.poetry.dev-dependencies]
black = ">=22.3.0"
flake8 = ">=4.0.1"
isort = ">=5.9.3"
moto = {extras = ["s3"], version = ">=3.1.16"}
mypy = ">=0.961"
types-PyYAML = ">=6.0.8"
pytest = ">=7.2.0"
pytest-cov = ">=4.0.0"
pytest-mock = ">=3.8.1"
moto = {extras = ["s3"], version = ">=3.1.16"}
types-PyYAML = ">=6.0.8"

[tool.poetry.scripts]
stairlight = "src.stairlight.cli:main"
Expand Down
2 changes: 1 addition & 1 deletion src/stairlight/source/redash/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def get_template_str(self) -> str:

def get_uri(self) -> str:
"""Get uri"""
return super().get_uri()
return self.uri


class RedashTemplateSource(TemplateSource):
Expand Down
6 changes: 3 additions & 3 deletions src/stairlight/stairlight.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,9 @@ def search_verbose(
next_table_name
]
if next_response[next_table_name][direction.value]:
search_results[next_table_name][
direction.value
] = next_response[next_table_name][direction.value]
search_results[next_table_name][direction.value] = (
next_response[next_table_name][direction.value]
)
else:
search_results[table_name]["Templates"].append(template)

Expand Down
8 changes: 4 additions & 4 deletions tests/stairlight/source/s3/test_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import boto3
import pytest
from moto import mock_s3
from moto import mock_aws

from src.stairlight.configurator import Configurator
from src.stairlight.source.config import (
Expand Down Expand Up @@ -74,7 +74,7 @@ def test_get_uri(
):
assert s3_template.uri == f"{S3_URI_SCHEME}{bucket}/{key}"

@mock_s3
@mock_aws
def test_get_jinja_params(
self,
s3_template: S3Template,
Expand All @@ -95,7 +95,7 @@ def test_get_jinja_params_integration(
template_str = s3_template.get_template_str()
assert len(s3_template.get_jinja_params(template_str)) > 0

@mock_s3
@mock_aws
def test_render(
self,
s3_template: S3Template,
Expand Down Expand Up @@ -143,7 +143,7 @@ def s3_template_source(
include=_include,
)

@mock_s3
@mock_aws
def test_search_templates(self, s3_template_source: S3TemplateSource):
s3_client = boto3.resource("s3", region_name="us-east-1")
s3_client.create_bucket(Bucket=BUCKET_NAME)
Expand Down
Loading