Timenet.config
timenet.config ¶source
Load TimeNet settings from arguments and TIMENET_* environment variables.
Explicit values override environment variables, which override defaults.
TimeNetSettings ¶source
Bases: BaseSettings
TimeNet settings from arguments, TIMENET_* environment variables, and an optional .env file.
auto_build
class-attribute
instance-attribute
¶source
auto_build: bool = True
Whether default sources include installed connectors (TIMENET_AUTO_BUILD).
cache
class-attribute
instance-attribute
¶source
cache: str = '~/.cache/timenet'
The cache directory for raw downloads and control databases (TIMENET_CACHE).
control_cache_dir
property
¶source
control_cache_dir: Path
Where verified remote control databases are cached by checksum.
downloads_dir
property
¶source
downloads_dir: Path
The raw download cache directory, with a subdirectory for each dataset ID.
isolation
class-attribute
instance-attribute
¶source
isolation: Literal['on', 'off'] = 'on'
Whether a build runs in an environment built from the connector's requirements.
"off" runs it in the current interpreter. The isolated child sets this to "off" in its own
environment, which is what stops it re-execing forever.
local_registry
class-attribute
instance-attribute
¶source
local_registry: str = '~/.timenet/registry'
The local registry path or file:// URI (TIMENET_LOCAL_REGISTRY).
local_registry_dir
property
¶source
local_registry_dir: Path
The local registry directory with ~ expanded.
Raises:
| Type | Description |
|---|---|
TimeNetRegistryError
|
If the local registry path is blank, remote or uses an invalid URI. |
make_cache_folder ¶source
make_cache_folder(folder: Path) -> None
Create a cache folder with TimeNet's CACHEDIR.TAG marker.
Existing folders stay unchanged.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
folder
|
Path
|
The cache folder to create along with any missing parents. |
required |
settings ¶source
settings(**overrides: Any) -> TimeNetSettings
Load and validate the TimeNet settings.
Overrides other than None take precedence over environment variables and defaults.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**overrides
|
Any
|
Values by field name, with |
{}
|
Returns:
| Type | Description |
|---|---|
TimeNetSettings
|
The validated settings. |
Raises:
| Type | Description |
|---|---|
TimeFValidationError
|
If a value is invalid. |