Skip to main content

Shared rule-metadata vocabulary for the galaxy-tool-refactor tiers (tier 0.5).

Project description

galaxy-tool-refactor-rules

Shared rule-metadata vocabulary for the Galaxy tool refactoring framework — a small, dependency-free "tier 0.5" package consumed by both higher tiers:

Tier Layer Package
0.5 rule metadata galaxy-tool-refactor-rules (this package)
1 parsing & validation galaxy-tool-source
2 structure galaxy-tool-codemod
3 formatting galaxy-tool-fmt
3.5 advisory checks galaxy-tool-lint
3.6 rule registry / rulesets galaxy-tool-refactor-registry
4 app / CLI galaxy-tool-refactor-cli

It provides:

  • galaxy_tool_refactor_rules.meta.RuleMeta — a frozen dataclass describing one GTR rule (code, summary, since, until, cite, order, detect_only, applies_to). A tier-3 formatter Rule, a tier-2 CodemodCommand, and a tier-3.5 CheckRule each carry a meta: ClassVar[RuleMeta], so the tiers share one registry vocabulary.
  • galaxy_tool_refactor_rules.violation.Violation — a frozen dataclass for a detect-phase finding (code, sourceline, xpath, message); the pure, lxml-free, read-only counterpart to the mutating tier-2 Change / tier-3 Edit.
  • galaxy_tool_refactor_rules.reference.render_rule_reference_table — a pure helper that renders (RuleMeta, tier) pairs as a GitHub-flavored markdown glossary table.

Why a separate package

The descriptor is the only thing the two tiers genuinely share — their behavioral bases differ (fmt yields lxml edits; codemod walks a cursor), so those stay in their own packages. Keeping RuleMeta here, with zero runtime dependencies, lets both fmt and codemod depend on it without depending on each other — preserving the tier independence documented in galaxy-tool-fmt/docs/decisions.md §D10. The extraction was anticipated in that package's §D1 ("a shared rule-engine package will be extracted only when a second consumer materialises"); the codemod tier is that consumer.

Install / test

uv sync   # from the workspace root
uv run --package galaxy-tool-refactor-rules pytest galaxy-tool-refactor-rules/tests/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

galaxy_tool_refactor_rules-0.3.1.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

galaxy_tool_refactor_rules-0.3.1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file galaxy_tool_refactor_rules-0.3.1.tar.gz.

File metadata

File hashes

Hashes for galaxy_tool_refactor_rules-0.3.1.tar.gz
Algorithm Hash digest
SHA256 1cb3ca10ec127ebcff4d96534daca849a09c14ff42dc2e9644edd5f3d3d757d8
MD5 40dcc1aa5583ed1841c17a2c54e25786
BLAKE2b-256 8fcb8998fa1f7063d6a44bbc34d69c77b4f0ff24eb8e908e208d7dce5fbe0a18

See more details on using hashes here.

Provenance

The following attestation bundles were made for galaxy_tool_refactor_rules-0.3.1.tar.gz:

Publisher: release.yml on richard-burhans/galaxy-tool-refactor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file galaxy_tool_refactor_rules-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for galaxy_tool_refactor_rules-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5e99dff318eeb5461808e2980f52980a11aeda66f46615cb0f0a0782f945cfb3
MD5 ff41c1b8f74b99ab9dfb1d63f93f3b01
BLAKE2b-256 8b38d7dfc0c1c0670b756468780f8286e32dadde1871f1aa9932999c6dfb24aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for galaxy_tool_refactor_rules-0.3.1-py3-none-any.whl:

Publisher: release.yml on richard-burhans/galaxy-tool-refactor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page