Skip to content

Adopt org-pkgs flakeModules.python: ty, Astral ruff defaults, --version - #2

Merged
andrewthomaslee merged 1 commit into
mainfrom
org-python-module
Nov 14, 2026
Merged

andrewthomaslee merged 1 commit into
mainfrom
org-python-module

Conversation

@andrewthomaslee

Copy link
Copy Markdown
Owner

Summary

moscripts adopts the org Python standard from external-systems/pkgs#35:

 flake.nix                  org inputs only
-  pyproject-nix / uv2nix / pyproject-build-systems follows
 flake-parts/
   python.nix               perSystem.python = { runtimeInputs = gum uv mpv; checkInputs = which; }
-  _python/python-set.nix   (now org-pkgs flakeModules.python / lib.python.mkWorkspace)
-  _python/overrides.nix
 devenv.yaml                + org-pkgs/devenv/python  (editable venv, uv, ruff, ty)
 pyproject.toml             - pyrefly, ruff (dev group), [tool.pyrefly], pinned [tool.ruff] select
 src/moscripts/             --version on all four CLIs (utilities.VersionOption)
                            + fixes for Astral's default ruff rules and one ty finding
 tests/test_version.py      new
 .vscode/                   ty/ruff from .devenv/profile, nixd org-overlay expr
  • Package version is now the release number: 0.2.<commits> (store name, importlib.metadata, --version).
  • Checks: python-pytest, python-ty (warnings fail), python-uv-lock, python-version; ruff (Astral defaults) in treefmt.
  • ty found a real latent bug: validate_venv(None) only "worked" because a blind except Exception swallowed the AttributeError; now explicit.

Evidence

  • nix run .#flake-check → rc=0, no evaluation warnings.
  • vm-test --all --remote --rebuild → PASS cli-smoke 33s, PASS python-cli 29s (fresh boots).
  • Clean checkout, 79 commits: nix build → moscripts-0.2.79; password_generator --version → moscripts 0.2.79.
  • Locks: flake.lock 20 → 16 nodes, devenv.lock 21 → 17 (org-pkgs → pkgs main f6e1071, sync-locks).

Merge Danger

Door: two-way

Blast Radius: pkgs.moscripts

pkgs consumes main with org-pkgs.follows = ""; this tree evaluates against pkgs main. Merge order: external-systems/pkgs#35 (merged) → this → pkgs switches the input to git+https (exact version) → skills → modules → home.

🤖 Generated with Claude Code

The Python build, checks and the python-cli VM test now come from
org-pkgs flakeModules.python, and the shell from org-pkgs/devenv/python,
so the uv2nix inputs and flake-parts/_python/ go. The package reports the
release number (0.2.<commits>) and every command answers --version.
ty replaces pyrefly; ruff runs Astral's default rules, whose findings are
fixed here (explicit subprocess check=, bare raise, narrower excepts,
Annotated Typer parameters, a None venv that only worked by accident).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andrewthomaslee
andrewthomaslee merged commit e351fa8 into main Nov 14, 2026
3 checks passed
@andrewthomaslee
andrewthomaslee deleted the org-python-module branch November 14, 2026 18:19
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.

1 participant