galaxy-tool-refactor-registry
The rule-registry facade (tier 3.6) of the Galaxy tool refactoring framework: a single, code-addressable view over every baked-in rule across the three rule families — codemod (tier 2, structural GTR), fmt (tier 3, cosmetic GTR), and check (tier 3.5, advisory) — plus named rulesets and per-rule enable/disable, behind a library-first API.
galaxy-tool-refactor-registry (this package, tier 3.6)
↑ ↑
galaxy-tool-refactor-cli (tier 4) galaxy-tool-refactor-mcp (tier 4, future)
It depends on the rule tiers (0.5 / 1 / 2 / 3 / 3.5); the lower tiers do not
depend on it. It is the orchestration core the galaxy-tool-refactor CLI sits on
top of, and the core the agent-facing MCP server sits on
(galaxy-tool-refactor-mcp). All XML serialisation goes through fmt, preserving
"fmt is the only tier that writes/serialises XML".
Why library-first
No click / sys.exit / printing in the call path; functions take a path, raw
bytes, or a ToolDocument and return structured results; files are written
only when a write_path is given; and the rule/ruleset catalogs are
introspectable (list_rules() / list_rulesets()). That shape lets both the CLI
and a future agent-facing MCP server be thin adapters over the same core. See
../galaxy-tool-refactor-mcp/docs/vision.md.
Rulesets
| Ruleset | Contents | Notes |
|---|---|---|
cosmetic |
fmt cosmetic rules (GTR001/003/004) | whitespace / indent / shorthand only |
default (default) |
canonical codemods (GTR006/002/005/013) + cosmetic | today's format — the opinionated formatter |
iuc |
mirrors default (placeholder) |
reserved for an IUC-specific divergence |
strict |
default + advisory checks |
format + flag everything IUC cares about (report-only) |
Membership is declared per rule (RuleMeta.rulesets): the registry derives
each ruleset's code set by grouping every registered rule by the names in its
meta.rulesets. Adding or changing rules and rulesets is a developer task —
there are no user-defined rules or rulesets.
Selection
resolve_codes(rulesets=…, select=…, ignore=…) turns ruleset names plus
--select/--ignore code lists into a concrete code set — the base is the
union of the named rulesets (or the default ruleset when none are named).
Precedence is ruff-style: --ignore ▸ --select ▸ --ruleset — an explicit
--select replaces the rulesets' set, then --ignore subtracts. Unknown
ruleset names / rule codes raise the typed UnknownRuleset / UnknownRuleCode.
Public API (by submodule import; no re-exports)
from galaxy_tool_refactor_registry.facade import (
run, upgrade, detect, list_rulesets, list_rules,
)
from galaxy_tool_refactor_registry.resolve import resolve_codes, resolve_upgrade_codes
from galaxy_tool_refactor_registry.registry import by_code, known_codes, advisory_codes
run(source, *, codes, write_path=None) -> FormatResult— apply the fixable rules in the selection (codemods in canonical order, then cosmetic fmt), reporting advisory findings as notes.upgrade(source, *, codes, write_path=None) -> UpgradeResult— profile-upgrade plus the selected fixable rules.detect(source, *, codes) -> DetectResult— report-only over the selection.by_code(code) -> RuleHandle— the uniform, callable handle for one rule (meta,family,fixable,detect(document),apply(document)orNone).
Develop
Run from the workspace root (galaxy-tool-refactor/):
uv run --package galaxy-tool-refactor-registry pytest galaxy-tool-refactor-registry/tests/
uv run ruff check galaxy-tool-refactor-registry/src galaxy-tool-refactor-registry/tests
uv run mypy --config-file galaxy-tool-refactor-registry/pyproject.toml galaxy-tool-refactor-registry/src
Metadata
Release files for galaxy-tool-refactor-registry 0.3.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| galaxy_tool_refactor_registry-0.3.10.tar.gz | 132.7 kB | With provenance | Details for galaxy_tool_refactor_registry-0.3.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| galaxy_tool_refactor_registry-0.3.10-py3-none-any.whl | Python 3 | none | any | Details for galaxy_tool_refactor_registry-0.3.10-py3-none-any.whl |
Total release size: 199.4 kB
Release files / galaxy_tool_refactor_registry-0.3.10.tar.gz
| Download URL | galaxy_tool_refactor_registry-0.3.10.tar.gz |
|---|---|
| Size | 132.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8bf37daf8986fc910425b3fbc8040f35eb6f2def3d2ca55c7e5c3cf05ec481ca
|
|
BLAKE2b-256 checksum How to use checksums |
afe0b5e54333d9a947c2ba5ae48878cd273650c4227e0cca748c7dc0b6681f08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.
Transparency logRelease files / galaxy_tool_refactor_registry-0.3.10-py3-none-any.whl
| Download URL | galaxy_tool_refactor_registry-0.3.10-py3-none-any.whl |
|---|---|
| Size | 66.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7dd40e88c3f23de0137fd8ddfacca52a059b85842a42a104d290b3c89a5b6fd6
|
|
BLAKE2b-256 checksum How to use checksums |
762404db4bc0d68c8a0537d71634b45f79a94618244242cb924b831dc942a8f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.
Transparency logSecurity for galaxy-tool-refactor-registry 0.3.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for galaxy_tool_refactor_registry-0.3.10.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.