Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Commit 4be7458

Browse files
Merge branch 'main' into paw/ct-2103-column-schema-2
2 parents cfc53b9 + 92d7527 commit 4be7458

File tree

8 files changed

+58
-35
lines changed

8 files changed

+58
-35
lines changed

.flake8

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ select =
44
W
55
F
66
ignore =
7-
W503 # makes Flake8 work like black
8-
W504
9-
E203 # makes Flake8 work like black
10-
E741
11-
E501
7+
# makes Flake8 work like black
8+
W503,
9+
W504,
10+
# makes Flake8 work like black
11+
E203,
12+
E741,
13+
E501,
1214
exclude = test

.github/workflows/jira-creation.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ permissions:
1919

2020
jobs:
2121
call-label-action:
22-
uses: dbt-labs/jira-actions/.github/workflows/jira-creation.yml@main
22+
uses: dbt-labs/actions/.github/workflows/jira-creation.yml@main
23+
with:
24+
project_key: ADAP
2325
secrets:
2426
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
2527
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}

.github/workflows/jira-label.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ permissions:
1919

2020
jobs:
2121
call-label-action:
22-
uses: dbt-labs/jira-actions/.github/workflows/jira-label.yml@main
22+
uses: dbt-labs/actions/.github/workflows/jira-label.yml@main
23+
with:
24+
project_key: ADAP
2325
secrets:
2426
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
2527
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}

.github/workflows/jira-transition.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,14 @@ on:
1515
issues:
1616
types: [closed, deleted, reopened]
1717

18+
# no special access is needed
19+
permissions: read-all
20+
1821
jobs:
1922
call-label-action:
20-
uses: dbt-labs/jira-actions/.github/workflows/jira-transition.yml@main
23+
uses: dbt-labs/actions/.github/workflows/jira-transition.yml@main
24+
with:
25+
project_key: ADAP
2126
secrets:
2227
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
2328
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}

.pre-commit-config.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ exclude: '^tests/.*'
55

66
# Force all unspecified python hooks to run python 3.8
77
default_language_version:
8-
python: python3.8
8+
python: python3
99

1010
repos:
1111
- repo: https://github.com/pre-commit/pre-commit-hooks
12-
rev: v3.2.0
12+
rev: v4.4.0
1313
hooks:
1414
- id: check-yaml
1515
args: [--unsafe]
@@ -18,31 +18,31 @@ repos:
1818
- id: trailing-whitespace
1919
- id: check-case-conflict
2020
- repo: https://github.com/psf/black
21-
rev: 21.12b0
21+
rev: 23.1.0
2222
hooks:
2323
- id: black
24-
additional_dependencies: ['click==8.0.4']
24+
additional_dependencies: ['click~=8.1']
2525
args:
2626
- "--line-length=99"
2727
- "--target-version=py38"
2828
- id: black
2929
alias: black-check
3030
stages: [manual]
31-
additional_dependencies: ['click==8.0.4']
31+
additional_dependencies: ['click~=8.1']
3232
args:
3333
- "--line-length=99"
3434
- "--target-version=py38"
3535
- "--check"
3636
- "--diff"
3737
- repo: https://github.com/pycqa/flake8
38-
rev: 4.0.1
38+
rev: 6.0.0
3939
hooks:
4040
- id: flake8
4141
- id: flake8
4242
alias: flake8-check
4343
stages: [manual]
4444
- repo: https://github.com/pre-commit/mirrors-mypy
45-
rev: v0.942
45+
rev: v1.0.1
4646
hooks:
4747
- id: mypy
4848
# N.B.: Mypy is... a bit fragile.
@@ -55,12 +55,12 @@ repos:
5555
# of our control to the mix. Unfortunately, there's nothing we can
5656
# do about per pre-commit's author.
5757
# See https://github.com/pre-commit/pre-commit/issues/730 for details.
58-
args: [--show-error-codes, --ignore-missing-imports]
58+
args: [--show-error-codes, --ignore-missing-imports, --explicit-package-bases]
5959
files: ^dbt/adapters/.*
6060
language: system
6161
- id: mypy
6262
alias: mypy-check
6363
stages: [manual]
64-
args: [--show-error-codes, --pretty, --ignore-missing-imports]
64+
args: [--show-error-codes, --pretty, --ignore-missing-imports, --explicit-package-bases]
6565
files: ^dbt/adapters
6666
language: system

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ dev: ## Installs adapter in develop mode along with development dependencies
55
@\
66
pip install -e . -r dev-requirements.txt && pre-commit install
77

8+
.PHONY: dev-uninstall
9+
dev-uninstall: ## Uninstalls all packages while maintaining the virtual environment
10+
## Useful when updating versions, or if you accidentally installed into the system interpreter
11+
pip freeze | grep -v "^-e" | cut -d "@" -f1 | xargs pip uninstall -y
12+
813
.PHONY: mypy
914
mypy: ## Runs mypy against staged changes for static type checking.
1015
@\

dbt/adapters/redshift/connections.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,6 @@ def execute(
249249
return response, table
250250

251251
def add_query(self, sql, auto_begin=True, bindings=None, abridge_sql_log=False):
252-
253252
connection = None
254253
cursor = None
255254

dev-requirements.txt

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,30 @@ git+https://github.com/dbt-labs/dbt-core.git@CT-1919/get_column_schema_from_quer
44
git+https://github.com/dbt-labs/dbt-core.git@CT-1919/get_column_schema_from_query_macro2#egg=dbt-tests-adapter&subdirectory=tests/adapter
55
git+https://github.com/dbt-labs/dbt-core.git@CT-1919/get_column_schema_from_query_macro2#egg=dbt-postgres&subdirectory=plugins/postgres
66

7-
black~=22.8.0
8-
click~=8.1.3
7+
# if version 1.x or greater -> pin to major version
8+
# if version 0.x -> pin to minor
9+
black~=23.1
910
bumpversion~=0.6.0
10-
flake8
11-
flaky~=3.7.0
12-
freezegun~=0.3.12
13-
ipdb~=0.13.9
14-
mypy~=0.971.0
15-
pip-tools~=6.11.0
16-
pre-commit~=2.20.0
17-
pytest~=7.2.0
11+
click~=8.1
12+
flake8~=5.0;python_version=="3.7"
13+
flake8~=6.0;python_version>="3.8"
14+
flaky~=3.7
15+
freezegun~=1.2
16+
ipdb~=0.13.11
17+
mypy==1.0.1 # patch updates have historically introduced breaking changes
18+
pip-tools~=6.12
19+
pre-commit~=2.21;python_version=="3.7"
20+
pre-commit~=3.1;python_version>="3.8"
21+
pre-commit-hooks~=4.4
22+
pytest~=7.2
23+
pytest-csv~=3.0
1824
pytest-dotenv~=0.5.2
19-
pytest-logbook~=1.2.0
20-
pytest-csv~=3.0.0
21-
pytest-xdist~=3.1.0
22-
pytz~=2022.6.0
23-
tox~=4.0.0
24-
twine~=4.0.2
25-
wheel~=0.37.1
25+
pytest-logbook~=1.2
26+
pytest-xdist~=3.2
27+
pytz~=2022.7
28+
tox~=3.0;python_version=="3.7"
29+
tox~=4.4;python_version>="3.8"
30+
types-pytz~=2022.7
31+
types-requests~=2.28
32+
twine~=4.0
33+
wheel~=0.38

0 commit comments

Comments
 (0)