load_config¶
- geodetic_engine.osdudb.load_config(*, config_file=None, env=None, load_dotenv_file=True, **overrides)[source]¶
Build an
OsduBuildConfigfrom file, environment and overrides.Unlike the Georepository workflow there is nothing secret to configure, so a config file is optional and a build can be driven entirely by the
catalogoverride.- Parameters:
config_file (
Path|None, default:None) – TOML file with an[osdudb]table. When omitted,GEODETIC_ENGINE_CONFIGis read, and thengeodetic-osdudb.tomlin the working directory.env (
Mapping[str,str] |None, default:None) – Environment mapping. Defaults toos.environ.load_dotenv_file (
bool, default:True) – Load a.envfile into the environment first, so an operator can keep one settings file for both workflows.**overrides (
Any) – Explicit values taking precedence over all other sources.
- Return type:
- Returns:
A validated configuration.
- Raises:
ConfigurationError – If the catalogue is not named or does not exist, or a value is malformed, or the config file has an unknown setting.
Example
>>> load_config(catalog=Path("CRS_CT.json")) OsduBuildConfig(catalog='CRS_CT.json', authorities=['OSDU'], ...)