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

Release 1 7 5 #265

Merged
merged 5 commits into from
Apr 2, 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
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Python 3.9
uses: actions/setup-python@v4
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.11

- name: Upgrade Setuptools
run: pip install --upgrade setuptools wheel
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Upgrade Setuptools
run: pip install --upgrade setuptools wheel
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_cloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Python 3.11
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'

Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/test_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,17 @@ jobs:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
clickhouse-version:
- '23.3'
- '23.8'
- '23.9'
- '23.10'
- '24.1'
- '24.2'
- '24.3'
- latest

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set environment variables
if: ${{ matrix.clickhouse-version == '22.3' }}
Expand All @@ -49,7 +50,7 @@ jobs:
run: REPLICA_NUM=1 docker-compose -f ${{ github.workspace }}/tests/integration/docker-compose.yml up -d

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### Release [1.7.5], 2024-04-02
#### Bug Fixes
- Requirements and tests upgraded to include Python 3.12. Closes https://github.com/ClickHouse/dbt-clickhouse/issues/264
- Model settings were not working correctly for customer materializations. Thanks to original dbt-clickhouse [silentsokolov](https://github.com/silentsokolov)
for the PR!

### Release [1.7.4], 2024-03-23
#### Improvement
- Adds support for materializing ClickHouse dictionaries. Thanks to [Rory Sawyer](https://github.com/SoryRawyer) for the contribution!
Expand Down
8 changes: 2 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Check style and linting
.PHONY: check-black check-isort check-flake8 check-mypy lint
.PHONY: check-black check-isort check-mypy lint

check-black:
@echo "--> Running black checks"
Expand All @@ -9,10 +9,6 @@ check-isort:
@echo "--> Running isort checks"
@isort --check-only .

check-flake8:
@echo "--> Running flake8 checks"
@flake8 .

check-mypy:
@echo "--> Running mypy checks"
@mypy --exclude dbt/adapters/clickhouse/__init__.py --exclude conftest.py .
Expand All @@ -21,7 +17,7 @@ check-yamllint:
@echo "--> Running yamllint checks"
@yamllint dbt tests .github

lint: check-black check-isort check-flake8 check-mypy check-yamllint
lint: check-black check-isort check-mypy check-yamllint

# Format code
.PHONY: fmt
Expand Down
2 changes: 1 addition & 1 deletion dbt/adapters/clickhouse/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = '1.7.4'
version = '1.7.5'
8 changes: 4 additions & 4 deletions dbt/adapters/clickhouse/dbclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,20 @@ def get_db_client(credentials: ClickHouseCredentials):
from dbt.adapters.clickhouse.nativeclient import ChNativeClient

return ChNativeClient(credentials)
except ImportError:
except ImportError as ex:
raise FailedToConnectError(
'Native adapter required but package clickhouse-driver is not installed'
)
) from ex
try:
import clickhouse_connect # noqa

from dbt.adapters.clickhouse.httpclient import ChHttpClient

return ChHttpClient(credentials)
except ImportError:
except ImportError as ex:
raise FailedToConnectError(
'HTTP adapter required but package clickhouse-connect is not installed'
)
) from ex


class ChRetryableException(Exception):
Expand Down
13 changes: 6 additions & 7 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
dbt-core~=1.7.3
clickhouse-connect>=0.6.22
clickhouse-driver>=0.2.6
dbt-core~=1.7.11
clickhouse-connect>=0.7.6
clickhouse-driver>=0.2.7
pytest>=7.2.0
pytest-dotenv==0.5.2
dbt-tests-adapter~=1.7.3
dbt-tests-adapter~=1.7.11
black==24.3.0
isort==5.10.1
mypy==0.991
yamllint==1.26.3
flake8==4.0.1
types-requests==2.27.29
agate~=1.7.1
requests~=2.27.1
setuptools~=65.3.0
types-setuptools==67.1.0.0
setuptools>=69.2.0
types-setuptools>=69.2.0
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.black]
line-length = 100
skip-string-normalization = true
target-version = ['py310', 'py311']
target-version = ['py310', 'py311', 'py312']
exclude = '(\.eggs|\.git|\.mypy_cache|\.venv|venv|env|_build|build|build|dist|)'

[tool.isort]
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def _dbt_clickhouse_version():
f'dbt-core~={dbt_version}',
'clickhouse-connect>=0.6.22',
'clickhouse-driver>=0.2.6',
'setuptools>=0.69',
],
python_requires=">=3.8",
platforms='any',
Expand Down