Repository navigation
chore: move to uv, prek, ruff-format and ty (pyrepo patterns) - #39
Merged
Merged
Conversation
… ty) - test/dev extras -> PEP 735 dependency groups, with lower bounds; drop pdbpp and black; add prek and ty; pyqt5/pyside6 groups for the Qt test - requests>=2.30 (lowest version resolvable alongside urllib3 2) - PEP 639 license metadata, hatchling>=1.27, src-only wheel - ruff: extend-select on top of ruff's defaults (all previous rules kept), add D417 and ANN (replaces mypy's disallow_untyped_defs); ruff-format replaces black - mypy -> ty (error-on-warning), checking src and tests - pytest: native [tool.pytest] table - pre-commit config from the pyrepo template (pre-commit-hooks, actionlint, zizmor, typos, ruff-check/format, ty); drop the pre-commit.ci block - ignore uv.lock; add a Development section to the README Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- typos: `_extention` -> `_extension` (private), docstring typos - BLE001: keep the intentional fallback to an in-memory cache, with noqa - ty: drop `type: ignore`s that only silenced mypy's warn_return_any; type the test ICONS mapping; `@contextmanager` returns `Generator` - ruff-format: blank line in a docstring code example Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- replace the pyapp-kit/workflows reusable test job with setup-uv steps; same Python/OS matrix, plus a lowest-direct job for minimum deps - Qt: instead of 4 extra jobs that re-ran the whole suite (`-k Py` matched everything), add PyQt5 to ubuntu 3.11 and PySide6 to ubuntu 3.14 - add a prek lint job; SHA-pinned actions; per-job permissions - build-and-inspect-python-package + trusted publishing, gh release create - --pre failure reporting via gh; drop TEST_FAIL_TEMPLATE.md - dependabot: add pre-commit ecosystem and cooldown (still quarterly) - issue template -> issue form Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hatchling finds src/pyconify on its own; the built wheel is identical. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #39 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 4 4
Lines 276 276
=========================================
Hits 276 276 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Keeps them out of pyproject.toml and uv.lock; uv run --no-sync leaves the extra package in place for pytest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this moves pyconify over to the current pyrepo template patterns: uv + dependency groups, prek, ruff-format instead of black, ty instead of mypy, and a uv-based CI workflow (instead of the pyapp-kit/workflows reusable test job).
build / tooling (
be440a7)pdbppandblack, addedprekandty.pip install pyconify[test]won't work anymore...uv syncorpip install -e . --group devinsteadrequests>=2.30. 2.28 actually works too (tested locally), but uv locks all groups together andtypes-requestsneeds urllib3 2, so the lowest-direct job can't test anything older than 2.30extend-selecton top of ruff's (now larger) defaults. none of the previously selected rules were removed, and I addedD417andANN[tool.pytest]native table,uv.lockgitignored, and a Development section in the READMEmypy -> ty
ty passes on
srcandtests(mypy only checkedsrc), witherror-on-warning = true. what we lose frommypy --strict:disallow_untyped_defs... replaced by ruff'sANNrules, so that's still enforcedwarn_return_any... ty has no equivalent. that's what the six# type: ignores onreturn resp.json()were for, so they're gone now (ty flags unused ignores)no_implicit_reexport... not sure ty has an equivalent yetty found a couple of real (minor) things in the tests that mypy never looked at.
fixes from the new hooks (
496e6a9)typos (
_extention->_extension, which is private, plus two docstring typos), BLE001 on the intentionalexcept Exceptionfallback in_cache.py(kept, with anoqa), and ruff-format only changed a single blank line vs black.CI (
22391c8)lowest-directjobtest-qtis gone. It was 4 jobs that each re-ran the entire suite (-k Pymatches every test since-kis case-insensitive and everything lives underpyconify/), just for the onetest_freedesktop_qtcase. Now PyQt5 is added to the ubuntu 3.11 job and PySide6 to the ubuntu 3.14 job (one Qt5, one Qt6), and PySide2 is droppedlintjob running prek, SHA-pinned actions, per-job permissionsgh release createfor deploysTEST_FAIL_TEMPLATE.mdremoved (failure reporting is inline withghnow)branch protection
the pre-commit config no longer has the
ci:block (hook updates move to dependabot, linting to the🧹 prekjob), and pre-commit.ci can't run the ty hook anyway since it needs network to build the project. so I swapped main's required check frompre-commit.ci - pr(app 68672) to🧹 prek(GitHub Actions, app 15368),strictunchanged. if this PR gets closed without merging, that should be reverted. other open PRs won't get the🧹 prekcheck until they're rebased.still to do by hand: turn off pre-commit.ci for this repo (it'll keep posting a failing, now non-required, check until then).
🤖 Generated with Claude Code