Skip to content

ci(release): automate per-package releases with generated notes - #773

Closed
masquare wants to merge 13 commits into
mainfrom
chore/release-automation
Closed

masquare wants to merge 13 commits into
mainfrom
chore/release-automation

Conversation

@masquare

@masquare masquare commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Automates releases of timenet and timenet-connectors. Each package has its own version and its own tag, <package>-vX.Y.Z. Release notes are generated, a PyPI publish run is started for approval, and main moves to the next development version.

How a release works:

  1. An admin or maintainer runs Actions → Release on main and picks both, timenet or timenet-connectors. Leave the version empty to compute it from the commits since the package's last tag (feat bumps the minor, fix the patch). The workflow opens chore(release): <package> <version>. It sets the version, raises the timenet[build] floor of connectors when both are released, re-locks, and puts the notes in the PR body. When only one package is released, the PR warns if the other package has changes that the release leaves out.
  2. Merging that PR builds the wheel and the sdist of each released package and smoke-tests them (imports, and the commit recorded in each file). Then it tags each package, creates a GitHub release per package with its two files attached, and starts a TestPyPI run of publish.yml, which waits for approval in the pypi environment. It also opens chore: start <package> <next> development, which moves the released packages to X.(Y+1).0.dev0.
  3. Approve the TestPyPI run. After it uploads, it starts the PyPI run for the same tag, which also waits for approval. Check TestPyPI, approve the PyPI run, and merge the development-version PR.

Release notes:

  • timenet: git-cliff over the commits that touched packages/timenet, grouped by type, breaking changes first, PRs linked, with a PyPI badge (cliff.toml).
  • timenet-connectors: .github/scripts/connector_notes.py lists the connectors added, changed or removed (matched by dataset_id), and the shared connector code changes. Core PRs that edited connector files on the way are left to the timenet notes.

Changes to publish.yml:

  • It no longer builds. It takes a <package>-vX.Y.Z tag on main (ref is required now), downloads the files of that GitHub release, checks that they are exactly one wheel and one sdist per package at the tagged version, and uploads them. PyPI gets byte-for-byte the files that are on the GitHub release and on TestPyPI.
  • Each published package's tag must point at the checked-out commit.
  • After a successful TestPyPI upload, it starts the PyPI run for the same tag.
  • Building a branch and publishing it to TestPyPI is no longer possible from this workflow.

Safety:

  • Only admins and maintainers can start a release, merge a release PR with effect, or re-run a job (checked through the collaborator permission API).
  • Every job can be re-run. Tags, releases, PRs and publish runs that already exist are skipped.
  • Release and development-version PRs are opened by the timenet-release GitHub App (RELEASE_APP_ID, RELEASE_APP_PRIVATE_KEY), so CI runs on them.

Tested end to end in a sandbox copy of the repo with dummy package names on TestPyPI: a release of only timenet, only connectors, and both; re-runs; an existing version; the connector notes with an added connector, a changed connector, a framework fix, and a core change that is left out. actionlint and the pre-commit hooks pass.

Example notes, generated from this branch for the first release:

timenet 0.12.0 (116 entries)

timenet 0.12.0

Features

  • Breaking: manifest: Record TimeNet git provenance in each written dataset (#684)
  • Breaking: hints: Give every error one hint for the SDK and one for the CLI (#698)
  • Breaking: cache: Record where each release in the local registry comes from (#674)
  • Breaking: client: List and search every source (#673)
  • Breaking: client: Replace get() with get_manifest() and get_card() (#672)
  • Breaking: build: Build into the local registry, publish with --publish-to (#671)
  • Breaking: Add timenet.build() and publish() (#670)
  • Breaking: cli: Take --local-registry, --remote-registry and --auto-build (#669)
  • Breaking: config: Make the default list of sources from three variables (#668)
  • Breaking: client: Download releases into the local registry (#662)
  • Breaking: client: Take an ordered list of sources (#661)
  • Breaking: client: Read releases through the coordinator (#660)
  • Breaking: coordinator: Plan and run reads through the list of sources (#659)
  • Breaking: coordinator: Plan parents through an ordered list of sources (#658)
  • Breaking: sources: Resolve a release through an ordered list of sources (#657)
  • Breaking: build: Run every build through the coordinator (#655)
  • Breaking: build: Move the build CLI and build() onto the coordinator (#654)
  • Breaking: build: Build one prepared release in the built-in backend (#653)
  • Breaking: coordinator: Plan and run builds through build_release (#652)
  • Breaking: registry: Copy a release between registries (#649)
  • Breaking: registry: Publish a local release with put_release (#648)
  • Breaking: types: Require a label set on classification tasks and remove target_schema (#664)
  • Breaking: format: Give classification tasks a shared label set (#643)
  • Breaking: build: Expose parent preparation in the CLI and builder (#540)
  • Breaking: build: Plan and prepare exact parent releases (#541)
  • Breaking: dataset: Import single Signals into partial copies (#497)
  • Breaking: client: Open datasets as lazy readers and load them whole (#520)
  • Breaking: reader: Read objects by ID with typed get and get_many (#496)
  • Breaking: storage: Share payloads through prepared dataset releases (#494)
  • Breaking: storage: Store irregular time offsets in Parquet payloads (#561)
  • Breaking: storage: Pack large text values in Parquet payloads (#560)
  • Breaking: dataset: Hold signal values behind array handles (#586)
  • Breaking: types: Give text values an explicit read interface (#574)
  • Breaking: Make entity ids int64 and number them per dataset (#523)
  • Breaking: types: Spell the OTHER license value in uppercase (#579)
  • Breaking: tasks: Partition tasks into train, validation, and test splits (#398)
  • Breaking: annotations: Make the owner define time annotation scope (#394)
  • Breaking: timef: Store shared Record origins (#389)
  • Breaking: timef: Add offsets to regular time axes (#393)
  • Breaking: tasks: Infer and store task input modalities (#377)
  • format: Add LazyText handles and pack them whatever their size (#656)
  • dataset: Add Signal.is_selected_by, overlaps_with, is_ordinal and slice (#636)
  • connectors: Add reusable PTB-XL recordings (#499)
  • reader: Stream records in batches with a load plan (#532)
  • registry: Prepare payload sources for SDK reads (#542)
  • build: Open declared parents during composition (#539)
  • dataset: Preserve imports through edits (#530)
  • dataset: Resolve the annotations that imported tasks reference (#529)
  • dataset: Import tasks and their dependencies (#606)
  • dataset: Import parent records and metadata (#605)
  • reader: Load values at read time with load plans (#519)
  • format: Let stored value handles keep loaded values (#602)
  • format: Reference exact parent releases by input alias (#512)
  • types: Add a NONE license (#578)
  • dataset: Add basic validation for irregular signals
  • types: Add industrial domain and define every domain (#567)
  • types: Add Hippocratic 3.0 license support (#516)
  • types: Define shared ObjectKind tags (#517)
  • dataset: Select multiple task splits in one call (#447)
  • timef: Distinguish unknown signal units (#390)
  • tasks: Filter tasks by resolved input modalities (#386)

Bug fixes

  • Breaking: reader: Close catalog connections before a fork (#597)
  • Breaking: torch: Reject missing values instead of filling zeros (#583)
  • registry: Retry rate-limited presigns during parallel downloads (#747)
  • dataset: Make Signal's new docstrings pass ruff 0.17.3 (#645)
  • dataset: Count the Records behind a task's Signals (#589)
  • values: Read Zarr values into buffers of their own (#599)
  • deps: Require DuckDB 1.5.6 to fix the audit's window race (#604)
  • types: Drop Hippocratic-3.0 and enforce canonical SPDX license ids (#543)
  • format: Store annotation descriptions separately (#458)
  • types: Pickle TimeF models through their wire form (#423)
  • tasks: Align record filters and reuse selected rows (#397)

Performance

  • reader: Read imported records in storage order (#531)
  • reader: Cache common modality and metadata checks (#518)
  • dataset: Retain NumPy buffers until Arrow is requested (#581)
  • storage: Store irregular axes once (#401)

Refactoring

  • Breaking: coordinator: Name the plan step type Step (#651)
  • Breaking: build: Let the connector choose the values backend (#646)
  • Breaking: reader: Build each task-stream batch on its own (#601)
  • Breaking: reader: Build new objects on every read (#600)
  • Breaking: format: Rename input aliases to parent aliases (#595)
  • Breaking: format: Key the hierarchy tables by ids (#527)
  • Breaking: format: Key tasks and their references by public ids (#526)
  • Breaking: format: Annotations referenced by id instead of extra key (#525)
  • Breaking: Drop ids from sources, axes and annotations (#573)
  • Breaking: Derive a record's tasks instead of storing Record.task_ids (#572)
  • Breaking: Let spans reference signals as objects (#571)
  • Breaking: Rename Record.record_id to Record.id (#544)
  • Breaking: format: Drop unread time_series_id from Parquet shards (#522)
  • Breaking: dataset: Drop register_annotations (#464)
  • Breaking: dataset: Drop Signal.source_id (#463)
  • Breaking: dataset: Store subject IDs as record annotations (#448)
  • reader: Read records in separate steps (#598)
  • reader: Describe catalog reads as building objects (#596)
  • storage: Simplify Signal Parquet caching (#559)
  • dataset: Introduce a common values loader interface (#585)
  • dataset: Select full validation with a boolean flag (#580)
  • format: Name hierarchy row queries and indexes (#549)
  • storage: Represent stored chunks with a dataclass (#538)
  • format: Describe task target rows with a TypedDict (#537)
  • format: Define annotation value kinds with an enum (#536)
  • format: Define task target kinds with an enum (#535)
  • registry: Validate API payloads with pydantic (#421)
  • types: Validate JSON metadata with pydantic (#420)
  • schemas: Generate JSON schemas from pydantic models (#419)
  • manifest: Replace handwritten wire validation with pydantic (#418)
  • metadata: Validate dataset metadata with Pydantic (#417)
  • dataset: Move span checks into a shared module (#391)

Documentation

  • Add a Sources page and stop presenting ids as user-facing (#591)

Maintenance

  • Isolate every test from the real home and guard it (#667)
  • deps: Bump ruff to 0.17.3 (#642)
  • deps: Bump ty to 0.0.92 (#588)
  • Find objects through the dataset instead of fixed ids (#546)
  • Derive shared fixture expectations from source objects (#551)
  • format: Derive Arrow view expectations from fixture objects (#550)

Other

  • Feature/missing values spec (#703)
timenet-connectors 0.12.0 (26 entries)

timenet-connectors 0.12.0

Added connectors

  • SensorCaps (bash-lab/sensorcaps): #511
  • ARFBench (datadog/arfbench): #615
  • ARFBench charts (datadog/arfbench-charts): #769
  • HAR-CoT (opentslm/har-cot): #687
  • SleepEDF-CoT (opentslm/sleep-cot): #688
  • PTB-XL (physionet/ptb-xl): #499
  • TSAQA (tsaqa/tsaqa-benchmark): #638

Changed connectors

  • TSQA (chengsenwang/tsqa): #568
  • ECG-QA CoT (physionet/ecg-qa-cot): #612, #500, #682, #693
  • Sleep-EDF Expanded (physionet/sleep-edfx): #644, #693
  • Test Mean (timenet/test-mean): #644

Connector framework

  • Breaking: connectors: Pin Hub sources to a commit and fetch files in parallel (#568)
  • connectors: Share pinned Hugging Face source helpers (#387)
  • connectors: Represent images as signals (#388)
  • connectors: Share exact relative time-axis conversion (#395)
  • connectors: Mark image signals with the image modality (#402)
  • connectors: Add reusable stratified dataset splitting (#451)
  • connectors: Add a shared streaming JSON reader (#576)
  • connectors: Compose ECG-QA from PTB-XL (#500)
  • connectors: Pin sha256 digests for PhysioNet connector sources (#693)
  • connectors: Add a Hub helper that downloads a snapshot by file patterns (#715)
  • sources: Define validated row reader base (#751)
  • sources: Read validated CSV rows (#752)
  • sources: Read validated Parquet rows (#753)
  • sources: Read validated JSON and JSON Lines rows (#754)
  • connectors: Let a Hub connector declare a source part by file pattern (#770)

The first release starts from the legacy v0.11.0 tag and gives timenet 0.12.0 and timenet-connectors 0.12.0.

@masquare masquare changed the title ci(release): automate releases with generated notes and next dev version ci(release): automate per-package releases with generated notes Nov 11, 2026
@masquare
masquare marked this pull request as ready for review November 11, 2026 12:29
@masquare
masquare requested a review from karhu November 11, 2026 12:29
@masquare
masquare marked this pull request as draft November 11, 2026 12:30
@masquare
masquare removed the request for review from karhu November 11, 2026 12:30
@github-actions

Copy link
Copy Markdown

⚠️ CI checks failed

Check Status
Quick checks ✅ Passed
Tests (Python 3.13) ⏭️ Did not run
Tests (Python 3.11) ⏭️ Did not run

Full output is in the job logs. Reproduce locally:

make lint-fix   # auto-fix
make check-ci   # the hooks, plus ty on 3.13 and 3.11
make test-unit  # the quick job's tests
make test       # the full suite

Updated for 1841a6c · run #8393

@karhu karhu added the area:ci Changes .github/, the Makefile or release tooling label Nov 12, 2026
@masquare

Copy link
Copy Markdown
Contributor Author

Superseded by the stacked PRs #781 to #785. Closing in favour of the stack.

@masquare masquare closed this Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci Changes .github/, the Makefile or release tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants