Extensibility¶
gwmock can load third-party backends without any repository changes as long as
the backend satisfies the public protocol for its section.
Resolution order¶
For orchestration.*.backend, gwmock resolves backends in this order:
- Built-in aliases shipped by
gwmock. - Python entry points in the
gwmock.population,gwmock.signal, orgwmock.noisegroups. - Direct
module:Classreferences. - Legacy
module.Classreferences, which still work but should be considered deprecated.
Packaging a backend¶
Expose your class through an entry point:
[project.entry-points."gwmock.population"]
galactic_binaries = "my_pkg.populations:GalacticBinaryPopulation"
Then reference the alias from YAML:
orchestration:
population:
backend: galactic_binaries
source-type: bbh
n-samples: 128
arguments:
catalog_path: /data/catalogs/galactic-binaries.h5
The same pattern works for signal and noise backends.
Conformance checks¶
gwmock validates the resolved backend against the public contract for the
section it is loaded into:
- population backends must satisfy
GWPopSimulator - signal backends must provide the public
simulate(...)surface - noise backends must satisfy
NoiseSimulator
If a class is missing a required member, the configuration should fail clearly before any data is generated.
For the formal protocol definitions, see Protocol Contracts. For the adapter-backed configuration surface, see Orchestration.