Documentation
Pfg Verify
Reference docs for pydantic-fixturegen.
pfg verify
Capabilities
pfg verify recomputes the coverage manifest for the current source tree and compares it to an existing lockfile. It exits non-zero when drift is detected, making it ideal for CI jobs that must block merges unless the lockfile is refreshed.
Typical use cases
- Gate pull requests until contributors rerun
pfg lockafter adding models or providers. - Verify schema-driven coverage (JSON Schema or OpenAPI) in documentation repos.
- Detect accidental edits to the lockfile by re-running verification before publishing packages.
Inputs & outputs
- Target: same choices as
pfg lock—module path,--schema, or--openapi(with optional--route). Exactly one is required. - Lockfile:
--lockfile/-fpath to the manifest you want to verify (defaults.pfg-lock.json). - Result: prints “Coverage manifest verification succeeded.” on match. On mismatch, raises an
EmitErrorcontaining a diff string in thedetailspayload (emitted as JSON when--json-errorsis active).
Flag reference
--lockfile/-f: lockfile location.--include/-i,--exclude/-e: glob filters.--schema,--openapi,--route: alternative targets (mutually exclusive with the positional path).--ast,--hybrid,--timeout,--memory-limit-mb: discovery guard rails.--json-errors: structured diagnostics.
Example workflows
CI verification
pfg verify ./app/models.py --lockfile .pfg-lock.json --include app.models.*
Sample output
Coverage manifest verification succeeded.
Verify OpenAPI coverage lockfile
pfg verify --openapi docs/openapi.yaml --lockfile ci/openapi-lock.json
Sample output (mismatch)
ERROR: Coverage manifest mismatch.
diff:
- coverage/models/User/address coverage changed 100% -> 92%
Re-run after locking a sibling directory
pfg lock ../temp/models.py --lockfile ../temp/.pfg-lock.json
pfg verify ../temp/models.py --lockfile ../temp/.pfg-lock.json
Sample output
Coverage manifest verification succeeded.
Operational notes
- Lockfile loading is strict: missing files raise
EmitErrorwith a helpful message. - When
--json-errorsis enabled the mismatch diff is attached to the JSON payload so you can parse it programmatically. - Runtime guard rails like
--timeout/--memory-limit-mbare recorded in the lockfile but ignored during comparison, so CI jobs can override them without forcing a lock refresh. - Install plugin extras before verifying so plugin-provided providers match what was recorded when the lockfile was captured.