Pre-flight
Problem or motivation
_load_from_path(path) is private, but loading a stack config from an explicit path is a genuine application need
e.g. groundworkers has bootstrap.py::load_stack_config_from_path, a near-line-for-line reimplementation
The copy does one thing better: it formats ValidationError into a ConfigurationError naming the offending field paths, where upstream lets the raw pydantic error propagate.
Proposed solution
Promote it, taking the improved error formatting from groundworkers while we are at it
def load_stack_config_from_path(path: str | Path) -> StackConfig: ...
Keep load_stack_config() as the no-argument, CONFIG_PATH-driven entry point for application code
Alternatives considered
No response
Pre-flight
Problem or motivation
_load_from_path(path)is private, but loading a stack config from an explicit path is a genuine application neede.g. groundworkers has
bootstrap.py::load_stack_config_from_path, a near-line-for-line reimplementationThe copy does one thing better: it formats
ValidationErrorinto aConfigurationErrornaming the offending field paths, where upstream lets the raw pydantic error propagate.Proposed solution
Promote it, taking the improved error formatting from groundworkers while we are at it
Keep
load_stack_config()as the no-argument,CONFIG_PATH-driven entry point for application codeAlternatives considered
No response