Skip to content

feat(build)!: build into the local registry, publish with --publish-to - #671

Merged
karhu merged 3 commits into
tnet-157/17-producer-apifrom
tnet-157/18-build-publish
Nov 10, 2026
Merged

karhu merged 3 commits into
tnet-157/17-producer-apifrom
tnet-157/18-build-publish

Conversation

@karhu

@karhu karhu commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

The Stack

This stack covers refactoring the internal logic of how releases are resolved during read, download & build, in particular also in the context of parent releases / parent datasets. On top of that it refactors the public TimeNet APIs and CLI interfaces around these actions, to streamline the behavior across them.

This PR

timenet-build build always builds into the store, takes its parents from the default list of sources, and publishes with --publish-to. It prints its plan first and stops after the plan with --dry-run.

Details

timenet-build build had its own flags for where a build lands and where its parents come from: --out, --fetch-from and --build-parents. The other entry points take the default list of sources instead. So the same build needs other inputs on the command line than in Python.

  • The build lands in the store. Missing parents and payload sources come from the default list: the remote registry, then the installed connectors. --local-registry, --remote-registry and --auto-build/--no-auto-build set that list for one command. The connector of the requested dataset builds it also with --no-auto-build.
  • --publish-to URL publishes the release after the build with timenet.publish(), and the command prints the version.
  • The command plans with plan_release_build() of the coordinator, runs the plan, and prints the release directory.
  • The plan goes to stderr before the first step, as a tree. The requested release is at the top, and below each release are the releases that it needs. Each line names the release, the action and the source. --quiet hides the plan.
  • --dry-run prints the tree to stdout and stops. It copies, builds and publishes nothing, and it makes no store directory.
  • The hints name the new flags. A damaged copy points to timenet download or a forced rebuild. If the command got --local-registry or --remote-registry, the hint repeats them.
  • The example uses the new flags.
  • Size: about 830 changed lines. The new flags, the plan output and --dry-run share one code path in the command, so they read best together.

Design decisions

  • The command prints the plan that it then runs, so the printed plan and the run cannot differ.
  • A test makes sure that --dry-run prints the exact plan and copies, builds and publishes nothing.
  • The plan goes to stderr and the dry run to stdout. A script can read the dry run, and a normal run keeps stdout for the release directory.
  • The command reads the default list before it opens --publish-to. A registry reads the settings when it opens. Otherwise an invalid variable shows as an invalid value of --publish-to.
  • The destination is not a source of parents, because a published release is a result and not an input.
  • If the destination holds the version, nothing runs. With --force, the release builds again in the store only, and the publish copies nothing for the same release. The publish refuses other files or another card.
  • A destination that is not local makes the plan refuse a release that is not open, before any download.
  • An empty --publish-to, or one that names no registry, raises TimeNetRegistryError before any build. It never means the current directory.

Breaking changes

  • timenet-build build drops --out, --fetch-from and --build-parents.
  • Every build lands in the store.
  • Missing parents come from the default list: the remote registry, then the installed connectors.
  • The destination of --publish-to is no source of parents.
  • --force with a --publish-to that holds the version rebuilds into the store, and the publish refuses other files.

Stack

Changes later in the stack:

Merge message

feat(build)!: build into the local registry, publish with --publish-to

timenet-build build always builds into the local registry and takes
its parents from the default list of sources, as the Python API does.
It publishes with --publish-to.

- --local-registry, --remote-registry and --auto-build/--no-auto-build
  set the list for one command. The connector of the requested dataset
  builds it also with --no-auto-build.
- The command prints the plan that it runs as a tree on stderr before
  the first step. --dry-run prints the tree on stdout and stops.
- If the destination already holds the version, nothing runs unless
  --force is set. A destination that requires open access makes the
  plan refuse other releases before any download.
- The destination is no source of parents, because a published
  release is a result.

BREAKING CHANGE: timenet-build build loses --out, --fetch-from and
--build-parents. Every build lands in the local registry, and missing
parents come from the remote registry, then the installed connectors.

@karhu
karhu added this pull request to stack #650 November 4, 2026 20:04
This was referenced Nov 4, 2026
@karhu
karhu force-pushed the tnet-157/18-build-publish branch 2 times, most recently from 58998a5 to d4951ad Compare November 5, 2026 07:27
@karhu
karhu force-pushed the tnet-157/18-build-publish branch from d4951ad to a72348c Compare November 5, 2026 08:16
@karhu
karhu force-pushed the tnet-157/18-build-publish branch from a72348c to f3e549b Compare November 5, 2026 10:57

@TimoStoff TimoStoff left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK ....thats it for today I think 😓

@karhu
karhu force-pushed the tnet-157/18-build-publish branch from 0e6ea4e to 8e1c0a6 Compare November 7, 2026 17:40
@karhu
karhu force-pushed the tnet-157/18-build-publish branch from 8e1c0a6 to ce3ea14 Compare November 7, 2026 20:26
@karhu
karhu force-pushed the tnet-157/18-build-publish branch from ce3ea14 to 57e94d9 Compare November 7, 2026 22:40
@karhu karhu changed the title feat(build)!: build into the store, publish with --publish-to feat(build)!: build into the local registry, publish with --publish-to Nov 9, 2026
@karhu
karhu force-pushed the tnet-157/18-build-publish branch from 57e94d9 to 042ad49 Compare November 9, 2026 13:56
@karhu
karhu force-pushed the tnet-157/18-build-publish branch from 042ad49 to 0293b99 Compare November 9, 2026 16:18
@karhu
karhu force-pushed the tnet-157/18-build-publish branch from 0293b99 to e204350 Compare November 10, 2026 14:39

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review found no issues

No high-confidence issues detected in this change.

@karhu
karhu force-pushed the tnet-157/18-build-publish branch from e204350 to deb03f9 Compare November 10, 2026 15:50
@karhu
karhu removed this pull request from stack #699 November 10, 2026 15:58

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 optional suggestion (a nit or a note on pre-existing code) was found and not posted.

@karhu
karhu force-pushed the tnet-157/18-build-publish branch from deb03f9 to efe5771 Compare November 10, 2026 16:24
@karhu
karhu added this pull request to stack #772 November 10, 2026 16:24

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review found no new issues

No new issues were found in this update; 1 finding from earlier reviews is still open above.

1 optional suggestion (a nit or a note on pre-existing code) was found and not posted.

Still open from earlier reviews (1):

If you have decided not to act on one of these findings, resolve its thread (a reply alone leaves it open) and the next review stops counting it. To review this commit again now, use Re-run on its "Claude Code Review" check.

timenet-build build had its own flags for where a build lands and
where its parents come from: --out, --fetch-from and --build-parents.
The other entry points take the default list of sources instead, so
the same build could need other inputs on the command line than in
Python.

The build now always lands in the local registry. Missing parents and
payload sources come from the default list: the remote registry, then
the installed connectors. --local-registry, --remote-registry and
--auto-build/--no-auto-build set that list for one command.

--publish-to URL|PATH publishes the release after the build with
timenet.publish(), which gets the exact release and so reads no
manifest to find it. The destination is not a source of parents. An
empty --publish-to is an error, not the current directory.

The command shows its plan on stderr before the first step, as a tree.
--dry-run prints the tree to stdout and stops. It copies, builds and
publishes nothing. --quiet hides the plan. The command plans with the
same internal planner and the same whole list of sources as
timenet.build(), so the dry run shows the plan that a run runs.

The hints and the tests name the new flags.

BREAKING CHANGE: timenet-build build drops --out, --fetch-from and
--build-parents. The build lands in the local registry, and missing
parents come from the default list. --publish-to publishes the release
afterwards. --force with a --publish-to that holds the version rebuilds
into the local registry, and the publish refuses other files.

Part of TNET-157.
Shorter docstrings for the code that this change adds or changes.

Part of TNET-157.
Drop tests that cannot fail or repeat other tests, and sharpen the rest.

Part of TNET-157.
@karhu
karhu force-pushed the tnet-157/18-build-publish branch from efe5771 to f17c8ae Compare November 10, 2026 17:41
@karhu
karhu merged commit f41fb1d into main Nov 10, 2026
4 of 8 checks passed
@karhu
karhu deleted the tnet-157/18-build-publish branch November 10, 2026 18:24
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.

2 participants