Skip to content

Harden Planemo support (pin + test-report schema + CLI pages + convert Mold)#241

Merged
jmchilton merged 1 commit into
mainfrom
module_farm
May 11, 2026
Merged

Harden Planemo support (pin + test-report schema + CLI pages + convert Mold)#241
jmchilton merged 1 commit into
mainfrom
module_farm

Conversation

@jmchilton

Copy link
Copy Markdown
Member

Closes #238 stages 1-3 (stage 4 explicitly lazy per the issue).

Summary

  • Pin planemo to jmchilton/planemo@a9b8b8bc7ab3b12035d53bdb5383fe450413d9f3 (PR Allow structured reasoning of Planemo command-line interface and certain outputs planemo#1636 merge commit). Galaxyproject doesn't carry the SHA yet — unpin once #1636 merges + releases.
  • New @galaxy-foundry/planemo-test-report-schema: vendored JSON Schema for planemo test --test_output_json, AJV-2020-12 validator, validate-planemo-test-report CLI, two-step sync (planemo → JSON → TS) so contributor laptops never need planemo.
  • New @galaxy-foundry/planemo-cli-meta: minimal vendored cli_metadata so the Foundry validator's cli-command allowlist treats planemo as a known source (parallels @galaxy-tool-util/cli/meta for gxwf).
  • New scripts/sync-planemo-cli.ts: shells out to planemo cli_metadata --command <name>, generates content/cli/planemo/planemo-<name>.md with AUTO_BEGIN/END markers that preserve hand-edited ## Output / ## Examples / ## Gotchas.
  • Seed CLI pages: planemo-{lint,test,workflow_test_init,workflow_test_on_invocation,cli_metadata,output_schema}.
  • New schema note content/schemas/planemo-test-report.md.
  • Rewrote convert Mold §10: convergence loop now runs planemo test --test_output_json, AJV-validates the report, classifies failures from tests[].data.status / data.problem_log / data.job instead of free-text. Deleted the deferred-manpages caveat.
  • Cross-links into planemo-asserts-idioms, planemo-workflow-test-architecture, implement-galaxy-workflow-test.
  • AGENTS.md "Vendored planemo artifacts" section: planemo only required when regenerating.
  • make sync-planemo* / check-planemo-cli targets; .github/workflows/planemo-drift.yml CI gate.

Deviations from issue text

  1. Filenames are planemo-<name>.md (prefixed) instead of bare <name>.md. The wiki-link resolver has no tool-scoped lookup; bare test.md would slug to test and [[planemo-test]] wouldn't resolve. Underscore preservation honored on the suffix (workflow_test_init).
  2. Both scripts/sync-planemo-cli.ts AND packages/planemo-cli-meta/ were built (issue listed them as "or"). The validator hardcodes CLI_METADATA_KEYS from npm-imported metadata sources, so a workspace-imported planemo source is needed in parallel.
  3. Sync scripts inside the new packages are .mjs (issue said "All sync logic TS"). Mirrors the tests-format-schema/scripts/sync-schema.mjs precedent; the top-level page generator IS TypeScript.

Open follow-ups

  • Once planemo#1636 merges and ships, flip package_version to a PyPI version pin and strengthen availability_check to planemo cli_metadata --help.
  • Generator hardcodes revised: 2026-05-11 / revision: 1 in regenerated frontmatter — needs a follow-up to preserve / bump those across regen.
  • CI installs planemo via pip install, AGENTS.md tells humans uvx --from git+... — slight asymmetry.
  • File optional --raw flag on planemo upstream for cleaner pipe-to-file ergonomics (open question in the issue).

Verification

  • npm run validate — 0 errors, 132 warnings (all pre-existing).
  • npm run packages-typecheck / packages-lint / packages-format — clean.
  • pnpm --filter @galaxy-foundry/planemo-test-report-schema test — 5/5 passing.
  • pnpm --filter @galaxy-foundry/planemo-cli-meta test — 3/3 passing.
  • npm run check:planemo-cli (with pinned planemo) — no drift.

Pre-existing failures unrelated to this PR: packages/summarize-nextflow Sarek/rnaseq integration tests (commits 86197b5 / 11ec258) and tests/cli-registry.test.ts (needs npm --prefix site install first).

Test plan

  • CI `Packages` workflow passes (validate, typecheck, packages-test, format, lint, build).
  • CI `Planemo vendored drift` workflow passes (installs pinned planemo, runs --check on CLI pages, runs sync:from-planemo + diff gate on both packages).
  • Manually install pinned planemo (`uvx --from git+https://github.com/jmchilton/planemo@a9b8b8bc7ab3b12035d53bdb5383fe450413d9f3 planemo --version`) and rerun `make sync-planemo` to confirm no drift.
  • Spot-check the rendered Astro site for the new content/cli/planemo/ and content/schemas/planemo-test-report.md pages.

🤖 Generated with Claude Code

@jmchilton
jmchilton force-pushed the module_farm branch 3 times, most recently from 3ce4fd4 to da1aea8 Compare May 11, 2026 18:16
… convert Mold

Closes #238 stages 1-3 (stage 4 lazy per issue).

- pin planemo to jmchilton/planemo@a9b8b8bc (PR #1636 merge); galaxyproject doesn't carry the SHA yet, unpin once #1636 merges + releases
- new @galaxy-foundry/planemo-test-report-schema: AJV-2020-12 validator + validate-planemo-test-report bin + sync-from-planemo (envelope unwrap) + sync (TS regen)
- new @galaxy-foundry/planemo-cli-meta: minimal vendored cli_metadata list so the validator's cli-command allowlist sees planemo (parallels @galaxy-tool-util/cli/meta)
- new schema note content/schemas/planemo-test-report.md
- new scripts/sync-planemo-cli.ts: shells out to planemo cli_metadata, emits content/cli/planemo/planemo-<name>.md with AUTO_BEGIN/END markers preserving hand-edited Output/Examples/Gotchas
- seed CLI pages: planemo-{lint,test,workflow_test_init,workflow_test_on_invocation,cli_metadata,output_schema}
- rewrote convert-nfcore-module-to-galaxy-tool §10: convergence loop now uses planemo test --test_output_json + AJV gate; classification fields per upstream PlanemoTestReport
- cross-linked new CLI pages from planemo-asserts-idioms, planemo-workflow-test-architecture, implement-galaxy-workflow-test
- AGENTS.md note: planemo only required when regenerating vendored artifacts
- Makefile sync-planemo* targets; .github/workflows/planemo-drift.yml --check job

Deviations from issue text:
- filenames are planemo-<name>.md (prefixed), not bare <name>.md — slug-collision protection (the validator's wiki-link resolver has no tool-scoped lookup); underscore preservation honored on the suffix
- packages/planemo-cli-meta/ added alongside the page generator (issue lists them as "or"); needed because validate.ts hardcodes CLI_METADATA_KEYS
- two .mjs sync scripts per package; mirrors tests-format-schema precedent (issue said "All sync logic TS")

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jmchilton
jmchilton merged commit 97effea into main May 11, 2026
2 checks passed
@jmchilton
jmchilton deleted the module_farm branch May 11, 2026 20:07
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.

Harden Planemo support: pin, vendor test-report schema, generate CLI pages, wire convert Mold

1 participant