Skip to content

[tooling] Migrate to uv#279

Merged
jovnc merged 4 commits intogit-mastery:mainfrom
jovnc:chore/uv
Mar 31, 2026
Merged

[tooling] Migrate to uv#279
jovnc merged 4 commits intogit-mastery:mainfrom
jovnc:chore/uv

Conversation

@jovnc
Copy link
Copy Markdown
Collaborator

@jovnc jovnc commented Mar 31, 2026

Exercise Review

Exercise Discussion

Fixes #278

Checklist

  • If you require a new remote repository on the Git-Mastery organization, have you created a request for it?
  • Have you written unit tests using repo-smith to validate the exercise grading scheme?
  • Have you tested your changes using the instructions posted?
  • Have you verified that this exercise does not already exist or is not currently in review?
  • Did you introduce a new grading mechanism that should belong to git-autograder?
  • Did you introduce a new dependency that should belong to app?

@jovnc jovnc requested a review from Copilot March 31, 2026 13:02
@github-actions
Copy link
Copy Markdown

Hi @jovnc, thank you for your contribution! 🎉

This PR comes from your fork jovnc/exercises on branch chore/uv.

Before you request for a review, please ensure that you have tested your changes locally!

Important

The previously recommended way of using ./test-download.py is no longer the best way to test your changes locally.

Please read the following instructions for the latest instructions.

Prerequisites

Ensure that you have the gitmastery app installed locally (instructions)

Testing steps

If you already have a local Git-Mastery root to test, you can skip the following step.

Create a Git-Mastery root locally:

gitmastery setup

Navigate into the Git-Mastery root (defaults to gitmastery-exercises/):

cd gitmastery-exercises/

Edit the .gitmastery.json configuration file. You need to set the following values under the exercises_source key.

{
    # other fields...
    "exercises_source": {
        "username": "jovnc",
        "repository": "exercises",
        "branch": "chore/uv"
    }
}

Then, you can use the gitmastery app to download and verify your changes locally.

gitmastery download <your new change>
gitmastery verify

Checklist

  • (For exercises and hands-ons) I have verified that the downloading behavior works
  • (For exercises only) I have verified that the verification behavior is accurate

Important

To any reviewers of this pull request, please use the same instructions above to test the changes.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates the repository’s Python tooling from venv/pip + requirements.txt to uv using a pyproject.toml-based dependency definition and a committed uv.lock, and updates local scripts and GitHub Actions workflows to run via uv.

Changes:

  • Add pyproject.toml and commit uv.lock; remove requirements.txt.
  • Update local helper scripts (setup.sh, test.sh, test-download.sh, new.sh) and lefthook.yml commands to use uv run / uv sync.
  • Update GitHub Actions workflows to install uv and run scripts/tests/formatting through it.

Reviewed changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
uv.lock Adds the uv lockfile to pin dependency resolution.
pyproject.toml Defines project metadata, Python requirement, and dependency groups for uv.
requirements.txt Removed in favor of pyproject.toml + uv.lock.
setup.sh Switches environment setup to uv sync and installs lefthook via uv run.
test.sh Runs pytest via uv run.
test-download.sh Runs the test-download script via uv run python.
new.sh Runs generator scripts via uv run python.
lefthook.yml Executes ruff/mypy via uv run in git hooks.
.github/workflows/ci.yml Migrates CI jobs (tests, mypy, formatting) to uv.
.github/workflows/publish.yml Migrates the publish workflow to uv and updates checkout action version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test-download.sh Outdated
Comment thread .github/workflows/publish.yml
Comment thread .github/workflows/ci.yml
Comment thread setup.sh
Copy link
Copy Markdown
Contributor

@jiaxinnns jiaxinnns left a comment

Choose a reason for hiding this comment

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

CONTRIBUTING.md setup instructions still mention requirements.txt which has been removed in this PR, it should be updated

@jovnc jovnc merged commit ff8ec6d into git-mastery:main Mar 31, 2026
4 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.

Migrate to uv

3 participants