build

geodetic_engine.projdb.build(config, *, client=None, dry_run=False, skip_validation=False)[source]

Build an enriched proj.db from a Georepository instance.

The official database is copied and added to; it is never modified in place and no row belonging to another authority is ever overwritten.

Parameters:
  • config (ProjDbBuildConfig) – Resolved build configuration.

  • client (GeorepositoryClient | None, default: None) – Optional pre-built client, mainly for testing.

  • dry_run (bool, default: False) – Perform the whole build, including every constraint and collision check, then discard it instead of committing. Nothing is left on disk. This exercises the same code as a real build rather than approximating it, so a dry run that succeeds means a real build would too. Responses are cached only in memory, without reading or changing the persistent cache.

  • skip_validation (bool, default: False) – Explicitly skip PROJ validation before publication. False by default; the choice is recorded in the build history.

Return type:

BuildReport

Returns:

The build report. Written next to the output database unless this is a dry run, in which case there is no database to write it next to.

Raises:

ProjDbBuildError – On a build or validation failure. Staging is discarded and any previously published database is preserved.

Example

>>> report = build(load_config(), dry_run=True)
>>> report.rows_by_table["geodetic_crs"]
12