Skip to content

Commit

Permalink
0.3.2 release prep (#453)
Browse files Browse the repository at this point in the history
* bumps to 0.3.2

* improves credentials gen for duckdb connection

* fixes init command error handling
  • Loading branch information
rudolfix committed Jun 25, 2023
1 parent b05c84d commit 408e2f1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dlt/cli/_dlt.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def init_command_wrapper(source_name: str, destination_name: str, use_generic_te
except Exception as ex:
click.secho(str(ex), err=True, fg="red")
fmt.note("Please refer to %s for further assistance" % fmt.bold(DLT_INIT_DOCS_URL))
raise
return -1
return 0


Expand Down
4 changes: 2 additions & 2 deletions dlt/destinations/duckdb/configuration.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import threading
from pathvalidate import is_valid_filepath
from typing import Any, Final, Optional, Tuple
from typing import Any, ClassVar, Final, List, Optional, Tuple

from dlt.common import logger
from dlt.common.configuration import configspec
Expand All @@ -26,7 +26,7 @@ class DuckDbCredentials(ConnectionStringCredentials):

read_only: bool = False # open database read/write

# __config_gen_annotations__: ClassVar[List[str]] = ["database"]
__config_gen_annotations__: ClassVar[List[str]] = []

def borrow_conn(self, read_only: bool) -> Any:
import duckdb
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "dlt"
version = "0.3.1"
version = "0.3.2"
description = "DLT is an open-source python-native scalable data loading framework that does not require any devops efforts to run."
authors = ["dltHub Inc. <services@dlthub.com>"]
maintainers = [ "Marcin Rudolf <marcin@dlthub.com>", "Adrian Brudaru <adrian@dlthub.com>", "Ty Dunn <ty@dlthub.com>"]
Expand Down
4 changes: 3 additions & 1 deletion tests/cli/test_telemetry_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,10 @@ def test_instrumentation_wrappers() -> None:
start_test_telemetry()

SENT_ITEMS.clear()
with pytest.raises(UnknownDestinationModule):
with io.StringIO() as buf, contextlib.redirect_stderr(buf):
init_command_wrapper("instrumented_source", "<UNK>", False, None, None)
output = buf.getvalue()
assert "is not one of the standard dlt destinations" in output
msg = SENT_ITEMS[0]
assert msg["event"] == "command_init"
assert msg["properties"]["source_name"] == "instrumented_source"
Expand Down

0 comments on commit 408e2f1

Please sign in to comment.