From f24f50862572af859769868fcc24cfb40cf74b6f Mon Sep 17 00:00:00 2001 From: Alex Kan <29241719+akan72@users.noreply.github.com> Date: Tue, 25 Jun 2024 14:37:42 -0400 Subject: [PATCH] Switch from pip -> uv (#247) --- .github/actions/init-dbt/action.yml | 17 +++++++++-------- .github/workflows/compile.yml | 2 +- Makefile | 4 ++-- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/actions/init-dbt/action.yml b/.github/actions/init-dbt/action.yml index c7c9b7b6..b3282446 100644 --- a/.github/actions/init-dbt/action.yml +++ b/.github/actions/init-dbt/action.yml @@ -2,17 +2,18 @@ name: init dbt runs: using: "composite" steps: - - uses: actions/setup-python@v5 - with: - cache: 'pip' - cache-dependency-path: 'requirements.txt' - + # Open PR to actions/setup-python for supporting uv caching https://github.com/actions/setup-python/pull/818 + # Related GH issue https://github.com/actions/setup-python/issues/822 + # + # - uses: actions/setup-python@v5 + # with: + # cache: 'pip' + # cache-dependency-path: 'requirements.txt' - name: Set up dependencies shell: bash run: | - pip install pip==23.1.2 - pip install pip-tools==6.13.0 - pip install -r requirements.txt + pip install uv==0.2.15 + uv pip install -r requirements.txt --system - name: Download DBT Manifest shell: bash diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index f4e3aac3..f22627d5 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -31,4 +31,4 @@ jobs: - name: Compile run: | dbt deps - dbt compile + dbt compile --threads 16 diff --git a/Makefile b/Makefile index 8498d163..96e8a02d 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ install: - pip3 install -r requirements.txt && dbt deps + source syncenv && uv pip install -r requirements.txt && dbt deps -# As of 4/2/2024, compile and test will be run via Github cloud agent. +# As of 4/2/2024, compile and test will be run via Github cloud agent. # Running locally without creds is not possible in Snowflake, but we are actively working on a solution. dbt-compile: dbt compile