-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #866 from dlt-hub/devel
0.4.2 release
- Loading branch information
Showing
34 changed files
with
538 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,8 @@ on: | |
workflow_dispatch: | ||
|
||
env: | ||
DLT_SECRETS_TOML: ${{ secrets.DLT_SECRETS_TOML }} | ||
|
||
DESTINATION__DUCKDB__CREDENTIALS: duckdb:///_storage/test_quack.duckdb | ||
|
||
RUNTIME__SENTRY_DSN: https://[email protected]/4504819859914752 | ||
|
@@ -18,12 +20,9 @@ env: | |
DESTINATION__WEAVIATE__VECTORIZER: text2vec-contextionary | ||
DESTINATION__WEAVIATE__MODULE_CONFIG: "{\"text2vec-contextionary\": {\"vectorizeClassName\": false, \"vectorizePropertyName\": true}}" | ||
|
||
# zendesk vars for example | ||
SOURCES__ZENDESK__CREDENTIALS: ${{ secrets.ZENDESK__CREDENTIALS }} | ||
# Slack hook for chess in production example | ||
RUNTIME__SLACK_INCOMING_HOOK: ${{ secrets.RUNTIME__SLACK_INCOMING_HOOK }} | ||
# Mongodb url for nested data example | ||
MONGODB_PIPELINE__SOURCES__CONNECTION_URL: ${{ secrets.MONGODB_PIPELINE__SOURCES__CONNECTION_URL }} | ||
|
||
# Qdrant credentials | ||
DESTINATION__QDRANT__CREDENTIALS__LOCATION: ${{ secrets.DESTINATION__QDRANT__CREDENTIALS__LOCATION }} | ||
DESTINATION__QDRANT__CREDENTIALS__API_KEY: ${{ secrets.DESTINATION__QDRANT__CREDENTIALS__API_KEY }} | ||
|
@@ -65,6 +64,9 @@ jobs: | |
# if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: poetry install --no-interaction -E duckdb -E weaviate -E parquet -E qdrant --with docs,sentry-sdk --without airflow | ||
|
||
- name: create secrets.toml | ||
run: pwd && echo "$DLT_SECRETS_TOML" > docs/website/docs/.dlt/secrets.toml | ||
|
||
- name: Run linter and tests | ||
run: make test-and-lint-snippets | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
"""This module collects all destination adapters present in `impl` namespace""" | ||
|
||
from dlt.destinations.impl.weaviate import weaviate_adapter | ||
from dlt.destinations.impl.qdrant import qdrant_adapter | ||
|
||
__all__ = ["weaviate_adapter", "qdrant_adapter"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[mongodb_pipeline.sources] | ||
[sources.mongodb] | ||
connection_url="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,18 @@ | ||
import os | ||
import pytest | ||
from typing import List | ||
from unittest.mock import patch | ||
|
||
from dlt.common.utils import set_working_dir | ||
from dlt.common.configuration.container import Container | ||
|
||
# patch which providers to enable | ||
from dlt.common.configuration.providers import ( | ||
StringTomlProvider, | ||
ConfigTomlProvider, | ||
EnvironProvider, | ||
SecretsTomlProvider, | ||
ConfigTomlProvider, | ||
StringTomlProvider, | ||
) | ||
from dlt.common.configuration.specs.config_providers_context import ( | ||
ConfigProvidersContext, | ||
ConfigProvidersConfiguration, | ||
) | ||
from dlt.common.utils import set_working_dir | ||
|
||
from tests.utils import ( | ||
patch_home_dir, | ||
|
@@ -28,16 +24,17 @@ | |
|
||
|
||
@pytest.fixture(autouse=True) | ||
def setup_tests(request): | ||
# always set working dir to main website folder | ||
def setup_secret_providers(request): | ||
"""Creates set of config providers where tomls are loaded from tests/.dlt""" | ||
secret_dir = "./.dlt" | ||
dname = os.path.dirname(request.module.__file__) | ||
config_dir = dname + "/.dlt" | ||
|
||
# inject provider context so the original providers are restored at the end | ||
def _initial_providers(): | ||
return [ | ||
EnvironProvider(), | ||
SecretsTomlProvider(project_dir=config_dir, add_global_config=False), | ||
SecretsTomlProvider(project_dir=secret_dir, add_global_config=False), | ||
ConfigTomlProvider(project_dir=config_dir, add_global_config=False), | ||
] | ||
|
||
|
@@ -48,11 +45,13 @@ def _initial_providers(): | |
"dlt.common.configuration.specs.config_providers_context.ConfigProvidersContext.initial_providers", | ||
_initial_providers, | ||
): | ||
# extras work when container updated | ||
glob_ctx.add_extras() | ||
yield | ||
|
||
|
||
def pytest_configure(config): | ||
# push sentry to ci | ||
os.environ["RUNTIME__SENTRY_DSN"] = ( | ||
"https://[email protected]/4504819859914752" | ||
) | ||
os.environ[ | ||
"RUNTIME__SENTRY_DSN" | ||
] = "https://[email protected]/4504819859914752" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
docs/website/docs/examples/nested_data/code/.dlt/example.secrets.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# @@@DLT_SNIPPET_START example | ||
[mongodb_pipeline.sources] | ||
[sources.mongodb] | ||
connection_url="" | ||
# @@@DLT_SNIPPET_END example |
2 changes: 2 additions & 0 deletions
2
docs/website/docs/examples/nested_data/code/nested_data-snippets.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.