FetchConfig¶
FetchConfig ¶
Bases: BaseModel
Configuration for a Benchmarkoor fetch run.
Load from a YAML file with from_yaml; apply CLI overrides with
with_cli_overrides. Auth (bearer token) is never part of the config —
pass it via BENCHMARKOOR_TOKEN env var, --token CLI flag, or
BenchmarkoorClient(token=...).
from_yaml
classmethod
¶
Load a FetchConfig from a YAML file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Path
|
Filesystem path to the YAML config file. |
required |
allow_partial
|
bool
|
When True, required query fields (network, fork,
test_type) may be absent; validation is deferred until
|
False
|
Returns:
| Type | Description |
|---|---|
FetchConfig
|
A validated |
Raises:
| Type | Description |
|---|---|
ValidationError
|
If the YAML content violates any constraint (unknown keys, type errors, inverted date window, token present in YAML, etc.). |
Source code in src/benchmarkoor_fetch/config.py
with_cli_overrides ¶
Return a new FetchConfig with CLI-supplied overrides applied.
Only non-None kwargs are applied; omitting a kwarg leaves the existing
value intact. Accepted kwargs: network, fork, test_type,
start_date, end_date, run_id_pattern, cache_dir.
Returns:
| Type | Description |
|---|---|
FetchConfig
|
A new validated |
Raises:
| Type | Description |
|---|---|
ValidationError
|
If the merged result is invalid. |