Coverage for src/python/ensembl/vep/config/sections/catalogue/catalogue.py: 100%

11 statements  

« 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"""Which catalogue to act on, and whether to write it.""" 

15 

16from __future__ import annotations 

17 

18from pathlib import Path 

19from typing import ClassVar 

20 

21from attrs import define, field 

22 

23from ensembl.vep.config.option_spec import option 

24from ensembl.vep.config.sections.base import ConfigSection 

25 

26__all__ = ["CatalogueConfig"] 

27 

28 

29@define(frozen=True, kw_only=True, auto_attribs=True) 

30class CatalogueConfig(ConfigSection): 

31 """Which catalogue to act on. Every verb reads this one. 

32 

33 Attributes: 

34 catalogue_file (Path | None): Catalogue JSON to read or write, or None for the packaged one. 

35 """ 

36 

37 section_name: ClassVar[str] = "catalogue" 

38 

39 catalogue_file: Path | None = field( 

40 default=None, metadata=option("catalogue JSON to read or write", flag="catalogue") 

41 )