Skip to content
This repository was archived by the owner on Jul 9, 2026. It is now read-only.

Migrate to uv, setuptools-scm, prek, ruff plus some pre-commit add-ons - #13

Merged
rtibbles merged 3 commits into
mainfrom
uv-migration
Jun 11, 2026
Merged

rtibbles merged 3 commits into
mainfrom
uv-migration

Conversation

@bjester

@bjester bjester commented Jun 11, 2026

Copy link
Copy Markdown
Member

Summary

  • Migrates the python package to use a pyproject.toml and uv.lock for tracking python deps
  • Replaces pre-commit with prek, and black+flake8 with ruff
  • Adds pre-commit yaml formatter
  • Adds pre-commit check for uv.lock
  • Adds pre-commit check for linting GH actions
  • Applies minor formatting updates to python files due to tooling changes

AI usage

AI was instructed to perform this migration. Human followed up making sure CI action versions were up-to-date, and added more pre-commit rules. Verified tests pass and build process works locally.

@rtibbles rtibbles left a comment

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.

Changes make sense, diff looks minimal - just the required ruff reformatting.

@rtibbles
rtibbles merged commit b5dd937 into main Jun 11, 2026
8 checks passed

@rtibblesbot rtibblesbot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Clean tooling migration — straightforward switch from pip/pre-commit/black+flake8 to uv/prek/ruff with no functional changes to the plugin itself.

CI passing. No UI files changed — visual inspection skipped.

  • praise: fetch-depth: 0 correctly included on all checkout steps — setuptools-scm needs the full tag history to compute the version; without it CI would fall back to 0.0.0 on every build.
  • nitpick: Classifiers list only Python 3.9 but requires-python = ">=3.9, <3.15" covers up to 3.15. Worth expanding the classifier list as newer Python versions are validated.

@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly

How was this generated?

Reviewed the pull request diff checking for:

  • Correctness: bugs, edge cases, undocumented behavior, resource leaks, hardcoded values
  • Design: unnecessary complexity, naming, readability, comment accuracy, redundant state
  • Architecture: duplicated concerns, minimal interfaces, composition over inheritance
  • Testing: behavior-based assertions, mocks only at hard boundaries, accurate coverage
  • Completeness: missing dependencies, unupdated usages, i18n, accessibility, security
  • Principles: DRY (same reason to change), SRP, Rule of Three (no premature abstraction)
  • Checked CI status and linked issue acceptance criteria
  • For UI changes: inspected screenshots for layout, visual completeness, and consistency

- uses: actions/checkout@v6.0.2
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
with:
fetch-depth: 0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

praise: fetch-depth: 0 is the critical detail here — setuptools-scm traverses the full git history to find the nearest version tag. Omitting it would cause every CI build to produce version 0.0.0 rather than the real tag-derived version.

Comment thread pyproject.toml
"Intended Audience :: Developers",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nitpick: requires-python allows up to 3.15 but classifiers only advertise 3.9. As the project is tested or used on 3.10–3.14, adding the corresponding Programming Language :: Python :: 3.X entries keeps PyPI metadata accurate.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants