Repository navigation
Add flakeModules.python: uv2nix, ruff, ty and org versioning for Python repos - #35
Merged
Merged
Conversation
…on repos A repo with pyproject.toml + uv.lock at its root now gets packages, apps, checks (pytest, ty, uv-lock, version), ruff in treefmt and a python-cli VM test from flakeModules.default, with no uv2nix inputs of its own. The shipped packages are versioned <major>.<minor>.<commit count> from self.revCount; org git dependencies get their own commit count. The devenv module org-pkgs/devenv/python builds the editable venv from the same builder, with a literal editable root and a minimal editable source, so .py edits rebuild nothing. The template's nixd settings evaluate nixpkgs with the org overlay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
andrewthomaslee
enabled auto-merge (squash)
November 14, 2026 18:11
This was referenced Nov 14, 2026
Merged
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.
Summary
Python becomes part of the org standard: a repo with
pyproject.toml+uv.lockgets everything fromflakeModules.default, with no uv2nix inputs of its own.What a Python repo gets:
X.Y.0(checked against ci.yml major/minor); the shipped set stamps the patch with the commit count. Org git dependencies (another repo's library, locked by uv) are stamped from their own fetched commit count. Checks use the unstamped set, so they don't rebuild per commit..pthholds a literal path (works without$DEVENV_ROOT), and editable members build from pyproject/readme/__init__.pyonly, so.pyedits no longer rebuild the venv.UV_PROJECT_ENVIRONMENTkeepsuv runon the Nix venv.--error-on-warning(optionpython.ty.args).mkDefault: a repo's own definition wins (also keeps the moscripts main this flake consumes evaluating unchanged until it adopts the module).Evidence
nix run .#flake-check→ rc=0, no evaluation warnings (incl. newchecks.python-module: fixture stamped0.1.7, unstamped0.1.0,fixture --version→fixture 0.1.7).python-pytest(39 passed),python-ty(All checks passed),python-uv-lock,python-version,treefmt→ PASSnix build→moscripts-0.2.80,motmp --version→moscripts 0.2.80vm-test python-cli --remote --rebuild→ passed (101s), 4 CLIspython -c 'import moscripts'resolves to the checkout withDEVENV_ROOTunset;uv runuses the Nix venv, no.venv; a.pyedit leaves.devenv/profileunchanged (before: rebuilt)import nixpkgs { overlays = [ f.overlays.default ]; }→moscripts-0.2.0,headroom 0.43.1,zen-browser 1.24b.Merge Danger
Door: two-way
Additive: repos without
pyproject.toml+uv.locksee no change (the module stays off and never fetches uv2nix). Template changes only affect new repos.Blast Radius: Python repos
Only moscripts uses Python today; its own wiring keeps winning (mkDefault) until its PR adopts the module.
Merge order: this PR → andrewthomaslee/moscripts adopts the module → pkgs takes moscripts via
git+https→ skills (uv2nix + external-systems skills) → modules → home. A separate pkgs PR adds git credentials to org-ci for private Python repos.🤖 Generated with Claude Code