-
Notifications
You must be signed in to change notification settings - Fork 7
Use uv as the unified project manager
#38
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
Conversation
|
I think the workflow should also be changed to use uv, now it's still using poetry: infrastructure-asfquart/.github/workflows/unit-tests.yml Lines 55 to 57 in 951e30c
|
Seems the entire workflow using |
| fetch-depth: 0 # need all versions to be able to access server tree commit logs | ||
| persist-credentials: false | ||
| - name: Install uv and set the Python version | ||
| uses: astral-sh/setup-uv@v7 |
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.
Would you mind reviewing this change where I use the uv official actions to set up Python and uv itself.
Ref: https://docs.astral.sh/uv/guides/integration/github/
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.
If we want to keep the original caching behavior, we could try https://github.com/astral-sh/setup-uv/blob/main/docs/caching.md. But if the CI isn't run as often, I think we're good to keep it as is.
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| enable-cache: true # enable built-in caching of uv | ||
| - uses: awalsh128/cache-apt-pkgs-action@5902b33ae29014e6ca012c5d8025d4346556bd40 # latest |
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.
I think this is not poetry related so I kept it.
| fetch-depth: 0 # need all versions to be able to access server tree commit logs | ||
| persist-credentials: false | ||
| - name: Install uv and set the Python version | ||
| uses: astral-sh/setup-uv@v7 |
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.
If we want to keep the original caching behavior, we could try https://github.com/astral-sh/setup-uv/blob/main/docs/caching.md. But if the CI isn't run as often, I think we're good to keep it as is.
README.md
Outdated
|
|
||
| ```shell | ||
| poetry run pytest | ||
| uv sync --group test |
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.
| uv sync --group test | |
| uv sync --extra aioldap --group test |
if the test also cover the extra, this would be needed. If not, we should be good.
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.
Done.
I guess the test should cover all extras including the further extras. Furthermore, since I install all extras during the Action, I think it would be better to maintain consistency in the README.
- name: Install dependencies
run: uv sync --locked --all-extras --group test|
@gstein it seems we need a member with write permission on this repo to trigger the CI workflow. @orcahmlee or else, you can open a PR to your fork with your fork updated to the latest main. Then you can verify the CI workflow on your repo PR as well. |
Signed-off-by: Andrew Li <[email protected]>
I've rebased the latest upstream/main then created a PR on my own repo. Perhaps I miss something setting for GitHub Actions, I didn't see the CI workflow. |
Manually trigger the CI workflow on my repo. Seems only the test failed in Python 3.14 |
What should I do next? Should I remove the unit test in Python 3.14? |
Yes, you can and leave it as a follow up. IIRC Python 3.14 is not included in the test matrix now. I'll try to give it a review tomorrow and hopefully @gstein would have a look also. |
Signed-off-by: Andrew Li <[email protected]>
Signed-off-by: Andrew Li <[email protected]>
tisonkun
left a comment
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.
Generally looks good. I think we have two remaining tasks before this patch gets mergeable:
- The Makefile needs to be updated to avoid poetry deps.
- I'd prefer a RELEASE.md file to describe how to release asfquart with
uvsetup so that we can immediately follow up use a 0.1.14 release to verify it. Or you may describe it in this PR first.
Signed-off-by: Andrew Li <[email protected]>
If I have misunderstood, could you give some examples? |
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.
LGTM.
About RELEASE.md, I suppose @gstein or an INFRA member can try your commands out and once it's verified, we can provide a proper RELEASE.md following any convenient pattern.
|
Thanks for the PR. Very helpful! |
|
@orcahmlee Thanks for your contribution and continued follow-up! If you have some spare time and are interested in how ASF organized its "internal" services, you may take a look at Apache STeVe that runs most foundation-wide votings in the ASF. (We'll use it to run the vote in the upcoming membership meetings.) Besides, you may also dig into why Python 3.14 failed the CI to add its support. Take these suggestions as advice rather than requests - Just enjoy hacking in the community. |
Related to #37, this PR had two changes:
pyproject.tomlwas updated to useuv. All of the settings were migrated frompoetry.uvcommand for installing and building, and also retained thepipcommand.Here are some manual validations I did:
uv venvand installed the dependencies usinguv pip install -e .,uv pip install -e ".[aioldap]"anduv pip install -e ".[test]"uv builduv run pytest