Repository navigation
feat(client)!: take an ordered list of sources - #661
Merged
Merged
Conversation
This was referenced Nov 4, 2026
karhu
force-pushed
the
tnet-157/13-sources-list
branch
from
November 4, 2026 14:58
55121c9 to
3e39b6d
Compare
karhu
force-pushed
the
tnet-157/13-sources-list
branch
from
November 4, 2026 15:27
3e39b6d to
3e51550
Compare
karhu
force-pushed
the
tnet-157/13-sources-list
branch
from
November 4, 2026 15:31
3e51550 to
580bfa5
Compare
karhu
force-pushed
the
tnet-157/13-sources-list
branch
from
November 4, 2026 20:02
580bfa5 to
8ffd982
Compare
This was referenced Nov 4, 2026
karhu
force-pushed
the
tnet-157/13-sources-list
branch
from
November 7, 2026 13:26
4c08556 to
6795b03
Compare
TimoStoff
approved these changes
Nov 7, 2026
karhu
force-pushed
the
tnet-157/13-sources-list
branch
from
November 7, 2026 15:20
6795b03 to
83a1832
Compare
karhu
force-pushed
the
tnet-157/13-sources-list
branch
from
November 7, 2026 16:27
83a1832 to
a8841fd
Compare
karhu
force-pushed
the
tnet-157/13-sources-list
branch
from
November 7, 2026 17:40
a8841fd to
40c59e1
Compare
karhu
force-pushed
the
tnet-157/13-sources-list
branch
2 times, most recently
from
November 9, 2026 13:56
369567b to
b75d11d
Compare
karhu
force-pushed
the
tnet-157/13-sources-list
branch
from
November 10, 2026 14:39
b75d11d to
c49ced9
Compare
karhu
force-pushed
the
tnet-157/13-sources-list
branch
from
November 10, 2026 15:50
c49ced9 to
bbe936d
Compare
karhu
force-pushed
the
tnet-157/13-sources-list
branch
from
November 10, 2026 16:24
bbe936d to
e60394d
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 client now takes one ordered list of sources as TimeNet(sources=[...]). An item is a registry, InstalledConnectors(), or a string or Path that open_registry() opens. A bare string or Path, an empty list and an item of another type raise TimeFValidationError. A string that names no registry raises TimeNetRegistryError, which names the item, such as sources[0]. Every registry takes read_only=False, and the property read_only reads the flag. A read-only registry refuses each write with TimeNetRegistryError: put_dataset(), put_release(), a copy into it, and a run of a plan that copies or builds into it. Builds land in the first LocalRegistry of the list that is not read-only. A string or Path in the list opens a writable LocalRegistry. The client only reads a later writable local registry. A list with InstalledConnectors() needs a writable local registry, else TimeNet() raises TimeFValidationError. default_sources() makes the list of TimeNet(): the local registry at <TIMENET_HOME>/registry, then timenet://, then InstalledConnectors(). A registry URL in TIMENET_REGISTRY takes the place of timenet://. A local path in TIMENET_REGISTRY is the local registry, and the list then has no other registry. The remote_registry argument puts a registry after the local registry. open(), load() and open_torch() pass the list and that local registry to read_release(). The fetch_from= and auto_build= keywords go away, and so do _read_sources() and _missing_hint(). If no source provides a release, the hint asks for a registry that holds it. If the list has no InstalledConnectors(), the hint also names it. An access error names InstalledConnectors() and timenet-build build as the ways to build the release locally. get(), list(), search() and download() still ask one registry. _catalog() picks the first registry of the list that is not that local registry, else that local registry. download() still copies into TIMENET_STORAGE. Each command of the consumer CLI builds its client from default_sources(), and --registry becomes the remote_registry argument. timenet_connectors.load() reads with TimeNet().load(), because its build already put each parent and payload source into the local registry of the default list. open_registry() is now the one parser of a registry value. It raises TimeNetRegistryError, not ValueError, and it rejects a blank value instead of opening the current directory. Its label argument names the value in the error. open_writable_registry() goes away, because every registry is writable. timenet info and timenet download drop --version, because org/name@version names a version. The examples show the list of sources. BREAKING CHANGE: TimeNet takes sources= instead of registry= and storage_path=. open(), load() and open_torch() no longer take fetch_from= and auto_build=. The default client also reads the local registry and builds with installed connectors. timenet download no longer takes --storage. open_registry() raises TimeNetRegistryError, not ValueError, and rejects a blank value. open_writable_registry() is gone. timenet info and timenet download no longer take --version: use org/name@version. Part of TNET-157.
The glue comments of this change now start with TODO(adrian), so a search finds each one that is left. Part of TNET-157.
Say only what a caller of TimeNet(sources=...) and its store needs to know. 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/13-sources-list
branch
from
November 10, 2026 17:41
e60394d to
5e0655a
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 client takes one ordered list of sources,
TimeNet(sources=[...]), instead of a registry and thefetch_from=andauto_build=keywords.Details
#660 reads through the read coordinator with a thin mapping of the old keywords onto a list. This PR makes the list the public interface and removes the mapping.
TimeNet(sources=[...])takes registries,InstalledConnectors(), and strings or paths thatopen_registry()opens.LocalRegistrytakesread_only=True. Builds land in the firstLocalRegistryof the list without it, the store.InstalledConnectors()needs such a registry.open_registry()is the one parser of a registry value. A blank value, an unknown scheme, afile://URI with a host and atimenet://URI with a path raiseTimeNetRegistryError. The message names the value by its label, for examplesources[1].local_registry_path()uses the same messages.open_writable_registry()goes away, becauseopen_registry()returns aWritableRegistry.timenet.client.default_sources()makes the list ofTimeNet(): the store at<TIMENET_HOME>/registry, thentimenet://, thenInstalledConnectors(). A registry URL inTIMENET_REGISTRYtakes the place oftimenet://. A local path inTIMENET_REGISTRYis the store, and the list then has no other registry.open(),load()andopen_torch()pass the list and the store toread_release(). The hints depend on the list. For a release that no source provides, the hint asks for a registry that holds it. Only a list withoutInstalledConnectors()gets a hint that names it.get(),list(),search()anddownload()still ask one registry: the first registry of the list that is not the store, else the store.default_sources(), and--registrynames the registry that the command reads.timenet infoandtimenet downloadtakeorg/name@versionand no--version.timenet_connectors.load()reads withTimeNet().load().Design decisions
TimeFValidationError: a bare string or path, an empty list, an item of another type, andInstalledConnectors()without a writable local registry. Each message shows the call that works, for examplesources=['<path>'].Sequence, so the client checks for a string or path before it treats the value as a list. Without that check,TimeNet(".timenet-registry")takes one source per character.InstalledConnectors()never builds, also for a newer version that a connector declares.str()of a store stays "local registry ", so error messages do not change.Breaking changes
TimeNettakessources=instead ofregistry=andstorage_path=.open(),load()andopen_torch()no longer takefetch_from=andauto_build=.timenet downloadno longer takes--storage.open_registry()raisesTimeNetRegistryError, notValueError, and rejects a blank value.open_writable_registry()is gone. Useopen_registry().timenet infoandtimenet downloadno longer take--version. Useorg/name@version.Stack
Changes later in the stack:
_catalog()forget(),list()andsearch(), the interimdownload(), the body ofdefault_sources()and the--registrymapping are thin glue. The next PR movesdownload()into the store. The PRs on defaults and on inspection replace the rest.Merge message