ensembl.vep.runner.catalogue package#

Catalogue maintenance runners.

Submodules#

ensembl.vep.runner.catalogue.add module#

Consequence catalogue term addition.

class ensembl.vep.runner.catalogue.add.Runner(config)[source]#

Bases: object

Runner for adding and validating a consequence term.

description: ClassVar[str] = 'add a term to the consequence catalogue'#
name: ClassVar[str] = 'catalogue.add'#
run()[source]#

Add the term, or report why it was refused.

Return type:

ExitCode

sections: ClassVar[tuple[str, ...]] = ('logging', 'catalogue', 'catalogue_write', 'catalogue_add')#

ensembl.vep.runner.catalogue.common module#

Shared helpers for the catalogue runners.

ensembl.vep.runner.catalogue.common.destination_for(config)[source]#

Return where a change should be written.

Raises:

ValueError – If neither a path nor permission to overwrite the packaged catalogue was given. An installed vep must not silently rewrite its own wheel.

Return type:

Path

ensembl.vep.runner.catalogue.common.log_diff(original, updated, destination)[source]#

Log a unified diff of a catalogue change, and return its lines.

Return type:

list[str]

ensembl.vep.runner.catalogue.common.log_validation_report(report)[source]#

Log a validation report, errors first.

ensembl.vep.runner.catalogue.common.read_payload(config)[source]#

Return the catalogue payload and an untouched copy of it.

The copy is the baseline a change is validated against, so a pre-existing finding is not reported as one this change introduced.

Return type:

tuple[dict[str, Any], dict[str, Any]]

ensembl.vep.runner.catalogue.common.write_payload(payload, destination)[source]#

Write a catalogue payload, in the checked-in formatting.

ensembl.vep.runner.catalogue.costs module#

Consequence fact cost measurement.

class ensembl.vep.runner.catalogue.costs.Runner(config)[source]#

Bases: object

Runner for profiling fact costs against declared tiers.

Profiling replaces every fact’s compute with a timing shim, so this is a deliberate measurement run and never something an annotation path does.

description: ClassVar[str] = "measure each fact's real cost against its declared tier"#
name: ClassVar[str] = 'catalogue.costs'#
run()[source]#

Profile, report, and optionally persist the measured table.

Return type:

ExitCode

sections: ClassVar[tuple[str, ...]] = ('logging', 'catalogue', 'catalogue_costs', 'corpus')#

ensembl.vep.runner.catalogue.remove module#

Consequence catalogue term removal.

class ensembl.vep.runner.catalogue.remove.Runner(config)[source]#

Bases: object

Runner for removing a consequence term and its references.

description: ClassVar[str] = 'remove a term from the consequence catalogue'#
name: ClassVar[str] = 'catalogue.remove'#
run()[source]#

Remove the term, or report why it was refused.

Return type:

ExitCode

sections: ClassVar[tuple[str, ...]] = ('logging', 'catalogue', 'catalogue_write', 'catalogue_remove')#

ensembl.vep.runner.catalogue.show module#

Consequence catalogue and fact registry rendering.

class ensembl.vep.runner.catalogue.show.Runner(config)[source]#

Bases: object

Runner for rendering catalogue terms or facts.

description: ClassVar[str] = 'list catalogue terms or registered facts'#
name: ClassVar[str] = 'catalogue.show'#
run()[source]#

Render the requested subject in the requested form.

Return type:

ExitCode

sections: ClassVar[tuple[str, ...]] = ('logging', 'catalogue', 'catalogue_show')#

ensembl.vep.runner.catalogue.validate module#

Consequence rule-set validation.

class ensembl.vep.runner.catalogue.validate.Runner(config)[source]#

Bases: object

Runner for configured catalogue validation tiers.

A non-zero exit is a real failure: the checked-in catalogue passes today.

description: ClassVar[str] = 'validate the consequence rule set'#
name: ClassVar[str] = 'catalogue.validate'#
run()[source]#

Report every finding, and fail if any is build-breaking.

Return type:

ExitCode

sections: ClassVar[tuple[str, ...]] = ('logging', 'catalogue', 'catalogue_validate', 'corpus')#