fix: improve setup wizard behavior (#127)

* fix: improve setup wizard behavior

* fix: derive runtime versions from release metadata

* test: validate metabase source mapping requirements

* Fix boundary check release identifiers
This commit is contained in:
Andrey Avtomonov 2026-05-17 19:15:09 +02:00 committed by GitHub
parent 33a142f769
commit d1c84e5564
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 671 additions and 90 deletions

View file

@ -1,6 +1,28 @@
"""Portable compute package for KTX."""
PACKAGE_NAME = "ktx-daemon"
VERSION = "0.1.0"
from collections.abc import Callable
from importlib.metadata import PackageNotFoundError, version
__all__ = ["PACKAGE_NAME", "VERSION"]
PACKAGE_NAME = "ktx-daemon"
RUNTIME_DISTRIBUTION_NAME = "kaelio-ktx"
def resolve_package_version(
version_loader: Callable[[str], str] = version,
) -> str:
for distribution_name in (RUNTIME_DISTRIBUTION_NAME, PACKAGE_NAME):
try:
return version_loader(distribution_name)
except PackageNotFoundError:
continue
return "0.0.0+local"
VERSION = resolve_package_version()
__all__ = [
"PACKAGE_NAME",
"RUNTIME_DISTRIBUTION_NAME",
"VERSION",
"resolve_package_version",
]

View file

@ -10,6 +10,7 @@ from typing import Any
from fastapi import FastAPI, HTTPException
from fastapi.responses import Response
from ktx_daemon import VERSION
from ktx_daemon.code_execution import (
ExecuteCodeRequest,
ExecuteCodeResponse,
@ -84,7 +85,7 @@ def create_app(
app = FastAPI(
title="KTX Daemon",
description="Stateless portable compute server for KTX.",
version="0.1.0",
version=VERSION,
)
@app.get("/health")