Skip to content

feat: switch pruna from poetry to uv#164

Merged
johnrachwan123 merged 24 commits intomainfrom
feat/switch-pruna-from-poetry-to-uv
Jun 23, 2025
Merged

feat: switch pruna from poetry to uv#164
johnrachwan123 merged 24 commits intomainfrom
feat/switch-pruna-from-poetry-to-uv

Conversation

@johnrachwan123
Copy link
Copy Markdown
Member

@johnrachwan123 johnrachwan123 commented May 30, 2025

Description

Related Issue

Fixes #30

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Additional Notes

Comment thread pyproject.toml Outdated
@GreatBahram
Copy link
Copy Markdown
Contributor

Hello there! 👋

I can’t directly push to this PR. You can find the related PR here, and then we can merge them together.

@davidberenstein1957
Copy link
Copy Markdown
Member

Comment thread .github/workflows/package_build.yaml
@johnrachwan123 johnrachwan123 force-pushed the feat/switch-pruna-from-poetry-to-uv branch from a0de480 to e2eeecb Compare June 10, 2025 13:24
@johnrachwan123
Copy link
Copy Markdown
Member Author

@johnrachwan123 don't forget to update the development docs. https://docs.pruna.ai/en/stable/docs_pruna/contributions/how_to_contribute.html

Done :) Thanks for the reminder!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, considering the long-term changes; what if we just link to the uv installation page

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree this would be better. I think we can just add this to the uv section above as well.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good like this ?

Copy link
Copy Markdown
Contributor

@GreatBahram GreatBahram Jun 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things:

  • I wonder if it makes sense to merge tests and dev into each other? I don't see that much benefit having them separate 🤷
  • It would be nice to use: uv sync --frozen

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey we have an internal project to address these points in a later PR!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, I can also give a hand after merging this

Comment thread .github/workflows/linting.yaml Outdated
Comment thread .github/workflows/installation.yaml Outdated
Comment thread .github/workflows/documentation.yaml Outdated
Comment thread .github/workflows/linting.yaml Outdated
Comment thread .github/workflows/linting.yaml Outdated
Comment thread .github/workflows/package_build.yaml Outdated
Comment thread docs/contributions/how_to_contribute.rst Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree this would be better. I think we can just add this to the uv section above as well.

Comment thread docs/contributions/how_to_contribute.rst Outdated
Comment thread .github/workflows/cpu_tests.yaml Outdated
Comment thread .github/workflows/documentation.yaml Outdated
Comment thread .github/workflows/installation.yaml Outdated
Comment thread .github/workflows/linting.yaml Outdated
Comment thread pyproject.toml Outdated
johnrachwan123 and others added 10 commits June 18, 2025 09:28
* feat: attempt to swtich pruna from poetry to uv

* fix: uv installation

* refactor: remove requirements.txt

* format the pyproject.toml properly + point to the license file

* change linting file to use uv

* use latest version of checkout

* use latest version of setup-python

* change documentation file to use uv

* use latest version of setup-python

* change external_tests file to use uv

* change internal_tests file to use uv + prefix previous command to use uv

* change installation file to use uv

* change package_buil;d file to use uv + add retention policy there

* tests: update package build to uv

* remove poetry from gitignore

* format the pyproject.toml properly + point to the license file

* change package_buil;d file to use uv + add retention policy there

* reduce the diff

* add alaki file (random file); hopefully to triggers most of the workflows

* Delete src/pruna/alaki.py

* build: bump actions/setup-python from 3 to 5 (#193)

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v3...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build: bump abatilo/actions-poetry from 2 to 4 (#195)

Bumps [abatilo/actions-poetry](https://github.com/abatilo/actions-poetry) from 2 to 4.
- [Release notes](https://github.com/abatilo/actions-poetry/releases)
- [Changelog](https://github.com/abatilo/actions-poetry/blob/master/.releaserc)
- [Commits](abatilo/actions-poetry@v2...v4)

---
updated-dependencies:
- dependency-name: abatilo/actions-poetry
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build: bump actions/cache from 3 to 4 (#196)

Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](actions/cache@v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build: bump actions/checkout from 3 to 4 (#194)

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update pyproject.toml

* build: update ctranslate2 requirement from ==4.5.0 to ==4.6.0 (#199)

Updates the requirements on [ctranslate2](https://github.com/OpenNMT/CTranslate2) to permit the latest version.
- [Release notes](https://github.com/OpenNMT/CTranslate2/releases)
- [Changelog](https://github.com/OpenNMT/CTranslate2/blob/master/CHANGELOG.md)
- [Commits](OpenNMT/CTranslate2@v4.5.0...v4.6.0)

---
updated-dependencies:
- dependency-name: ctranslate2
  dependency-version: 4.6.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* this is gone on main

* enable caching in order to expedite the installtion time

* just a test

* Remove commented-out step for deleting .so files from linting workflow

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: johnrachwan123 <johnrachwan@gmail.com>
Co-authored-by: David Berenstein <david.m.berenstein@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@johnrachwan123 johnrachwan123 force-pushed the feat/switch-pruna-from-poetry-to-uv branch from 52c2294 to 6bb200a Compare June 18, 2025 09:28
Comment on lines -45 to +39
run: pip install -e .
run: |
uv venv
uv pip install -e .
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either this or you can also say activate-environment: true in with block of the install uv step; I wanted to do this later after you merge this PR, to create a common github action file and put the whole installation logic with activate-environment: true there which means we don't need to prefix every command with uv

@GreatBahram
Copy link
Copy Markdown
Contributor

🔥

@johnrachwan123 johnrachwan123 merged commit 5884f68 into main Jun 23, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Experiment with using uv as the package manager

4 participants