# Config

## timenet.config

Runtime configuration, resolved with pydantic-settings.

All local state lives under a single home directory (default `~/.cache/timenet`), mirroring
HuggingFace's `HF_HOME` -> `HF_DATASETS_CACHE` / `HF_HUB_CACHE` hierarchy. Setting `TIMENET_HOME`
relocates everything; the per-area env vars override just their own path. Precedence for any value is
**explicit argument (e.g. a CLI flag) > environment variable > default**. This model is the single place
to add future configuration.

### TimeNetSettings

Bases: `BaseSettings`

TimeNet's settings. Reads `TIMENET_*` environment variables (and an optional `.env`).

#### cache `class-attribute` `instance-attribute`

```
cache: Path | None = None
```

#### cache\_dir `property`

```
cache_dir: Path
```

Where curation raw sources and Hub downloads are cached (analog of `HF_HUB_CACHE`).

#### home `class-attribute` `instance-attribute`

```
home: Path = Path('~/.cache/timenet')
```

#### home\_dir `property`

```
home_dir: Path
```

The resolved home directory (analog of `HF_HOME`).

#### model\_config `class-attribute` `instance-attribute`

```
model_config = SettingsConfigDict(
    env_prefix="TIMENET_", env_file=".env", extra="ignore"
)
```

#### registry `class-attribute` `instance-attribute`

```
registry: str | None = None
```

#### registry\_path `property`

```
registry_path: Path
```

The default local registry directory (`$TIMENET_REGISTRY` is the selector, not this).

#### storage `class-attribute` `instance-attribute`

```
storage: Path | None = None
```

#### storage\_dir `property`

```
storage_dir: Path
```

Where loaded/downloaded datasets are cached (analog of `HF_DATASETS_CACHE`).

### settings

```
settings(**overrides: Any) -> TimeNetSettings
```

Build settings, letting explicit non-`None` overrides win over env and defaults.

`None` overrides are dropped so a missing CLI flag falls through to the environment, then the
default.

Parameters:

| Name | Type | Description | Default |
| --- | --- | --- | --- |
| `**overrides` | `Any` | Field overrides (e.g. `storage=...`, `registry=...`). | `{}` |

Returns:

| Type | Description |
| --- | --- |
| `TimeNetSettings` | The resolved :class:`TimeNetSettings`. |
