Timenet.producer
timenet.producer ¶source
Build dataset releases in a local registry and publish them to other registries.
The default local and remote registries come from TIMENET_LOCAL_REGISTRY and TIMENET_REMOTE_REGISTRY.
TIMENET_AUTO_BUILD controls whether installed connectors supply missing parents by default.
build ¶source
build(
dataset_id: str,
*,
local_registry: str
| Path
| LocalRegistry
| None = None,
sources: Sequence[ReleaseSource | str | Path]
| None = None,
force: bool = False,
open_access_only: bool = False,
keep_cache: bool = False,
progress: ProgressCallback | None = None,
) -> Path
Build a dataset release into a local registry with its installed connector.
Missing parents and payload sources come from the first source in sources that provides them.
The build uses a separate environment with the connector's dependencies unless TIMENET_ISOLATION is off.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dataset_id
|
str
|
The dataset ID ( |
required |
local_registry
|
str | Path | LocalRegistry | None
|
The writable local registry to build into: a |
None
|
sources
|
Sequence[ReleaseSource | str | Path] | None
|
Sources, registry URLs, or paths for missing releases, or |
None
|
force
|
bool
|
Build the release again, even if the local registry holds it. |
False
|
open_access_only
|
bool
|
Require open access for every release before running the plan. |
False
|
keep_cache
|
bool
|
Keep the raw downloads in |
False
|
progress
|
ProgressCallback | None
|
A callback for copy and build progress events. |
None
|
Returns:
| Type | Description |
|---|---|
Path
|
The release directory in the local registry. |
Raises:
| Type | Description |
|---|---|
TimeFValidationError
|
If |
TimeNetRegistryError
|
If a registry in |
TimeNetDatasetNotFoundError
|
If no installed connector builds the dataset. |
TimeNetVersionUnavailableError
|
If the requested version differs from the connector's version. |
TimeNetMissingParentError
|
If no source provides a required parent or payload source. |
TimeNetAccessError
|
If no source grants access to a parent or a release violates |
TimeNetVersionConflictError
|
If a release to copy has other files than the same version in the local registry. |
TimeNetFileError
|
If a stored release is damaged and no registry in |
TimeNetBuildError
|
If a build fails. |
publish ¶source
publish(
dataset_id: str | DatasetRef,
*,
dest: str | Path | WritableRegistry,
source: str | Path | BaseRegistry | None = None,
progress: ProgressCallback | None = None,
) -> DatasetRef
Copy a release and its required payload sources to another registry.
The copy skips identical releases and rejects conflicting files before writing to dest.
It replaces missing or damaged files at a local destination.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dataset_id
|
str | DatasetRef
|
|
required |
dest
|
str | Path | WritableRegistry
|
The registry to copy to, or its URL or path. |
required |
source
|
str | Path | BaseRegistry | None
|
The source registry, URL, or path, or |
None
|
progress
|
ProgressCallback | None
|
A callback for copy progress events. |
None
|
Returns:
| Type | Description |
|---|---|
DatasetRef
|
The ID and version of the release in |
Raises:
| Type | Description |
|---|---|
TimeNetRegistryError
|
If |
TimeNetDatasetNotFoundError
|
If |
TimeNetAccessError
|
If a registry withholds files or requires open access that a copied release lacks. |
TimeNetBuildError
|
If |
TimeNetVersionConflictError
|
If |
TimeNetMissingParentError
|
If a required payload source is missing from |