This repository was archived by the owner on Apr 16, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Migrate from poetry to uv #3
Open
hacktobeer
wants to merge
3
commits into
main
Choose a base branch
from
update--maintenance-scripts
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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,28 @@ | ||
| name: Python Tests | ||
|
|
||
| on: [push, pull_request] | ||
|
|
||
| jobs: | ||
| build: | ||
|
|
||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.12"] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v6 | ||
| - name: "Set up Python" | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version-file: ".python-version" | ||
| - name: Install test dependencies | ||
| run: uv sync --group test | ||
| - name: Test with pytest - ${{ matrix.python-version }} | ||
| run: uv run pytest -s --cov=. --cov-branch --cov-report=xml -v | ||
| # Please uncomment this if your organization uses Codecov test coverage! | ||
| # - name: Upload coverage reports to Codecov | ||
| # uses: codecov/codecov-action@v5 | ||
| # with: | ||
| # token: ${{ secrets.CODECOV_TOKEN }} | ||
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,35 @@ | ||
| name: update-uv | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| lock: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: astral-sh/setup-uv@v7 | ||
|
|
||
| - run: | | ||
| echo "\`\`\`" > uv_output.md | ||
| uv lock --upgrade 2>&1 | tee -a uv_output.md | ||
| echo "\`\`\`" >> uv_output.md | ||
|
|
||
| - name: Create pull request | ||
| uses: peter-evans/create-pull-request@v7 | ||
| with: | ||
| committer: hacktobeer <ramsesdebeer@gmail.com> | ||
|
Contributor
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. Could that be ```
Contributor
Author
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. That gives issues with the Google CLA github agreement thing. |
||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| commit-message: Update uv lockfile | ||
| title: Update uv lockfile | ||
| body-path: uv_output.md | ||
| branch: update-uv | ||
| base: main | ||
| labels: install | ||
| delete-branch: true | ||
| add-paths: uv.lock | ||
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 was deleted.
Oops, something went wrong.
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 |
|---|---|---|
| @@ -1,23 +1,29 @@ | ||
| [tool.poetry] | ||
| [project] | ||
| name = "openrelik-worker-exif" | ||
| version = "0.1.0" | ||
| description = "This worker should extract exif information from files" | ||
| authors = ["Alexander Jaeger <mail@alexanderjaeger.de>"] | ||
| authors = [{ name = "Alexander Jaeger", email = "mail@alexanderjaeger.de" }] | ||
| requires-python = ">=3.10,<4" | ||
| readme = "README.md" | ||
| package-mode = false | ||
|
|
||
| [tool.poetry.dependencies] | ||
| python = "^3.10" | ||
| celery = { extras = ["redis"], version = "^5.4.0" } | ||
| openrelik-worker-common = "^0.10.0" | ||
| dependencies = [ | ||
| "celery[redis]>=5.4.0,<6", | ||
| "openrelik-worker-common>=0.10.0,<1.0.0", | ||
| ] | ||
|
|
||
| [tool.poetry.group.test.dependencies] | ||
| pytest = "*" | ||
| pytest-cov = "^5.0.0" | ||
| pytest-mock = "^3.14.0" | ||
| Pillow = "^10.0.0" # For image creation | ||
| piexif = "^1.1.3" # For EXIF manipulation | ||
| [dependency-groups] | ||
| test = [ | ||
| "pytest", | ||
| "pytest-cov>=5.0.0,<6", | ||
| "pytest-mock>=3.14.0,<4", | ||
| "Pillow>=10.0.0,<11", | ||
| "piexif>=1.1.3,<2", | ||
| ] | ||
|
|
||
| [tool.uv] | ||
| package = false | ||
| default-groups = ["test"] | ||
|
|
||
| [build-system] | ||
| requires = ["poetry-core"] | ||
| build-backend = "poetry.core.masonry.api" | ||
| requires = ["uv_build>=0.9.0,<0.10.0"] | ||
| build-backend = "uv_build" |
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.
should this be reomved or do you plan to un comment that in the near future?
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.
We enable it for repositories bit-by-bit so keeping it commented here makes sense for now.