Skip to content
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

Switch tooling to uv, ruff, and just #12

Merged
merged 8 commits into from
Dec 20, 2024
Merged

Conversation

bbrown1867
Copy link
Collaborator

@bbrown1867 bbrown1867 commented Dec 20, 2024

Please explain the changes you made here.

This PR updates the repo to use uv for Python tooling, instead of setuptools. It also uses just to automate some commands. Benefits:

  • The complexity of managing the venv in the Makefile goes away, since uv handles all of this for us.
  • setup.py can be consolidated with pyproject.toml.
  • CI pipeline is simpler with astral-sh/setup-uv@v3 and uv run -p for multi-Python version testing.
  • Lock file ensures the same packages are always used, so dev dependencies can be loosened in pyproject.toml.

Does this close any currently open issues?

No.

Checklist:

@bbrown1867 bbrown1867 self-assigned this Dec 20, 2024
@bbrown1867 bbrown1867 marked this pull request as ready for review December 20, 2024 00:36
@bbrown1867 bbrown1867 requested a review from mdmedley as a code owner December 20, 2024 00:36
Copy link
Collaborator

@notenti notenti left a comment

Choose a reason for hiding this comment

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

🚀

Comment on lines 19 to 24
- run: uv run -p ${{ matrix.python-version}} black pyfu_usb/ tests/
- run: uv run -p ${{ matrix.python-version}} mypy pyfu_usb/ tests/
- run: uv run -p ${{ matrix.python-version}} pylint pyfu_usb/ tests/
- run: uv run -p ${{ matrix.python-version}} isort pyfu_usb/ tests/
- run: uv run -p ${{ matrix.python-version}} pytest tests/
- run: uv build -p ${{ matrix.python-version }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit/suggestion: probably can use ruff instead of isort and black, too

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good call, probably can replace pylint as well. Will make that change.

Copy link
Collaborator

@mdmedley mdmedley left a comment

Choose a reason for hiding this comment

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

LGTM

…ersion, since there are source code changes. This will also allow us to test the changes to the publish pipeline.
@bbrown1867 bbrown1867 changed the title Switch tooling to uv and just Switch tooling to uv, ruff, and just Dec 20, 2024
@bbrown1867 bbrown1867 merged commit b1dc0ac into master Dec 20, 2024
8 checks passed
@bbrown1867 bbrown1867 deleted the bbrown1867/switch-to-uv branch December 20, 2024 20:44
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.

3 participants