From 5169885cebaf5935d0dc4512a5a101ba638d880c Mon Sep 17 00:00:00 2001 From: Alex Kan <29241719+akan72@users.noreply.github.com> Date: Thu, 19 Dec 2024 16:55:57 -0500 Subject: [PATCH] Update to use pipcompile --- Makefile | 5 ++- requirements.in | 8 +++++ requirements.txt | 85 ++++++++++++++++++++++++++++++++++++++++++++---- syncenv | 4 +-- 4 files changed, 91 insertions(+), 11 deletions(-) create mode 100644 requirements.in diff --git a/Makefile b/Makefile index 96e8a02d..6df9024d 100644 --- a/Makefile +++ b/Makefile @@ -10,4 +10,7 @@ dbt-test: dbt test dbt-perms: - python dbt_scripts/grant_permissions.py \ No newline at end of file + python dbt_scripts/grant_permissions.py + +pipcompile: + uv pip compile --annotation-style=line requirements.in -o requirements.txt --no-strip-extras diff --git a/requirements.in b/requirements.in new file mode 100644 index 00000000..dcec2f3d --- /dev/null +++ b/requirements.in @@ -0,0 +1,8 @@ +# run `make pipcompile` to update requirements.txt +dbt-core==1.7.17 +dbt-extractor==0.5.1 +dbt-semantic-interfaces==0.4.3 +dbt-snowflake==1.7.1 +pandas==2.0.2 +numpy==1.26.4 +sqlfluff==3.1.0 diff --git a/requirements.txt b/requirements.txt index 2dd5579b..9b521ac1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,78 @@ -dbt-core==1.7.17 -dbt-extractor==0.5.1 -dbt-semantic-interfaces==0.4.3 -dbt-snowflake==1.7.1 -pandas==2.0.2 -numpy==1.26.4 -sqlfluff==3.1.0 +# This file was autogenerated by uv via the following command: +# uv pip compile --annotation-style=line requirements.in -o requirements.txt --no-strip-extras +agate==1.7.1 # via dbt-core, dbt-snowflake +annotated-types==0.7.0 # via pydantic +appdirs==1.4.4 # via sqlfluff +asn1crypto==1.5.1 # via snowflake-connector-python +attrs==24.3.0 # via jsonschema, referencing +babel==2.16.0 # via agate +backports-tarfile==1.2.0 # via jaraco-context +certifi==2024.12.14 # via requests, snowflake-connector-python +cffi==1.17.1 # via cryptography, dbt-core, snowflake-connector-python +chardet==5.2.0 # via diff-cover, sqlfluff +charset-normalizer==3.4.0 # via requests, snowflake-connector-python +click==8.1.7 # via dbt-core, dbt-semantic-interfaces, sqlfluff +colorama==0.4.6 # via dbt-core, sqlfluff +cryptography==44.0.0 # via pyopenssl, snowflake-connector-python +dbt-core==1.7.17 # via dbt-snowflake, -r requirements.in +dbt-extractor==0.5.1 # via dbt-core, -r requirements.in +dbt-semantic-interfaces==0.4.3 # via dbt-core, -r requirements.in +dbt-snowflake==1.7.1 # via -r requirements.in +diff-cover==9.2.1 # via sqlfluff +filelock==3.16.1 # via snowflake-connector-python +idna==3.10 # via dbt-core, requests, snowflake-connector-python +importlib-metadata==6.11.0 # via dbt-semantic-interfaces, keyring +iniconfig==2.0.0 # via pytest +isodate==0.6.1 # via agate, dbt-core +jaraco-classes==3.4.0 # via keyring +jaraco-context==6.0.1 # via keyring +jaraco-functools==4.1.0 # via keyring +jinja2==3.1.4 # via dbt-core, dbt-semantic-interfaces, diff-cover, sqlfluff +jsonschema==4.23.0 # via dbt-core, dbt-semantic-interfaces +jsonschema-specifications==2024.10.1 # via jsonschema +keyring==25.5.0 # via snowflake-connector-python +leather==0.4.0 # via agate +logbook==1.5.3 # via dbt-core +markupsafe==3.0.2 # via jinja2 +mashumaro[msgpack]==3.15 # via dbt-core +minimal-snowplow-tracker==0.0.2 # via dbt-core +more-itertools==10.5.0 # via dbt-semantic-interfaces, jaraco-classes, jaraco-functools +msgpack==1.1.0 # via mashumaro +networkx==3.4.2 # via dbt-core +numpy==1.26.4 # via pandas, -r requirements.in +packaging==24.2 # via dbt-core, pytest, snowflake-connector-python +pandas==2.0.2 # via -r requirements.in +parsedatetime==2.6 # via agate +pathspec==0.11.2 # via dbt-core, sqlfluff +platformdirs==4.3.6 # via snowflake-connector-python +pluggy==1.5.0 # via diff-cover, pytest +protobuf==4.25.5 # via dbt-core +pycparser==2.22 # via cffi +pydantic==2.10.4 # via dbt-semantic-interfaces +pydantic-core==2.27.2 # via pydantic +pygments==2.18.0 # via diff-cover +pyjwt==2.10.1 # via snowflake-connector-python +pyopenssl==24.3.0 # via snowflake-connector-python +pytest==8.3.4 # via sqlfluff +python-dateutil==2.9.0.post0 # via dbt-semantic-interfaces, pandas +python-slugify==8.0.4 # via agate +pytimeparse==1.1.8 # via agate +pytz==2024.2 # via dbt-core, pandas, snowflake-connector-python +pyyaml==6.0.2 # via dbt-core, dbt-semantic-interfaces, sqlfluff +referencing==0.35.1 # via jsonschema, jsonschema-specifications +regex==2024.11.6 # via sqlfluff +requests==2.32.3 # via dbt-core, minimal-snowplow-tracker, snowflake-connector-python +rpds-py==0.22.3 # via jsonschema, referencing +six==1.17.0 # via isodate, minimal-snowplow-tracker, python-dateutil +snowflake-connector-python[secure-local-storage]==3.12.4 # via dbt-snowflake +sortedcontainers==2.4.0 # via snowflake-connector-python +sqlfluff==3.1.0 # via -r requirements.in +sqlparse==0.5.3 # via dbt-core +tblib==3.0.0 # via sqlfluff +text-unidecode==1.3 # via python-slugify +tomlkit==0.13.2 # via snowflake-connector-python +tqdm==4.67.1 # via sqlfluff +typing-extensions==4.12.2 # via dbt-core, dbt-semantic-interfaces, mashumaro, pydantic, pydantic-core, snowflake-connector-python +tzdata==2024.2 # via pandas +urllib3==1.26.20 # via dbt-core, requests +zipp==3.21.0 # via importlib-metadata diff --git a/syncenv b/syncenv index 5cfedf30..bcd0dadc 100644 --- a/syncenv +++ b/syncenv @@ -2,10 +2,8 @@ python3 -m venv venv . ./venv/bin/activate pip install uv==0.2.15 -uv pip install -r requirements.txt +uv pip sync requirements.txt chmod +x dbt_scripts/run_sqlfluff_on_changed_files.sh source .env.local - -