File size: 577 Bytes
fa603f3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""Project version, sourced from the top-level ``VERSION`` file.

``VERSION`` is the single source of truth. Bump it in a PR (``make bump
VERSION=X.Y.Z``); when the bump lands on ``main``, CI tags the merge commit
``vX.Y.Z`` and deploys it to the production HF Space (see README "Releasing").
"""

from pathlib import Path

VERSION_FILE = Path(__file__).resolve().parent.parent / "VERSION"


def read_version() -> str:
    try:
        return VERSION_FILE.read_text(encoding="utf-8").strip() or "0.0.0"
    except OSError:
        return "0.0.0"


__version__ = read_version()