-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/use uv python management #994
Merged
timsaucer
merged 36 commits into
apache:main
from
timsaucer:feat/use-uv-python-management
Jan 19, 2025
Merged
Changes from 35 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
0ed4862
Remove requirements files and add dependencies into pyproject.toml in…
timsaucer 88aff7e
Remove old conda files since we will use uv as our primary method for…
timsaucer 32604e3
Working through CI changes to use uv instead of pip and conda
timsaucer 21ac4a8
Add uv lock to exclude files
timsaucer 2857364
Revert "Remove old conda files since we will use uv as our primary me…
timsaucer 5c33fb2
Windows workflows don't use source command
timsaucer 892d305
Add in extra include for ignoreing rat
timsaucer 56c7e93
Use uv commands in CI
timsaucer 8054104
Remove conda recipes and CI stages
timsaucer 4ee66ac
Working on CI using uv
timsaucer 774510b
Install doc requirements
timsaucer f0b2234
Remove caching uv
timsaucer 9196f59
Set uv venv
timsaucer 5ae5d6e
Add requirements for building
timsaucer 442d83b
Revert github action to allowed one
timsaucer da3a519
Call uv sync with verbose mode so users can see the build occuring in CI
timsaucer e2bf5d9
Test setting specific hash on action
timsaucer d6b8b41
Test setting rust-toolchain github action with pinned version
timsaucer d94d703
Testing night rust toolchain against apache rejection criteria
timsaucer 338794f
Github action is fickle with the pattern matching
timsaucer 4cfa108
Switch all Ci to use nightly rust toolchain until infra team whitelis…
timsaucer f547fe2
Speed up CI by preventing build during uv sync
timsaucer 1f35a56
Additional uv commands missing no-project option
timsaucer 6179d9b
Setting python versions of dependencies to match lowest supported pyt…
timsaucer e27831d
Update maturin and move to deps for dev
timsaucer d299124
CI ordering was wrong and maturin needed uv option
timsaucer 49be265
Switch to stable toolchain
timsaucer 5307acf
uv requires two dashes
timsaucer 7c61b04
Submodule init
timsaucer a33d110
change directories for unit tests
timsaucer eeb88bd
Add deps for build
timsaucer 29437b3
Maturin build doesn't take uv as parameter
timsaucer 6491bdf
Update documentation for setting up with uv
timsaucer 9c0c8dc
Enable cache in CI
timsaucer 755a8f5
Update documentation to use uv
timsaucer 48890c3
Small adjustment to CI config
timsaucer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,28 +31,31 @@ jobs: | |
- name: Install Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
python-version: "3.12" | ||
|
||
- uses: astral-sh/setup-uv@v5 | ||
with: | ||
enable-cache: true | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install ruff | ||
run: uv sync --dev --no-install-package datafusion | ||
|
||
# Update output format to enable automatic inline annotations. | ||
- name: Run Ruff | ||
run: | | ||
timsaucer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
ruff check --output-format=github python/ | ||
ruff format --check python/ | ||
uv run --no-project ruff check --output-format=github python/ | ||
uv run --no-project ruff format --check python/ | ||
|
||
generate-license: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
- uses: astral-sh/setup-uv@v5 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
enable-cache: true | ||
|
||
- name: Generate license file | ||
run: python ./dev/create_license.py | ||
run: uv run --no-project python ./dev/create_license.py | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: python-wheel-license | ||
|
@@ -74,15 +77,7 @@ jobs: | |
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
|
||
- name: Upgrade pip | ||
run: python -m pip install --upgrade pip | ||
|
||
- name: Install maturin | ||
run: pip install maturin==1.5.1 | ||
- uses: dtolnay/rust-toolchain@stable | ||
|
||
- run: rm LICENSE.txt | ||
- name: Download LICENSE.txt | ||
|
@@ -97,8 +92,15 @@ jobs: | |
version: "27.4" | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install dependencies and build | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This isn't installing dependencies in this step. |
||
uses: astral-sh/setup-uv@v5 | ||
with: | ||
enable-cache: true | ||
|
||
- name: Build Python package | ||
run: maturin build --release --strip --features substrait | ||
run: | | ||
uv sync --dev --no-install-package datafusion | ||
uv run --no-project maturin build --release --strip --features substrait | ||
|
||
- name: List Windows wheels | ||
if: matrix.os == 'windows-latest' | ||
|
@@ -132,15 +134,7 @@ jobs: | |
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
|
||
- name: Upgrade pip | ||
run: python -m pip install --upgrade pip | ||
|
||
- name: Install maturin | ||
run: pip install maturin==1.5.1 | ||
- uses: dtolnay/rust-toolchain@stable | ||
|
||
- run: rm LICENSE.txt | ||
- name: Download LICENSE.txt | ||
|
@@ -155,9 +149,15 @@ jobs: | |
version: "27.4" | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install dependencies and build | ||
uses: astral-sh/setup-uv@v5 | ||
with: | ||
enable-cache: true | ||
|
||
- name: Build Python package | ||
run: | | ||
maturin build --release --strip --features substrait | ||
uv sync --dev --no-install-package datafusion | ||
uv run --no-project maturin build --release --strip --features substrait | ||
|
||
- name: List Mac wheels | ||
run: find target/wheels/ | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: maybe just add a comment here saying that
--no-install-dependencies
is to only install the dependencies but not build the rust library