Repository navigation
feat!: add timenet.build() and publish() - #670
Merged
Merged
Conversation
This was referenced Nov 4, 2026
karhu
force-pushed
the
tnet-157/17-producer-api
branch
from
November 5, 2026 07:24
17d6e02 to
c857696
Compare
karhu
force-pushed
the
tnet-157/17-producer-api
branch
3 times, most recently
from
November 5, 2026 10:57
86f5f9c to
61cc2df
Compare
karhu
force-pushed
the
tnet-157/17-producer-api
branch
from
November 5, 2026 14:05
61cc2df to
781ecd0
Compare
karhu
force-pushed
the
tnet-157/17-producer-api
branch
from
November 7, 2026 15:20
711597e to
7de08e6
Compare
TimoStoff
approved these changes
Nov 7, 2026
karhu
force-pushed
the
tnet-157/17-producer-api
branch
from
November 7, 2026 16:27
7de08e6 to
1d8c4a6
Compare
karhu
force-pushed
the
tnet-157/17-producer-api
branch
from
November 7, 2026 17:40
1d8c4a6 to
23a054c
Compare
karhu
force-pushed
the
tnet-157/17-producer-api
branch
from
November 7, 2026 20:26
23a054c to
254a1e4
Compare
karhu
force-pushed
the
tnet-157/17-producer-api
branch
from
November 7, 2026 22:40
254a1e4 to
ce19919
Compare
karhu
force-pushed
the
tnet-157/17-producer-api
branch
from
November 9, 2026 13:56
ce19919 to
a4a77e0
Compare
karhu
force-pushed
the
tnet-157/17-producer-api
branch
2 times, most recently
from
November 10, 2026 14:39
894c7a8 to
e658cb5
Compare
karhu
force-pushed
the
tnet-157/17-producer-api
branch
from
November 10, 2026 15:50
e658cb5 to
5b98f35
Compare
karhu
force-pushed
the
tnet-157/17-producer-api
branch
from
November 10, 2026 16:24
5b98f35 to
b6c45e5
Compare
There was a problem hiding this comment.
An organization admin can review the limit in your organization's usage and billing settings.
Once the limit resets or is raised, someone with write access to this repository can comment @claude review on this pull request to trigger a review.
A build from Python went through timenet_connectors.build(). It took fetch_from and build_parents instead of a list of sources, and it wrote to the local registry only through glue. Publishing a release had no function of its own. Only the build CLI copied a release to a remote --out. The shell had no command to copy a release out of the local registry. The new module timenet.producer adds build() and publish(). The timenet package exports them, together with TimeNet, LocalRegistry and InstalledConnectors, and loads each on first use. The plan and its steps stay internal. build() builds a release into the local registry and returns its directory, like TimeNet.download(). Missing parents and payload sources come from sources, the same name as in TimeNet. Without sources, the build takes the whole default list, and the planner leaves the local registry out of the sources of its copies and builds. With open_access_only=True, build() refuses a plan that needs a release without open access, before any step runs. publish() takes a dataset ID or an exact DatasetRef, which needs no lookup in the source. It copies a complete release and its payload sources to dest. A published version cannot change, so other files in dest raise TimeNetVersionConflictError. The defaults of build() come from the environment at call time. A local_registry that is remote or read-only raises TimeFValidationError, which points to publish(). timenet publish DATASET --dest URL|PATH copies a release with publish(). The release comes from the local registry or from the registry of --source. An empty --dest is an error, not the current directory. timenet_connectors.build() and load() are gone, with their glue. The tests, the example and the API reference use the new names. BREAKING CHANGE: timenet_connectors.build() and timenet_connectors.load() are gone. Build with timenet.build() and read with TimeNet().load(). 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
force-pushed
the
tnet-157/17-producer-api
branch
from
November 10, 2026 17:41
b6c45e5 to
f2b6dcf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
The new module
timenet.produceraddstimenet.build()andtimenet.publish(), and the shell getstimenet publish.timenet_connectors.build()andload()are gone.Details
A build from Python went through
timenet_connectors.build(). It tookfetch_fromandbuild_parentsinstead of a list of sources, and it wrote to the store only through glue. Publishing a release had no function of its own, and only the build CLI copied a release to a remote--out.build()builds a release into a writable local registry with the installed connector that claims it, and returns the release directory. Missing parents and payload sources come fromsources.build()takesopen_access_only. If it is set, a plan that needs a release without open access raisesTimeNetAccessErrorbefore any step runs.publish()copies a complete release and the payload sources that its manifest lists from a registry, by default the store, todest. It returns the release that it copied.build()come from the environment at call time.local_registryisTIMENET_LOCAL_REGISTRY, andsourcesis the default list. Withsources, the sources come only from the argument.timenet publish DATASET --dest URLcopies a release withtimenet.publish(). The release comes from the store, or from the registry that--sourcenames.--destraisesTimeNetRegistryError, andtimenet publishwrites nothing. It never means the current directory.as_release_sources()checks and opens the lists ofTimeNet(sources=...)and of thesourcesofbuild(). Each message names its argument.timenetimports nothing fromtimenet_connectors, and the two functions load on first use. A ruff rule checks the first, and a subprocess test checks the second.timenetalso exportsTimeNet,LocalRegistryandInstalledConnectors. They load on first use too, soimport timenetis enough to make a client with its sources.timenet_connectors.build()andload()are gone, with their hint and the glue that wrote to the store. The tests, the example and the API reference use the new names.Design decisions
local_registrythat is remote or read-only raisesTimeFValidationError, because a build always lands in a writable local registry. A blank value or an unknown scheme raisesTimeNetRegistryError.publish()never changes a published version. Other files or another card indestraiseTimeNetVersionConflictError, and the same release copies nothing.publish()reads "latest" from the source. If the release is missing, the error names the source, so it shows wherepublish()looked.timenet publishtakes the release from the store by default, because a build lands there. If the store lacks it, the error says to runtimenet-build buildortimenet download.Breaking changes
timenet_connectors.build()andtimenet_connectors.load()are gone.Stack
Changes later in the stack:
timenet-build buildstill takes--out,--fetch-fromand--build-parents. A baretimenet-buildandtimenet.build()take their parents from different defaults until the PR ontimenet-build --publish-toreplaces the flags.get(),list()andsearch()still ask one registry through_catalog(). The PRs on inspection and on list and search replace them.Merge message