diff --git a/.github/workflows/daft-profiling.yml b/.github/workflows/daft-profiling.yml index e431e347c4..a67f203e6e 100644 --- a/.github/workflows/daft-profiling.yml +++ b/.github/workflows/daft-profiling.yml @@ -10,6 +10,7 @@ env: TPCH_SCALE_FACTOR: '4' TPCH_NUM_PARTS: '32' PYTHON_VERSION: '3.9' + UV_SYSTEM_PYTHON: 1 jobs: @@ -37,11 +38,11 @@ jobs: run: | python -m venv venv echo "$GITHUB_WORKSPACE/venv/bin" >> $GITHUB_PATH + pip install uv - name: Install dependencies run: | - pip install --upgrade pip - pip install -r requirements-dev.txt + uv pip install -r requirements-dev.txt - name: Build Rust Library run: | diff --git a/.github/workflows/nightlies-tests.yml b/.github/workflows/nightlies-tests.yml index 3029e632c3..b9a6c40f78 100644 --- a/.github/workflows/nightlies-tests.yml +++ b/.github/workflows/nightlies-tests.yml @@ -11,6 +11,7 @@ on: env: DAFT_ANALYTICS_ENABLED: '0' + UV_SYSTEM_PYTHON: 1 jobs: integration-test-tpch: @@ -34,8 +35,8 @@ jobs: echo "$GITHUB_WORKSPACE/venv/bin" >> $GITHUB_PATH - name: Install Daft and dev dependencies run: | - pip install --upgrade pip - pip install -r requirements-dev.txt getdaft --pre --extra-index-url https://pypi.anaconda.org/daft-nightly/simple --force-reinstall + pip install uv + uv pip install -r requirements-dev.txt getdaft --pre --extra-index-url https://pypi.anaconda.org/daft-nightly/simple --force-reinstall rm -rf daft - uses: actions/cache@v4 env: @@ -98,8 +99,8 @@ jobs: echo "$GITHUB_WORKSPACE/venv/bin" >> $GITHUB_PATH - name: Install Daft and dev dependencies run: | - pip install --upgrade pip - pip install -r requirements-dev.txt getdaft --pre --extra-index-url https://pypi.anaconda.org/daft-nightly/simple --force-reinstall + pip install uv + uv pip install -r requirements-dev.txt getdaft --pre --extra-index-url https://pypi.anaconda.org/daft-nightly/simple --force-reinstall rm -rf daft - name: Prepare tmpdirs for IO services run: | diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index afaf36cfa1..b17f676946 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -14,6 +14,7 @@ on: env: DAFT_ANALYTICS_ENABLED: '0' + UV_SYSTEM_PYTHON: 1 jobs: @@ -68,27 +69,27 @@ jobs: run: | python -m venv venv echo "$GITHUB_WORKSPACE/venv/bin" >> $GITHUB_PATH + pip install uv - name: Install dependencies if: ${{ (runner.os != 'Windows') }} run: | - pip install --upgrade pip - pip install -r requirements-dev.txt + activate + uv pip install -r requirements-dev.txt - name: Install dependencies (Windows) if: ${{ (runner.os == 'Windows') }} run: | .\venv\Scripts\activate - python -m pip install --upgrade pip - python -m pip install -r requirements-dev.txt + uv pip install -r requirements-dev.txt - name: Override pyarrow if: ${{ (matrix.pyarrow-version) && (runner.os != 'Windows') }} - run: pip install pyarrow==${{ matrix.pyarrow-version }} + run: uv pip install pyarrow==${{ matrix.pyarrow-version }} - name: Override deltalake for pyarrow if: ${{ (matrix.pyarrow-version == '7.0.0') }} - run: pip install deltalake==0.10.0 + run: uv pip install deltalake==0.10.0 - name: Build library and Test with pytest (unix) if: ${{ (runner.os != 'Windows') }} @@ -238,14 +239,16 @@ jobs: pattern: wheels-* merge-multiple: true path: dist + - name: Setup Virtual Env run: | python -m venv venv echo "$GITHUB_WORKSPACE/venv/bin" >> $GITHUB_PATH + pip install uv + - name: Install Daft and dev dependencies run: | - pip install --upgrade pip - pip install -r requirements-dev.txt dist/${{ env.package-name }}-*x86_64*.whl --force-reinstall + uv pip install -r requirements-dev.txt dist/${{ env.package-name }}-*x86_64*.whl --force-reinstall rm -rf daft - uses: actions/cache@v4 env: @@ -316,10 +319,10 @@ jobs: run: | python -m venv venv echo "$GITHUB_WORKSPACE/venv/bin" >> $GITHUB_PATH + pip install uv - name: Install Daft and dev dependencies run: | - pip install --upgrade pip - pip install -r requirements-dev.txt dist/${{ env.package-name }}-*x86_64*.whl --force-reinstall + uv pip install -r requirements-dev.txt dist/${{ env.package-name }}-*x86_64*.whl --force-reinstall rm -rf daft - name: Prepare tmpdirs for IO services run: | @@ -399,10 +402,10 @@ jobs: run: | python -m venv venv echo "$GITHUB_WORKSPACE/venv/bin" >> $GITHUB_PATH + pip install uv - name: Install Daft and dev dependencies run: | - pip install --upgrade pip - pip install -r requirements-dev.txt dist/${{ env.package-name }}-*x86_64*.whl --force-reinstall + uv pip install -r requirements-dev.txt dist/${{ env.package-name }}-*x86_64*.whl --force-reinstall rm -rf daft - name: Prepare tmpdirs for IO services run: | @@ -488,10 +491,10 @@ jobs: run: | python -m venv venv echo "$GITHUB_WORKSPACE/venv/bin" >> $GITHUB_PATH + pip install uv - name: Install Daft and dev dependencies run: | - pip install --upgrade pip - pip install -r requirements-dev.txt dist/${{ env.package-name }}-*x86_64*.whl --force-reinstall + uv pip install -r requirements-dev.txt dist/${{ env.package-name }}-*x86_64*.whl --force-reinstall rm -rf daft - uses: docker/setup-buildx-action@v3 - uses: docker/build-push-action@v5 @@ -566,10 +569,10 @@ jobs: run: | python -m venv venv echo "$GITHUB_WORKSPACE/venv/bin" >> $GITHUB_PATH + pip install uv - name: Install Daft and dev dependencies run: | - pip install --upgrade pip - pip install -r requirements-dev.txt dist/${{ env.package-name }}-*x86_64*.whl --force-reinstall + uv pip install -r requirements-dev.txt dist/${{ env.package-name }}-*x86_64*.whl --force-reinstall rm -rf daft - name: Spin up services run: | @@ -642,10 +645,10 @@ jobs: run: | python -m venv venv echo "$GITHUB_WORKSPACE/venv/bin" >> $GITHUB_PATH + pip install uv - name: Install dependencies run: | - pip install --upgrade pip - pip install -r requirements-dev.txt + uv pip install -r requirements-dev.txt - name: Build Rust Library run: | source activate @@ -782,10 +785,10 @@ jobs: run: | python -m venv venv echo "$GITHUB_WORKSPACE/venv/bin" >> $GITHUB_PATH + pip install uv - name: Install dependencies run: | - pip install --upgrade pip - pip install -r requirements-dev.txt + uv pip install -r requirements-dev.txt - name: Run doctests run: | source activate @@ -940,8 +943,8 @@ jobs: - name: Install pre-commit run: | - pip install --upgrade pip - pip install pre-commit + pip install uv + uv pip install pre-commit - uses: moonrepo/setup-rust@v1 with: cache: false diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index dda193f4f6..7493109dfe 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -18,6 +18,7 @@ env: PACKAGE_NAME: getdaft PYTHON_VERSION: 3.11 DAFT_ANALYTICS_ENABLED: '0' + UV_SYSTEM_PYTHON: 1 IS_PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && ( ! endsWith(github.ref, 'dev0')) }} IS_SCHEDULE_DISPATCH: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} @@ -45,7 +46,8 @@ jobs: with: python-version: ${{ env.PYTHON_VERSION }} architecture: x64 - - run: pip install -U twine toml + - run: pip install uv + - run: uv pip install twine toml - run: python tools/patch_package_version.py - name: Build wheels - Mac and Windows x86 if: ${{ ((matrix.os == 'macos') || (matrix.os == 'windows')) && (matrix.compile_arch == 'x86_64') }} @@ -90,7 +92,7 @@ jobs: - name: Install and test built wheel - Linux and Mac x86_64 if: ${{ (matrix.os == 'ubuntu') && (matrix.compile_arch == 'x86_64') }} run: | - pip install -r requirements-dev.txt dist/${{ env.PACKAGE_NAME }}-*x86_64*.whl --force-reinstall + uv pip install -r requirements-dev.txt dist/${{ env.PACKAGE_NAME }}-*x86_64*.whl --force-reinstall rm -rf daft pytest -v # Disable until we figure out why are we getting FileNotFoundError: [WinError 3] Failed to open local file diff --git a/.github/workflows/ray-compatibility.yml b/.github/workflows/ray-compatibility.yml index 623e627cf3..a79c9bad3a 100644 --- a/.github/workflows/ray-compatibility.yml +++ b/.github/workflows/ray-compatibility.yml @@ -9,6 +9,7 @@ on: env: DAFT_ANALYTICS_ENABLED: '0' + UV_SYSTEM_PYTHON: 1 jobs: build: @@ -40,21 +41,20 @@ jobs: python -m venv venv echo "$GITHUB_WORKSPACE/venv/bin" >> $GITHUB_PATH - - name: Upgrade Pip - run: pip install --upgrade pip + - name: Install uv + run: pip install uv - name: Install to pin Ray versions - run: pip install ray[data,default]==${{ matrix.ray-version }} + run: uv pip install ray[data,default]==${{ matrix.ray-version }} # Ray requires a pinned protobuf<4.0 for versions of Ray <1.13 (see: https://github.com/ray-project/ray/pull/25211) - name: Install to pin Protobuf version (for Ray <1.13) if: ${{ matrix.ray-version == '1.12.0' || matrix.ray-version == '1.11.0' || matrix.ray-version == '1.10.0' }} - run: pip install protobuf==3.20.3 + run: uv pip install protobuf==3.20.3 - name: Install dependencies run: | - pip install --upgrade pip - pip install -r requirements-dev.txt + uv pip install -r requirements-dev.txt - name: Build Rust Library run: |