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()
¶
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: 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 |
|
guess_format_version(file_path, warn_ambiguous=False)
¶
Guess annotation format schema version based on name of the file
:param file_path: name of the file with annotation data :param warn_ambiguous: whether to log warning on situations where the result is ambiguous; as a side effect makes it less forgiving :return: enum defining the format, or None if there is no match
Source code in src/diffannotator/config.py
61 62 63 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 |
|