One SWC display vocabulary, and a release workflow that needs no local build - #25
Merged
Conversation
The report, the quick-changes panel, the viewer's file header and the terminal
summary each spelled out ('ports', 'runnables', 'events') with their own
labels, and three of them carried their own copy of the interface-tag and
'Ctrl.In2' formatting. Adding a category meant editing six places; missing one
dropped it from that surface alone, silently.
view_model.SWC_DISPLAY now holds the labels and takes the KEYS from
arxml_rules.SWC_CATEGORIES, the module that produces them -- a category added
there with no label raises at import rather than going missing on one screen.
The fixtures never change a runnable, so every surface could have dropped that
category with the suite still green. The new tests use a synthetic swc diff
with all three populated, and assert each surface names all of them.
Releasing meant building the .exe by hand and uploading it, which is why the
one-word fix sitting in [Unreleased] was not worth cutting a version for. Now:
python packaging/release_check.py 1.3.1
gh workflow run release.yml --ref main -f version=1.3.1 # rehearsal
gh workflow run release.yml --ref main -f version=1.3.1 -f publish=true
The default does not publish. A run without `publish` builds both artifacts,
runs each against the fixtures and stops, uploading them either way -- the
irreversible half is opt-in, and the expensive half can be proven first.
release_check.py holds every precondition (version matches __init__.py, the
CHANGELOG has that section, nothing left under [Unreleased]) and prints what to
change rather than just failing, because the reader is usually a log. One
script, so a local check and the workflow cannot disagree. The workflow adds
what a file cannot know: the ref is main, and the tag is free.
Verified locally rather than on the first tag: build.ps1 -Pyz produces the
44 MB exe and the zipapp, both exit 1 on the fixtures, and the artifact step
was run against them -- and against identical folders, to see it fail.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two commits. The first finishes the rule-3 cleanup the previous PR deferred;
the second removes the reason a release currently costs a manual build.
7618e33— one SWC display vocabularyThe previous PR reported three duplicated helpers between
report.pyandqtviewer/. That count was low. What was actually there:iface_kindreport.py,summary_model.py,main.py(inlined.replace())swc_itemreport.py,summary_model.py,main.pyreport.py×3,summary_model.py,diffpane.py,main.pymain.pyis a third renderer — the terminal summary — and the audit onlylooked at the report/viewer pair, so it was missed.
report.pyalone spelledthe list out three times, in two label styles.
view_model.SWC_DISPLAYnow holds the labels and takes the keys fromarxml_rules.SWC_CATEGORIES, the module that produces them. A category addedto the rules without a label raises at import instead of quietly going missing
from one surface. (
arxml_rules.SWC_CATEGORIESalready existed — adding asecond constant of the same name in
view_modelwas the first thing thischange nearly got wrong.)
The blind spot worth knowing about: the fixtures never change a runnable,
so any surface could have dropped that category with the whole suite still
green. The new tests use a synthetic swc diff with all three categories
populated and assert each surface names all of them. Planting a hardcoded list
missing
runnablesback into_swc_notefails exactly one test.This touches rendering code, so behaviour was checked rather than assumed: a
report and a terminal run were generated from
origin/mainin a temporaryworktree and compared against this branch. The terminal output is identical;
the report differs by one meta line, because the two runs were invoked with an
absolute and a relative fixture path.
bcadd35— release workflowCutting a release meant building the
.exeby hand and uploading it, which ispart of why the one-line fix sitting in
[Unreleased]was not worth a version.The default does not publish. A run without
publishbuilds bothartifacts, runs each against the fixtures and stops — and uploads them either
way, because the point of a rehearsal is being able to look at what would have
shipped. The irreversible half is opt-in.
packaging/release_check.pyowns every precondition and prints what to change,since the reader is usually a log:
One script, so a local check and the workflow cannot disagree. The workflow
adds the two facts a file cannot know: the ref is
main, and the tag is free.A published version is refused, never overwritten. Nothing in the workflow
edits the repo — the version bump arrives through a normal reviewed PR.
For the reviewer
python -m unittest discover -s tests— 447 pass.python -m ruff check .clean.tag:
build.ps1 -Pyzproduces the 44 MB exe and the zipapp, both exit 1 onthe fixtures, and the artifact-verification step was executed against them —
and against two identical folders, to watch it fail with
::error::dist/compare-tool.exe exited 0, expected 1.gh release createonly runs on a real publish,and
actions/upload-artifactonly exists on a runner. The first rehearsalcovers both.
maintainer tooling.