-
Notifications
You must be signed in to change notification settings - Fork 2
Migrate dependency management from Poetry to uv #68
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
93cab14
Initial plan
Copilot ef5e263
Migrate from Poetry to uv: Convert pyproject.toml to PEP 621 format a…
Copilot 8b741f5
Co-authored-by: mihow <158175+mihow@users.noreply.github.com>
Copilot 76e46e3
Add GitHub Actions CI workflow for uv-based testing
Copilot f43ff1c
Update Python requirement to >=3.10, simplify CI to test only Python …
Copilot a170044
fix: address PR review feedback on uv migration
mihow 0bf63ff
ci: split lint and test jobs, enable uv caching
mihow 9c79d3c
chore: remove remaining Poetry references after uv migration
mihow 05421d0
fix(ci): make the lint job resolve the PR diff reliably
mihow ccf2d03
fix: declare AGPL-3.0 license to match repository LICENSE
mihow 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| pull_request: | ||
| branches: [ main ] | ||
|
|
||
| jobs: | ||
| # Lint only the files changed in the PR rather than the whole tree: the repo | ||
| # predates this CI and still carries flake8 debt in older modules, so | ||
| # `--all-files` would fail on unrelated code. This runs on pull requests only, | ||
| # where the diff against the base branch is well defined. pre-commit runs each | ||
| # hook in its own isolated env, so this does not install the heavy project | ||
| # dependencies (torch, etc.). | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
| if: github.event_name == 'pull_request' | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v5 | ||
| with: | ||
| python-version: "3.12" | ||
| enable-cache: true | ||
|
|
||
| - name: Cache pre-commit hooks | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cache/pre-commit | ||
| key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} | ||
|
|
||
| - name: Run pre-commit on changed files | ||
| run: | | ||
| git fetch --no-tags origin "$GITHUB_BASE_REF" | ||
| uvx pre-commit run \ | ||
| --from-ref "origin/$GITHUB_BASE_REF" --to-ref HEAD \ | ||
| --show-diff-on-failure | ||
|
|
||
| test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v5 | ||
| with: | ||
| python-version: "3.12" | ||
| enable-cache: true | ||
|
|
||
| - name: Install dependencies | ||
| run: uv sync --frozen --extra dev --extra research | ||
|
|
||
| - name: Test CLI commands | ||
| run: | | ||
| uv run ami-dataset --help | ||
| uv run ami-classification --help | ||
|
|
||
| - name: Run test suite | ||
| run: uv run pytest tests/ -v | ||
|
|
||
| - name: Verify imports | ||
| run: | | ||
| uv run python -c "import torch; import numpy; import pandas; print('Core dependencies imported successfully')" | ||
|
|
||
| - name: Verify optional dependencies (research) | ||
| run: | | ||
| uv run python -c "import awscli; import absl; print('Research dependencies imported successfully')" |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 3.12 |
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -3,5 +3,5 @@ channels: | |
| - conda-forge | ||
| - defaults | ||
| dependencies: | ||
| - python=3.11 | ||
| - poetry | ||
| - python=3.12 | ||
| - uv | ||
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.
Uh oh!
There was an error while loading. Please reload this page.