Package onboard K1 separately with a private portable installer
This commit is contained in:
@@ -1,38 +1,42 @@
|
||||
"""Configuration contracts for Mission Core laboratory evidence."""
|
||||
"""Lazy public exports for laboratory evidence; leaf imports stay lightweight."""
|
||||
|
||||
from k1link.laboratory.evidence_registry import (
|
||||
LABORATORY_EVIDENCE_DEFINITION_SCHEMA,
|
||||
LABORATORY_EVIDENCE_LIFECYCLE_DEFINITION_SCHEMA,
|
||||
LaboratoryEvidenceDefinition,
|
||||
LaboratoryEvidenceRegistry,
|
||||
LaboratoryEvidenceVariant,
|
||||
LaboratoryRegistryError,
|
||||
)
|
||||
from k1link.laboratory.evidence_report import (
|
||||
LABORATORY_EVIDENCE_REPORT_SCHEMA,
|
||||
LaboratoryEvidenceReportError,
|
||||
LaboratoryEvidenceReportNotFound,
|
||||
LaboratoryEvidenceReportService,
|
||||
verify_laboratory_evidence_result,
|
||||
)
|
||||
from k1link.laboratory.execution import (
|
||||
LABORATORY_EXECUTION_REGISTRY_SCHEMA,
|
||||
LABORATORY_RUN_RECEIPT_SCHEMA,
|
||||
LaboratoryAdapterResult,
|
||||
LaboratoryExecutionDefinition,
|
||||
LaboratoryExecutionError,
|
||||
LaboratoryExecutionRegistry,
|
||||
LaboratoryRunner,
|
||||
LaboratoryRunRequest,
|
||||
LaboratoryRunResult,
|
||||
)
|
||||
from k1link.laboratory.value_review_registry import (
|
||||
LABORATORY_VALUE_REVIEW_INDEX_SCHEMA,
|
||||
LABORATORY_VALUE_REVIEW_REGISTRY_SCHEMA,
|
||||
LaboratoryValueReviewEntry,
|
||||
LaboratoryValueReviewRegistry,
|
||||
LaboratoryValueReviewRegistryError,
|
||||
)
|
||||
from importlib import import_module
|
||||
from typing import TYPE_CHECKING, Any, Final
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from k1link.laboratory.evidence_registry import (
|
||||
LABORATORY_EVIDENCE_DEFINITION_SCHEMA,
|
||||
LABORATORY_EVIDENCE_LIFECYCLE_DEFINITION_SCHEMA,
|
||||
LaboratoryEvidenceDefinition,
|
||||
LaboratoryEvidenceRegistry,
|
||||
LaboratoryEvidenceVariant,
|
||||
LaboratoryRegistryError,
|
||||
)
|
||||
from k1link.laboratory.evidence_report import (
|
||||
LABORATORY_EVIDENCE_REPORT_SCHEMA,
|
||||
LaboratoryEvidenceReportError,
|
||||
LaboratoryEvidenceReportNotFound,
|
||||
LaboratoryEvidenceReportService,
|
||||
verify_laboratory_evidence_result,
|
||||
)
|
||||
from k1link.laboratory.execution import (
|
||||
LABORATORY_EXECUTION_REGISTRY_SCHEMA,
|
||||
LABORATORY_RUN_RECEIPT_SCHEMA,
|
||||
LaboratoryAdapterResult,
|
||||
LaboratoryExecutionDefinition,
|
||||
LaboratoryExecutionError,
|
||||
LaboratoryExecutionRegistry,
|
||||
LaboratoryRunner,
|
||||
LaboratoryRunRequest,
|
||||
LaboratoryRunResult,
|
||||
)
|
||||
from k1link.laboratory.value_review_registry import (
|
||||
LABORATORY_VALUE_REVIEW_INDEX_SCHEMA,
|
||||
LABORATORY_VALUE_REVIEW_REGISTRY_SCHEMA,
|
||||
LaboratoryValueReviewEntry,
|
||||
LaboratoryValueReviewRegistry,
|
||||
LaboratoryValueReviewRegistryError,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"LABORATORY_EVIDENCE_DEFINITION_SCHEMA",
|
||||
@@ -61,3 +65,44 @@ __all__ = [
|
||||
"LaboratoryValueReviewRegistry",
|
||||
"LaboratoryValueReviewRegistryError",
|
||||
]
|
||||
|
||||
_EXPORTS: Final = {
|
||||
"LABORATORY_EVIDENCE_DEFINITION_SCHEMA": "k1link.laboratory.evidence_registry",
|
||||
"LABORATORY_EVIDENCE_LIFECYCLE_DEFINITION_SCHEMA": "k1link.laboratory.evidence_registry",
|
||||
"LaboratoryEvidenceDefinition": "k1link.laboratory.evidence_registry",
|
||||
"LaboratoryEvidenceRegistry": "k1link.laboratory.evidence_registry",
|
||||
"LaboratoryEvidenceVariant": "k1link.laboratory.evidence_registry",
|
||||
"LaboratoryRegistryError": "k1link.laboratory.evidence_registry",
|
||||
"LABORATORY_EVIDENCE_REPORT_SCHEMA": "k1link.laboratory.evidence_report",
|
||||
"LaboratoryEvidenceReportError": "k1link.laboratory.evidence_report",
|
||||
"LaboratoryEvidenceReportNotFound": "k1link.laboratory.evidence_report",
|
||||
"LaboratoryEvidenceReportService": "k1link.laboratory.evidence_report",
|
||||
"verify_laboratory_evidence_result": "k1link.laboratory.evidence_report",
|
||||
"LABORATORY_EXECUTION_REGISTRY_SCHEMA": "k1link.laboratory.execution",
|
||||
"LABORATORY_RUN_RECEIPT_SCHEMA": "k1link.laboratory.execution",
|
||||
"LaboratoryAdapterResult": "k1link.laboratory.execution",
|
||||
"LaboratoryExecutionDefinition": "k1link.laboratory.execution",
|
||||
"LaboratoryExecutionError": "k1link.laboratory.execution",
|
||||
"LaboratoryExecutionRegistry": "k1link.laboratory.execution",
|
||||
"LaboratoryRunner": "k1link.laboratory.execution",
|
||||
"LaboratoryRunRequest": "k1link.laboratory.execution",
|
||||
"LaboratoryRunResult": "k1link.laboratory.execution",
|
||||
"LABORATORY_VALUE_REVIEW_INDEX_SCHEMA": "k1link.laboratory.value_review_registry",
|
||||
"LABORATORY_VALUE_REVIEW_REGISTRY_SCHEMA": "k1link.laboratory.value_review_registry",
|
||||
"LaboratoryValueReviewEntry": "k1link.laboratory.value_review_registry",
|
||||
"LaboratoryValueReviewRegistry": "k1link.laboratory.value_review_registry",
|
||||
"LaboratoryValueReviewRegistryError": "k1link.laboratory.value_review_registry",
|
||||
}
|
||||
|
||||
|
||||
def __getattr__(name: str) -> Any:
|
||||
module_name = _EXPORTS.get(name)
|
||||
if module_name is None:
|
||||
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
||||
value = getattr(import_module(module_name), name)
|
||||
globals()[name] = value
|
||||
return value
|
||||
|
||||
|
||||
def __dir__() -> list[str]:
|
||||
return sorted({*globals(), *__all__})
|
||||
|
||||
Reference in New Issue
Block a user