Repository navigation
feat(client)!: list and search every source - #673
Merged
Merged
Conversation
This was referenced Nov 4, 2026
karhu
force-pushed
the
tnet-157/19b-list-search
branch
2 times, most recently
from
November 5, 2026 07:27
72fff69 to
fb6f19c
Compare
karhu
force-pushed
the
tnet-157/19b-list-search
branch
from
November 5, 2026 08:16
fb6f19c to
e2233ca
Compare
karhu
force-pushed
the
tnet-157/19b-list-search
branch
2 times, most recently
from
November 5, 2026 14:05
1e539c9 to
f72407c
Compare
karhu
force-pushed
the
tnet-157/19b-list-search
branch
from
November 7, 2026 22:40
8f27f7d to
011c1cc
Compare
TimoStoff
approved these changes
Nov 9, 2026
TimoStoff
left a comment
Contributor
There was a problem hiding this comment.
OK so accepting to unblock, but I have a design suggestion here I would like you to consider: https://github.com/OpenTSLM/TimeNet/pull/673/changes#r4511197286
Will send in chat too
karhu
force-pushed
the
tnet-157/19b-list-search
branch
2 times, most recently
from
November 9, 2026 11:11
2a8c66c to
9825a06
Compare
karhu
force-pushed
the
tnet-157/19b-list-search
branch
2 times, most recently
from
November 9, 2026 13:56
2025149 to
6499bc5
Compare
karhu
force-pushed
the
tnet-157/19b-list-search
branch
2 times, most recently
from
November 9, 2026 16:18
e423711 to
df3c843
Compare
karhu
force-pushed
the
tnet-157/19b-list-search
branch
from
November 10, 2026 14:39
df3c843 to
054db0a
Compare
karhu
force-pushed
the
tnet-157/19b-list-search
branch
from
November 10, 2026 15:50
054db0a to
c3741e3
Compare
karhu
force-pushed
the
tnet-157/19b-list-search
branch
from
November 10, 2026 16:24
c3741e3 to
2c32cd8
Compare
list() and search() asked one registry of the list: the first registry that is not the local registry. So they missed the releases in the local registry and the datasets that only an installed connector provides, while open() reads all of them. Both methods now ask each source of the list, one after another, in order. A registry answers from its catalog. InstalledConnectors() answers with its new list_datasets(): the card of each installed connector, sorted by dataset ID. If two packages claim an ID, the first entry point wins, as it does for a build. The new builders.claims() applies this rule once, for the build lookup and for the listing. The rows merge by dataset ID at the highest version. If two sources list the same version, the earlier source wins. search() builds one DatasetFilter from its keywords. DatasetFilter is new in timenet.types. It holds each filter as a tuple, and it refuses a negative limit with TimeFValidationError. It matches a card, and for the task and time_series_spec filters it matches a schema. Its select() goes through a list of ListedRelease rows, also new: a card and the registry that lists it. select() checks the card first. Only for a task or time_series_spec filter, and only if the card matches, it reads the schema from the manifest in that registry. It stops at limit matches. search() gives select() the merged rows of list(), so it filters the highest version of each dataset. A task search reads manifests only until it has limit matches over all sources. A connector card has no registry, so it never matches a task or time_series_spec filter. BaseRegistry.search() takes a DatasetFilter in place of the filter keywords. It sorts its catalog by dataset ID and calls select() too. A source tells with has_catalog if it can list. An S3 registry has no catalog, so it sets has_catalog to False. list() and search() leave such a source out with a CatalogWarning that names it. If no source of the list has a catalog, they raise TimeNetNoCatalogError, a new subclass of TimeNetRegistryError. A card that cannot be read is left out with a ConnectorCardWarning. In the SDK, both warnings point at the first caller outside the timenet package. An error of a source stops the call, for example a registry that cannot be reached or an error of dataset_ids() of a backend. _catalog() is gone. timenet list and timenet search keep their flags. Their help, and the line of timenet list for no rows, name the sources. They show each of the two warnings as a warning line on stderr, without a file and a line number. BREAKING CHANGE: TimeNet.list() and TimeNet.search() merge every source of the list, connector cards included, and keep one row per dataset at the highest version. BREAKING CHANGE: BaseRegistry.search() takes a DatasetFilter in place of the filter keywords. A negative limit raises TimeFValidationError in place of ValueError. 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/19b-list-search
branch
from
November 10, 2026 17:41
2c32cd8 to
c2dcb44
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
TimeNet.list()andTimeNet.search()ask every source of the list and merge the rows, so they also show the store and the installed connectors.Details
list()andsearch()asked one registry of the list: the first registry that is not the store. So they missed the releases in the store and the datasets that only an installed connector provides, whileopen()reads all of them.InstalledConnectors()getslist_datasets()andsearch()like a registry, so the client treats every source the same. Its rows are the cards of the installed connectors, sorted by dataset ID. If two packages claim an ID, the first entry point wins, as it does for a build.search()asks each source without a limit. ADatasetFilterintimenet.typesholds the filters of one search. Itsmatches_card()filters the cards, andBaseRegistry.search(filter)takes it too.limitapplies after the merge, and a negativelimitraisesTimeFValidationError.taskortime_series_spec, because both filters read the schema of a manifest. So with one of these filters,search()does not read the cards.CatalogWarning. If no source has a catalog,list()andsearch()raiseTimeNetNoCatalogError. A card that cannot be read is left out with aConnectorCardWarning. An error of a source, for example a registry that cannot be reached, stops the call._catalog()is gone.timenet listandtimenet searchkeep their flags. Their help, and the line oftimenet listfor no rows, name the sources.Design decisions
search()asks registries without a limit, because the limit must apply to the merged rows and not to each source. With ataskortime_series_specfilter, a registry search can therefore cost more.Breaking changes
TimeNet.list()andTimeNet.search()merge every source of the list, connector cards included, and keep one row per dataset at the highest version.BaseRegistry.search()takes aDatasetFilterinstead of filter keywords.list()andsearch()raiseTimeNetNoCatalogError, notNotImplementedError.Stack
Changes later in the stack:
Merge message