Skip to content

Commit

Permalink
upgrade dbt-bigquery and re-generate artifact types (#2545)
Browse files Browse the repository at this point in the history
* upgrade dbt-bigquery

* create gen_artifacts.sh and use it

* wip on horrific code

* continue subclassing/patching generated models

* start working on mypy compatibility

* remove empty test block

* continue working on mypy passing

* make mypy pass

* fixes post-upgrade

* address comments
  • Loading branch information
atvaccaro authored May 8, 2023
1 parent c347bfa commit 214a36a
Show file tree
Hide file tree
Showing 16 changed files with 1,997 additions and 438 deletions.
1 change: 1 addition & 0 deletions warehouse/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ RUN poetry export -f requirements.txt --without-hashes --output requirements.txt

COPY ./dbt_project.yml /app/dbt_project.yml
COPY ./packages.yml /app/packages.yml
COPY ./profiles.yml /app/profiles.yml
RUN dbt deps

COPY . /app
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,6 @@ models:
For best results, join with reference to a specific date, and make sure to choose a specific
output grain (organizations, services, customer-facing vs. not); you will likely need to filter
or group to get the desired output.
tests:
columns:
- *key
- name: service_key
Expand Down
3 changes: 3 additions & 0 deletions warehouse/mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[mypy]
plugins = pydantic.mypy, sqlmypy
disable_error_code = assignment
200 changes: 52 additions & 148 deletions warehouse/poetry.lock

Large diffs are not rendered by default.

7 changes: 2 additions & 5 deletions warehouse/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ networkx = {version = "<3", extras = ["default"]}
# export CFLAGS="-I $(brew --prefix graphviz)/include"
# export LDFLAGS="-L $(brew --prefix graphviz)/lib"
pygraphviz = "^1.10"
dbt-bigquery = "^1.4.3"
palettable = "^3.3.0"
dbt-bigquery = "^1.5.0"

[tool.poetry.group.dev.dependencies]
black = "^22.12.0"
mypy = "^0.991"
isort = "^5.11.4"
types-tqdm = "^4.64.7"
types-requests = "^2.28.11"
Expand All @@ -46,10 +45,8 @@ datamodel-code-generator = "^0.17.1"
sqlfluff = "^2.0.2"
sqlfluff-templater-dbt = "^2.0.2"
ipdb = "^0.13.13"
mypy = "^1.2.0"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.mypy]
plugins = "sqlmypy"
Loading

0 comments on commit 214a36a

Please sign in to comment.