Coverage for bioimageio/core/utils/__init__.py: 75%
12 statements
« prev ^ index » next coverage.py v7.8.0, created at 2025-04-01 09:51 +0000
« prev ^ index » next coverage.py v7.8.0, created at 2025-04-01 09:51 +0000
1import json
2import sys
3from pathlib import Path
5from ._compare import compare as compare
7if sys.version_info < (3, 9):
9 def files(package_name: str):
10 assert package_name == "bioimageio.core"
11 return Path(__file__).parent.parent
13else:
14 from importlib.resources import files as files
17with files("bioimageio.core").joinpath("VERSION").open("r", encoding="utf-8") as f:
18 VERSION = json.load(f)["version"]
19 assert isinstance(VERSION, str)