config
Contains configuration for the diffannotator module
JSONFormat ¶
Bases: Enum
To be used as name of the format, e.g. as value of CLI parameter
Source code in src/diffannotator/config.py
17 18 19 20 21 | |
JSONFormatExt ¶
Bases: Enum
To be used as file extension (input or output)
Source code in src/diffannotator/config.py
24 25 26 27 28 | |
get_version ¶
get_version() -> str
Return [installed] version of this module / library
Use version from the installed 'diffannotator' package,
if possible, with fallback to global variable __version__.
Updates __version__.
| RETURNS | DESCRIPTION |
|---|---|
str
|
version string |
Source code in src/diffannotator/config.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |
guess_format_version ¶
guess_format_version(
file_path: Path, warn_ambiguous: bool = False
) -> Optional[JSONFormat]
Guess annotation format schema version based on name of the file
| PARAMETER | DESCRIPTION |
|---|---|
file_path
|
name of the file with annotation data
TYPE:
|
warn_ambiguous
|
whether to log warning on situations where the result is ambiguous; as a side effect makes it less forgiving
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
(JSONFormat, optional)
|
enum defining the format, or None if there is no match |
Source code in src/diffannotator/config.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | |