snakebids icon indicating copy to clipboard operation
snakebids copied to clipboard

add uv package manager option

Open Dhananjhay opened this issue 8 months ago • 1 comments

Proposed changes

This PR adds support for the uv package manager as an option when creating a Snakebids app using the snakebids create command, alongside existing options like poetry and hatch.

Key changes include:

  • Conditional logic in the Jinja template files to configure the pyproject.toml and install instructions for uv
  • Adjustments in the docs and templates to ensure compatibility and clarity
  • Logic alignment with hatch for backend config (i.e., uses hatchling as the build backend for uv)
  • Updated CLI validation logic to recognize uv as a valid option

This resolves support request/feature expansion for modern Python packaging tools and enables compatibility with uv, a fast Python package manager gaining popularity in the community.

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you are unsure about any of the choices, don't hesitate to ask!

  • [x] Changes have been tested to ensure that fix is effective or that a feature works.
  • [ ] Changes pass the unit tests
  • [x] I have included necessary documentation or comments (as necessary)
  • [x] Any dependent changes have been merged and published

Notes

All PRs will undergo the unit testing before being reviewed. You may be requested to explain or make additional changes before the PR is accepted.

Dhananjhay avatar Apr 21 '25 15:04 Dhananjhay

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.37%. Comparing base (303bd31) to head (6caa120).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #468   +/-   ##
=======================================
  Coverage   94.37%   94.37%           
=======================================
  Files          55       55           
  Lines        2223     2223           
=======================================
  Hits         2098     2098           
  Misses        125      125           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Apr 21 '25 15:04 codecov[bot]

@Dhananjhay, are you able to finish this? test_template_dry_runs_successfully will need uv added as a test case. This will require updating the test-template container. You should be able to update the Dockerfile to install uv directly, then use uv to add all the installed tools instead of pipx.

pvandyken avatar Nov 13 '25 23:11 pvandyken

Sounds good! Seems like this branch is out of date as well, will do a quick rebase and make the required changes. Thanks for the feedback!

Dhananjhay avatar Nov 14 '25 13:11 Dhananjhay

Looks like rebase didn't work as planned and this PR now seems to be corrupted with a lot of previous commits, therefore, I've opened a new PR with cleaner changes to look at (PR #481).

Dhananjhay avatar Nov 14 '25 16:11 Dhananjhay