Coverage for src/python/ensembl/vep/corpus/synthetic/__init__.py: 100%
13 statements
« prev ^ index » next coverage.py v7.17.2, created at 2026-11-18 14:41 +0000
« prev ^ index » next coverage.py v7.17.2, created at 2026-11-18 14:41 +0000
1# See the NOTICE file distributed with this work for additional information
2# regarding copyright ownership.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14"""Build deterministic synthetic corpora."""
16from __future__ import annotations
18from ensembl.vep.corpus.combine import CombinedCorpus, combine_corpora
19from ensembl.vep.corpus.registry import build_corpus, register_corpus
20from ensembl.vep.corpus.spec import CorpusSpec
21from ensembl.vep.corpus.synthetic.base import SyntheticCorpus
22from ensembl.vep.corpus.synthetic import default as _default # noqa: F401
23from ensembl.vep.corpus.synthetic import heavy as _heavy # noqa: F401
25__all__ = ["SyntheticCorpus"]
28@register_corpus("synthetic.all")
29def _all_corpora(specification: CorpusSpec) -> CombinedCorpus:
30 """Build the default and heavy synthetic corpora as one corpus."""
31 default_spec = CorpusSpec(kind="synthetic.default", parameters=specification.parameters)
32 heavy_spec = CorpusSpec(kind="synthetic.heavy", parameters=specification.parameters)
33 return combine_corpora(
34 specification,
35 (build_corpus(default_spec), build_corpus(heavy_spec)),
36 )