Skip to content

Commit f93f534

Browse files
authored
Merge pull request #695 from Brad-Edwards/dev
Dev
2 parents 8685839 + 124db2a commit f93f534

211 files changed

Lines changed: 651 additions & 1352 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gc/plan-rules.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,14 @@ These encode the hard rules previously in `AGENTS.md` prose.
3232
concept-authority surfaces.
3333
- Plans MUST keep IMPLEMENTS and TESTS traceability in Ground Control
3434
aligned with changed code and tests.
35-
- Plans with a user-visible change MUST add a fragment under
36-
`changelog.d/<issue>.<type>.md` (or `changelog.d/+<slug>.<type>.md`
37-
for issue-free entries), where `<type>` is one of `breaking`, `security`,
38-
`added`, `changed`, `deprecated`, `removed`, `fixed`. The fragment `<type>`
39-
drives the release version bump (`tools/release.py`): `removed` → major (once
40-
≥ 1.0; pre-1.0 it is a minor), `added`/`changed`/`deprecated` → minor,
41-
`security`/`fixed` → patch; `breaking` is recorded in the changelog but does
42-
NOT auto-bump (force a major with `release.py --version 1.0.0`). Do not edit
43-
`CHANGELOG.md` directly outside release-collation commits.
44-
- Plans MUST NOT hand-edit the version. It is a single committed literal,
45-
`__version__` in `implementations/python/src/aces/__init__.py`, bumped only by
46-
`tools/release.py` from the pending changelog fragments at release time (#684).
47-
The PR title must still pass the `title-guard` conventional-shape / no-branding
48-
gate (`tools/check_pr_title.py`), but the PR title does NOT drive the version —
49-
only the changelog fragment types do.
35+
- Plans MUST NOT edit `CHANGELOG.md` or add changelog fragments: release-please
36+
owns `CHANGELOG.md` and generates it from the Conventional Commit history on
37+
`main` (#684). There is no `changelog.d/`.
38+
- Plans MUST NOT hand-edit the version (`[project] version` in
39+
`implementations/python/pyproject.toml`); release-please bumps it on release.
40+
Feature PRs squash-merge, so the PR title becomes the commit release-please
41+
reads: `feat:` → minor, `fix:`/`perf:` → patch, `feat!:` / a `BREAKING CHANGE:`
42+
footer → major (pre-1.0 demoted to minor); `docs`/`chore`/`refactor`/`test`/
43+
`ci`/`build` do not release. Use `feat:`/`fix:` for consumer-visible changes so
44+
release-please actually cuts a release. The PR title MUST still pass the
45+
`title-guard` gate (`tools/check_pr_title.py`).
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: Release Please
2+
3+
# release-please (#684) owns versioning + CHANGELOG.md. On each push to `main`
4+
# it maintains a release PR ("chore(main): release X.Y.Z") that bumps the version
5+
# (in implementations/python/pyproject.toml via extra-files) and updates the
6+
# repo-root CHANGELOG.md from the Conventional Commits since the last release.
7+
# Merging that PR tags `vX.Y.Z` and cuts the GitHub Release; the publish job then
8+
# builds the corpus-bundled wheel/sdist (#537) and publishes to PyPI over OIDC
9+
# trusted publishing.
10+
#
11+
# Feature PRs never touch CHANGELOG.md (release-please owns it) — no fragment
12+
# collisions. The version literal is `[project] version` in the subdir pyproject;
13+
# `aces.__version__` derives from the installed distribution metadata.
14+
#
15+
# Caveat: the release PR is opened by GITHUB_TOKEN, so required CI checks do not
16+
# auto-run on it — admin-merge it, or give release-please a PAT so checks run.
17+
# First release + PyPI setup: docs/explain/releasing.md.
18+
on:
19+
push:
20+
branches: [main]
21+
22+
permissions:
23+
contents: read
24+
25+
concurrency:
26+
group: release-please
27+
cancel-in-progress: false
28+
29+
jobs:
30+
release-please:
31+
runs-on: ubuntu-latest
32+
permissions:
33+
contents: write # create/maintain the release PR, tag, and Release
34+
pull-requests: write # maintain the release PR
35+
outputs:
36+
release_created: ${{ steps.rp.outputs.release_created }}
37+
tag_name: ${{ steps.rp.outputs.tag_name }}
38+
steps:
39+
- uses: googleapis/release-please-action@5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 # v4.4.1
40+
id: rp
41+
with:
42+
token: ${{ secrets.GITHUB_TOKEN }}
43+
config-file: release-please-config.json
44+
manifest-file: .release-please-manifest.json
45+
46+
publish:
47+
needs: release-please
48+
if: needs.release-please.outputs.release_created == 'true'
49+
runs-on: ubuntu-latest
50+
environment: pypi
51+
permissions:
52+
contents: write # upload the built distributions to the Release
53+
id-token: write # OIDC trusted publishing to PyPI (no stored token)
54+
steps:
55+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
56+
with:
57+
fetch-depth: 0
58+
59+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
60+
with:
61+
python-version: "3.12"
62+
63+
- name: Install uv
64+
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8
65+
66+
- name: Build the corpus-bundled wheel + sdist
67+
run: uv build --out-dir dist implementations/python
68+
69+
- name: Verify the contract corpus is bundled in the wheel (#537)
70+
run: |
71+
python - <<'PY'
72+
import glob
73+
import sys
74+
import zipfile
75+
76+
wheels = glob.glob("dist/aces_sdl-*.whl")
77+
if len(wheels) != 1:
78+
sys.exit(f"expected exactly one wheel, found {wheels}")
79+
names = zipfile.ZipFile(wheels[0]).namelist()
80+
required = [
81+
"aces_contracts/_corpus/profiles/backend/provisioning-only.json",
82+
"aces_contracts/_corpus/fixtures/",
83+
"aces_contracts/_corpus/concept-authority/controlled-vocabularies-v1.json",
84+
"aces_contracts/_corpus/schemas/",
85+
]
86+
missing = [r for r in required if not any(n == r or n.startswith(r) for n in names)]
87+
if missing:
88+
sys.exit(f"wheel is missing corpus payload: {missing}")
89+
print(f"corpus payload present: {sum(n.startswith('aces_contracts/_corpus/') for n in names)} files")
90+
PY
91+
92+
- name: Publish to PyPI (OIDC trusted publishing)
93+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
94+
with:
95+
packages-dir: dist
96+
97+
- name: Attach the distributions to the GitHub Release
98+
env:
99+
GH_TOKEN: ${{ github.token }}
100+
TAG: ${{ needs.release-please.outputs.tag_name }}
101+
run: gh release upload "${TAG}" dist/* --clobber

.github/workflows/release.yml

Lines changed: 0 additions & 177 deletions
This file was deleted.

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.18.0"
3+
}

0 commit comments

Comments
 (0)