Skip to content

Commit 2030788

Browse files
committed
Update changelog
1 parent 35e8b86 commit 2030788

3 files changed

Lines changed: 136 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
11
# Changelog
22

3-
## KiteUtils unreleased
4-
### Breaking
5-
- replace the single `orient` quaternion field of `SysState` with component-major
6-
arrays `Qw`/`Qx`/`Qy`/`Qz` (one entry per oriented frame), mirroring the
7-
`X`/`Y`/`Z` position layout; `SysState` gains a second type parameter `O`
8-
(number of oriented frames). Code that relies on the exact type — concrete
9-
`SysState{P}`, `typeof(x) == SysState{P}` comparisons, or keyword construction
10-
with `orient=` — must be updated. Dispatch on `SysState{P}`, `isa SysState{P}`,
11-
construction via `SysState{P}()` (defaults `O=1`), and `.orient` access keep
12-
working unchanged.
3+
## KiteUtils v0.11.9 20-06-2026
134
### Added
145
- multi-frame orientations: `ss.orients[i]` (mutable per-frame quaternion view)
156
and `ss.pos[i]` (mutable per-point position view) on `SysState`
167
- `.orient`/`.orients`/`.pos` accessors on `SysLog` and the underlying
178
`StructArray`, returning per-timestep columns (e.g. `syslog.orients[frame][t]`)
189
### Changed
10+
- store the `SysState` orientation as component-major arrays `Qw`/`Qx`/`Qy`/`Qz`
11+
(one entry per oriented frame), mirroring the `X`/`Y`/`Z` position layout;
12+
`SysState` gains a second type parameter `O` (number of oriented frames).
13+
Dispatch on `SysState{P}`, `isa SysState{P}`, construction via `SysState{P}()`
14+
(defaults `O=1`), and `.orient` access keep working unchanged
1915
- `Logger` gains a type parameter `O`; `Logger(P, steps)` keeps one frame,
2016
`Logger(P, O, steps)` allocates `O` frames
2117
- `load_log` reads both new (`Qw/Qx/Qy/Qz`) and legacy (`orient`) Arrow logs

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "KiteUtils"
22
uuid = "90980105-b163-44e5-ba9f-8b1c83bb0533"
33
authors = ["Uwe Fechner <uwe.fechner.msc@gmail.com> and contributors"]
4-
version = "0.11.8"
4+
version = "0.11.9"
55

66
[workspace]
77
projects = ["examples", "test", "docs"]

bin/release

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
#!/bin/bash
2+
# Copyright (c) 2026 Bart van de Lint
3+
# SPDX-License-Identifier: MIT
4+
5+
set -euo pipefail
6+
7+
_dry_run=false
8+
_assume_yes=false
9+
_sha=""
10+
11+
print_usage() {
12+
echo "Usage:"
13+
echo " ./bin/release Register the current HEAD with JuliaRegistrator"
14+
echo " ./bin/release --dry-run Print the version, commit and release notes, then exit"
15+
echo " ./bin/release --yes Skip the confirmation prompt"
16+
echo " ./bin/release --sha SHA Register a specific commit instead of HEAD"
17+
echo " ./bin/release -h"
18+
echo
19+
echo "Extracts the top section of CHANGELOG.md as release notes and posts a"
20+
echo "'@JuliaRegistrator register' comment on the commit via the GitHub API."
21+
echo "The commit must already be pushed to the remote."
22+
}
23+
24+
while [[ $# -gt 0 ]]; do
25+
case "$1" in
26+
-h|--help) print_usage; exit 0 ;;
27+
-n|--dry-run) _dry_run=true; shift ;;
28+
-y|--yes) _assume_yes=true; shift ;;
29+
--sha) _sha="${2:?--sha needs an argument}"; shift 2 ;;
30+
*) echo "Unknown option: $1" >&2; print_usage >&2; exit 1 ;;
31+
esac
32+
done
33+
34+
if [[ $(basename "$(pwd)") == "bin" ]]; then
35+
cd ..
36+
fi
37+
38+
for cmd in git gh awk; do
39+
if ! command -v "$cmd" >/dev/null 2>&1; then
40+
echo "Required command not found: $cmd" >&2
41+
exit 1
42+
fi
43+
done
44+
45+
if ! gh auth status >/dev/null 2>&1; then
46+
echo "gh is not authenticated. Run 'gh auth login' first." >&2
47+
exit 1
48+
fi
49+
50+
_version=$(awk -F'"' '/^version[[:space:]]*=/ {print $2; exit}' Project.toml)
51+
if [[ -z "$_version" ]]; then
52+
echo "Could not read version from Project.toml" >&2
53+
exit 1
54+
fi
55+
56+
_changelog_version=$(awk '/^## / {
57+
for (i = 1; i <= NF; i++) if ($i ~ /^v[0-9]+\.[0-9]+\.[0-9]+$/) { print $i; exit }
58+
}' CHANGELOG.md)
59+
if [[ "$_changelog_version" != "v$_version" ]]; then
60+
echo "Version mismatch: Project.toml is $_version but CHANGELOG top is" \
61+
"$_changelog_version (expected v$_version)." >&2
62+
echo "Update CHANGELOG.md so its first '## ' header matches the package version." >&2
63+
exit 1
64+
fi
65+
66+
_notes=$(awk '
67+
/^## / { n++; if (n == 1) next }
68+
n == 1 { print }
69+
' CHANGELOG.md | awk '
70+
{ lines[NR] = $0 }
71+
END {
72+
start = 1; while (start <= NR && lines[start] ~ /^[[:space:]]*$/) start++
73+
end = NR; while (end >= start && lines[end] ~ /^[[:space:]]*$/) end--
74+
for (i = start; i <= end; i++) print lines[i]
75+
}
76+
')
77+
78+
if [[ -z "$_notes" ]]; then
79+
echo "No release notes found under the '## v$_version' section." >&2
80+
exit 1
81+
fi
82+
83+
if [[ -z "$_sha" ]]; then
84+
_sha=$(git rev-parse HEAD)
85+
fi
86+
87+
if [[ -n "$(git status --porcelain)" ]]; then
88+
echo "Warning: working tree has uncommitted changes." >&2
89+
fi
90+
91+
_repo=$(gh repo view --json nameWithOwner -q .nameWithOwner)
92+
93+
if ! gh api "repos/$_repo/commits/$_sha" >/dev/null 2>&1; then
94+
echo "Commit $_sha was not found on $_repo. Push it first:" >&2
95+
echo " git push" >&2
96+
exit 1
97+
fi
98+
99+
_body=$(printf '@JuliaRegistrator register\n\nRelease notes:\n\n%s\n' "$_notes")
100+
101+
echo "Repository: $_repo"
102+
echo "Version: v$_version"
103+
echo "Commit: $_sha"
104+
echo
105+
echo "Release notes:"
106+
echo "--------------------------------------------------------------------------"
107+
echo "$_notes"
108+
echo "--------------------------------------------------------------------------"
109+
110+
if [[ "$_dry_run" == true ]]; then
111+
echo
112+
echo "Dry run: no comment posted."
113+
exit 0
114+
fi
115+
116+
if [[ "$_assume_yes" != true ]]; then
117+
echo
118+
read -r -p "Post this comment and trigger JuliaRegistrator? [y/N] " _reply
119+
if [[ ! "$_reply" =~ ^[Yy]$ ]]; then
120+
echo "Aborted."
121+
exit 1
122+
fi
123+
fi
124+
125+
_url=$(gh api "repos/$_repo/commits/$_sha/comments" -f body="$_body" -q .html_url)
126+
127+
echo
128+
echo "Posted: $_url"
129+
echo "JuliaRegistrator will open a PR to the General registry shortly."

0 commit comments

Comments
 (0)