Skip to content

Publish a pull request under pr/, not beside the branches (#307) - #330

Merged
adrpo merged 1 commit into
OpenModelica:masterfrom
adrpo:pull-requests-in-their-own-directory
Aug 25, 2026
Merged

Publish a pull request under pr/, not beside the branches (#307)#330
adrpo merged 1 commit into
OpenModelica:masterfrom
adrpo:pull-requests-in-their-own-directory

Conversation

@adrpo

@adrpo adrpo commented Aug 25, 2026

Copy link
Copy Markdown
Member

A pull request run was named pr-<N>, so its results landed in
branches/pr-16370 next to master, v1.27, cpp and the 65 other
directories there, and its reports in branches/history/pr-16370. One directory
per pull request tested would bury the branches.

The name is pr/<N>, which is a directory of its own:

branches/pr/16370/                          the per-library results
branches/history/pr/16370/                  the report and the summary

The one name that keeps its directory

Every other job is named after a git branch and takes only the last part of the
name - maintenance/v1.27 is tested, stored and published as v1.27. That rule
was a split("/")[-1] in each of report.py, all-reports.py, all-plots.py,
single-model.py and pr-report.py; it is now one place:

prBranchRe = re.compile(r"^pr/[0-9]+$")

def resultTable(branch):
  """The results of a job named after this branch: its table and its directory."""
  return branch if prBranchRe.match(branch) else branch.split("/")[-1]

report.py --branches='master pr/<N>' works as a side effect, which it would not
have before: the name would have been cut down to the number.

drop-pr-tables.py matches pr[-/]<N>, so the tables of the runs made before
this are dropped by the same rule.

The run that is already there

PR #16370 was tested before this - pr-16370, 19661 models - and stays exactly
where it is. Nothing here moves it and nothing needs to: this is for the runs
from here on. drop-pr-tables.py matches pr[-/]<N>, so it goes the same way as
any other once the pull request is merged or closed.

Tested

Against a sqlite database whose pull request table is pr/1234:

./pr-report.py 1234 writes history/pr/1234/, and the model links point at branches/pr/1234/... while the baseline ones point at branches/master/...
./report.py --branches='master pr/1234' the pull request column links to pr/1234/...
./drop-pr-tables.py lists pr/1234 and pr-16357 together, drops the merged one
the sanity check the CI runs test.py --branch=stable configs/sanityCheck.json, then report.py, then the grep from .github/workflows/test.yml: passes

Generated by Claude Code.

…ca#307)

A pull request run was named pr-<N>, so its results landed in
branches/pr-<N> next to master, v1.27, cpp and the rest, and its reports
in branches/history/pr-<N>. There are 65 directories there today and one
per pull request tested would bury them.

The name is pr/<N> now, which is a directory of its own: the results of a
pull request go to branches/pr/<N>, its reports to
branches/history/pr/<N>, and the branches directory holds branches. It is
the one job name that keeps the directory part of itself - the others are
git branches and only the last part is used, maintenance/v1.27 being
tested, stored and published as v1.27 - so that rule is now
shared.resultTable() rather than a split("/")[-1] in each of the five
scripts that did it. report.py --branches='master pr/<N>' works as a
side effect, which it did not before: the name would have been cut down
to the number.

drop-pr-tables.py takes both spellings, so the tables of the runs made
before this can be dropped by the same rule.

---
Generated by Claude Code.
@adrpo
adrpo merged commit fa3c5c6 into OpenModelica:master Aug 25, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant