This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git
The following commit(s) were added to refs/heads/main by this push:
new b32810f Swap components and source in annotated divergences
b32810f is described below
commit b32810fc272870c9b541dd09c5667741ec2b2de4
Author: Sean B. Palmer <[email protected]>
AuthorDate: Wed Jun 25 16:02:35 2025 +0100
Swap components and source in annotated divergences
---
atr/blueprints/admin/templates/validation.html | 8 ++++----
atr/validate.py | 18 +++++++++---------
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/atr/blueprints/admin/templates/validation.html
b/atr/blueprints/admin/templates/validation.html
index e028926..6adb110 100644
--- a/atr/blueprints/admin/templates/validation.html
+++ b/atr/blueprints/admin/templates/validation.html
@@ -17,9 +17,9 @@
<table class="table table-striped table-hover">
<thead>
<tr>
- <th>Source</th>
- <th>Validator</th>
<th>Components</th>
+ <th>Validator</th>
+ <th>Source</th>
<th>Expected</th>
<th>Actual</th>
</tr>
@@ -27,9 +27,9 @@
<tbody>
{% for d in divergences %}
<tr>
- <td>{{ d.source }}</td>
- <td><code>{{ d.validator }}</code></td>
<td>{{ d.components | join(', ') }}</td>
+ <td><code>{{ d.validator }}</code></td>
+ <td>{{ d.source }}</td>
<td><code>{{ d.divergence.expected }}</code></td>
<td><code>{{ d.divergence.actual }}</code></td>
</tr>
diff --git a/atr/validate.py b/atr/validate.py
index 23d2740..02b708d 100644
--- a/atr/validate.py
+++ b/atr/validate.py
@@ -30,9 +30,9 @@ class Divergence(NamedTuple):
class AnnotatedDivergence(NamedTuple):
- source: str
- validator: str
components: list[str]
+ validator: str
+ source: str
divergence: Divergence
@@ -57,14 +57,14 @@ def divergences_predicate[T](okay: Callable[[T], bool],
expected: str, actual: T
def divergences_with_annotations(
- source: str,
- validator: str,
components: Sequence[str],
+ validator: str,
+ source: str,
ds: Divergences,
) -> AnnotatedDivergences:
- """Wrap divergences with a source, validator, and components."""
+ """Wrap divergences with components, validator, and source."""
for d in ds:
- yield AnnotatedDivergence(source, validator, list(components), d)
+ yield AnnotatedDivergence(list(components), validator, source, d)
def release(r: models.Release) -> AnnotatedDivergences:
@@ -87,9 +87,9 @@ def release_components(
def wrap(original: ReleaseDivergences) -> ReleaseAnnotatedDivergences:
def replacement(r: models.Release) -> AnnotatedDivergences:
yield from divergences_with_annotations(
- r.name,
- original.__name__,
components,
+ original.__name__,
+ r.name,
original(r),
)
@@ -118,7 +118,7 @@ def release_name(r: models.Release) -> Divergences:
yield from divergences(expected, actual)
-@release_components()
+@release_components("Release")
def release_on_disk(r: models.Release) -> Divergences:
"""Check that the release is on disk."""
path = util.release_directory(r)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]