wads.fleet_migrate¶
Batch migration helpers across the user’s local Python ecosystem.
Single entry point: fleet_stub (also exposed as wads-migrate fleet-stub)
which converts a batch of repos to the SSOT stub CI workflow in one call.
Reads the candidate list from the wads-ci-sweep state file
(~/Downloads/wads_ci_diagnosis.json), selects by category, orders by
last-commit recency, and applies migrate_ci_to_stub to each. Per-repo
failures are isolated — the batch never aborts midway.
See: wads-ci-sweep skill at ~/.claude/skills/wads-ci-sweep/ for the
ecosystem inventory + state-tracking it relies on.
Functions
|
Stub-migrate up to |
|
Stub-migrate one repo end-to-end: sync, rewrite, commit, push. |
|
Load the wads-ci-sweep state file. |
|
Pick which packages to migrate, in priority order. |
Classes
|
Outcome of attempting to stub-migrate one repo. |
- class wads.fleet_migrate.RepoResult(name, path, status, detail='')[source]¶
Bases:
objectOutcome of attempting to stub-migrate one repo.
- wads.fleet_migrate.fleet_stub(*, limit=20, select_category='uv_current', state_file=PosixPath('/home/runner/Downloads/wads_ci_diagnosis.json'), dry_run=False, pin='@master', commit_message='ci: switch to wads reusable workflow stub', order_by='git_recency')[source]¶
Stub-migrate up to
limitrepos, picked from the sweep state file.- Parameters:
limit (
int) – Max repos to migrate this run.select_category (
str) – Only consider packages with thiscategoryin the sweep state file (default"uv_current").state_file (
Path|str) – Path to the wads-ci-sweep JSON. Default~/Downloads/wads_ci_diagnosis.json.dry_run (
bool) – If True, print candidates and exit without touching anything.pin (
str) – Wads ref the stub points at (passed tomigrate_ci_to_stub).commit_message (
str) – Commit message for the per-repo stub-conversion commit.order_by (
str) – Candidate ordering —"git_recency"or"name".
- Return type:
- Returns:
List of
RepoResult, one per attempted repo (empty for dry-run).
- wads.fleet_migrate.migrate_one_to_stub(repo_path, *, pin='@master', commit_message='ci: switch to wads reusable workflow stub', workflow_path='.github/workflows/ci.yml')[source]¶
Stub-migrate one repo end-to-end: sync, rewrite, commit, push.
Idempotent: if the workflow is already on the latest stub template, returns
status="noop".- Return type:
- wads.fleet_migrate.read_sweep_state(path=PosixPath('/home/runner/Downloads/wads_ci_diagnosis.json'))[source]¶
Load the wads-ci-sweep state file.
- Raises:
FileNotFoundError – if the state file does not exist (the caller likely needs to run
python ~/.claude/skills/wads-ci-sweep/sweep.py diagnoseto create it).- Return type:
- wads.fleet_migrate.select_candidates(state, *, category='uv_current', limit=20, order_by='git_recency')[source]¶
Pick which packages to migrate, in priority order.
- Parameters:
state (
dict) – Sweep state dict (fromread_sweep_state()).category (
str) – Only consider packages with thiscategory. Default"uv_current"— repos already on inline uv-CI that can safely move to the stub. Other useful values:"uv_stub"(already done; useful for refresh sweeps after a stub-template change).limit (
int) – Max number of repos to return.order_by (
str) –"git_recency"(default) sorts most-recently-committed first."name"sorts alphabetically.
- Return type:
- Returns:
List of package records (subset of
state['packages']), in the chosen order.