animedex.config.buildmeta
Optional build-metadata loader for animedex.
Loads animedex.config.build_info if it has been generated by
tools/generate_build_info.py (or by make build_info) and
exposes a single dictionary, BUILD_INFO, that the CLI banner
and the self-diagnostic both consume.
When build_info.py is missing (the file is git-ignored, so this is
the normal case in a fresh checkout) BUILD_INFO still exists
but available is False. Every consumer should branch on
BUILD_INFO["available"] rather than catching ImportError itself.
The fields, mirrored from the generator:
commit- full HEAD SHA,"unknown"if git was unavailable.commit_short- 7-character HEAD SHA,"unknown"otherwise.describe-git describe --tags --always --dirtyoutput.tag- tag at HEAD when HEAD is exactly on a tag;Noneotherwise.dirty- bool;Trueif the working tree had uncommitted changes.build_time- UTC ISO-8601 timestamp.build_host- hostname captured at generation time.available-Trueif the values came from the generated file,Falseif they are placeholders.
BUILD_INFO
- animedex.config.buildmeta.BUILD_INFO: Dict[str, Any] = {'available': False, 'build_host': 'unknown', 'build_time': 'unknown', 'commit': 'unknown', 'commit_short': 'unknown', 'describe': 'unknown', 'dirty': False, 'tag': None}
Canonical build-metadata mapping. Always populated; check
BUILD_INFO["available"]to distinguish a real build from a placeholder.
__all__
- animedex.config.buildmeta.__all__ = ['BUILD_INFO', 'format_short', 'format_block', 'get_build_info', 'Optional']
Built-in mutable sequence.
If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.