You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by ar...@apache.org on 2026/09/24 14:21:31 UTC
(tooling-trusted-releases) branch arm updated: Add rule type descriptions
This is an automated email from the ASF dual-hosted git repository.
alitheg pushed a commit to branch arm
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
The following commit(s) were added to refs/heads/arm by this push:
new 625be4f9 Add rule type descriptions
625be4f9 is described below
commit 625be4f9ca2614dd706b02b4e19de4531583263a
Author: Alastair McFarlane <ar...@apache.org>
AuthorDate: Thu Sep 24 15:21:05 2026 +0100
Add rule type descriptions
---
atr/admin/__init__.py | 17 +++++++++++++++++
atr/strings.py | 21 +++++++++++++++++++++
2 files changed, 38 insertions(+)
diff --git a/atr/admin/__init__.py b/atr/admin/__init__.py
index 6ae2fab9..287e6e52 100644
--- a/atr/admin/__init__.py
+++ b/atr/admin/__init__.py
@@ -71,6 +71,7 @@ import atr.shared.catalogue_diff as catalogue_diff
import atr.shared.catalogue_import as catalogue_import
import atr.shared.catalogue_rows as catalogue_rows
import atr.storage as storage
+import atr.strings as strings
import atr.tasks as tasks
import atr.template as template
import atr.util as util
@@ -2239,6 +2240,7 @@ async def _catalog_dist_rules_tab() -> htm.Element:
]
block.append(_dist_rules_table(action_rows))
block.h3(".mt-4")["Add a rule"]
+ block.append(_dist_rule_kinds_reference())
block.append(add_form)
return block.collect()
@@ -2528,6 +2530,18 @@ def _dist_rule_cell(value: str | None) -> htm.Element:
return htpy.span(".text-muted")["—"]
+def _dist_rule_kinds_reference() -> htm.Element:
+ # A glossary so the Kind dropdown's bare enum names have a plain meaning to hand while adding a rule
+ rows: list[htm.Element] = []
+ for kind in sql.DistRuleKind:
+ rows.append(htpy.dt[htpy.code[str(kind)]])
+ rows.append(htpy.dd(".text-muted")[strings.DIST_RULE_KIND_DESCRIPTIONS.get(str(kind), "")])
+ return htpy.details(".mb-3.small")[
+ htpy.summary["What the rule kinds mean"],
+ htpy.dl(".mt-2.mb-0")[rows],
+ ]
+
+
def _dist_rule_validation_error(add_form: AddDistRuleForm) -> str | None:
# A project remap rewrites a committee/subproject to a target; the rest key on a pattern. A
# committee bucket also names the committee it's scoped to
@@ -2556,6 +2570,9 @@ def _dist_rules_table(action_rows: list[tuple[sql.DistRule, htm.Element, htm.Ele
sections: list[htm.Element] = []
for kind in sorted(by_kind):
sections.append(htpy.h3(".mt-4.h5")[kind])
+ description = strings.DIST_RULE_KIND_DESCRIPTIONS.get(kind)
+ if description is not None:
+ sections.append(htpy.p(".text-muted.small.mb-2")[description])
sections.append(
htpy.table(".table.table-sm")[
htpy.thead[
diff --git a/atr/strings.py b/atr/strings.py
index 1d37a4de..ec9829af 100644
--- a/atr/strings.py
+++ b/atr/strings.py
@@ -35,3 +35,24 @@ FILE_CLASS_DISALLOWED: Final = "Disallowed file"
FILE_CLASS_METADATA: Final = "Metadata file"
FILE_CLASS_SBOM: Final = "SBOM"
FILE_CLASS_SOURCE: Final = "Source artifact"
+
+# Dist watcher rule kinds, keyed by DistRuleKind value, in plain terms for the admin who edits them
+DIST_RULE_KIND_DESCRIPTIONS: Final[dict[str, str]] = {
+ "project_remap": (
+ "Sends a release to a named project when its dist path would otherwise land on the wrong key, or on none."
+ ),
+ "grouping_bucket": (
+ "Marks a directory that only groups projects together, for any committee. The project name is read from "
+ "the file, not from this directory."
+ ),
+ "committee_bucket": (
+ "A grouping directory scoped to one committee - used when the same word is a real project somewhere else."
+ ),
+ "excluded_part": "Marks a path segment that never holds a release, so anything beneath it is skipped.",
+ "name_build_suffix": (
+ "A trailing word to drop from a release name when working out the project, like -incubating or -bin."
+ ),
+ "airflow_provider_area": (
+ "An Airflow directory whose per-provider packages are rolled up into one dated bundle release."
+ ),
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org