semantics
This commit is contained in:
@@ -4,9 +4,41 @@
|
||||
# @PURPOSE: Provide lazy route module loading to avoid heavyweight imports during tests.
|
||||
# @LAYER: API
|
||||
# @RELATION: [CALLS] ->[ApiRoutesGetAttr]
|
||||
# @RELATION: [BINDS_TO] ->[Route_Group_Contracts]
|
||||
# @INVARIANT: Only names listed in __all__ are importable via __getattr__.
|
||||
|
||||
__all__ = ['plugins', 'tasks', 'settings', 'connections', 'environments', 'mappings', 'migration', 'git', 'storage', 'admin', 'reports', 'assistant', 'clean_release', 'profile', 'dataset_review']
|
||||
# [DEF:Route_Group_Contracts:Block]
|
||||
# @COMPLEXITY: 3
|
||||
# @PURPOSE: Declare the canonical route-module registry used by lazy imports and app router inclusion.
|
||||
# @RELATION: DEPENDS_ON -> [PluginsRouter]
|
||||
# @RELATION: DEPENDS_ON -> [TasksRouter]
|
||||
# @RELATION: DEPENDS_ON -> [SettingsRouter]
|
||||
# @RELATION: DEPENDS_ON -> [ConnectionsRouter]
|
||||
# @RELATION: DEPENDS_ON -> [ReportsRouter]
|
||||
# @RELATION: DEPENDS_ON -> [LlmRoutes]
|
||||
__all__ = [
|
||||
"plugins",
|
||||
"tasks",
|
||||
"settings",
|
||||
"connections",
|
||||
"environments",
|
||||
"mappings",
|
||||
"migration",
|
||||
"git",
|
||||
"storage",
|
||||
"admin",
|
||||
"reports",
|
||||
"assistant",
|
||||
"clean_release",
|
||||
"clean_release_v2",
|
||||
"profile",
|
||||
"dataset_review",
|
||||
"llm",
|
||||
"dashboards",
|
||||
"datasets",
|
||||
"health",
|
||||
]
|
||||
# [/DEF:Route_Group_Contracts:Block]
|
||||
|
||||
|
||||
# [DEF:ApiRoutesGetAttr:Function]
|
||||
@@ -18,7 +50,10 @@ __all__ = ['plugins', 'tasks', 'settings', 'connections', 'environments', 'mappi
|
||||
def __getattr__(name):
|
||||
if name in __all__:
|
||||
import importlib
|
||||
|
||||
return importlib.import_module(f".{name}", __name__)
|
||||
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
||||
|
||||
|
||||
# [/DEF:ApiRoutesGetAttr:Function]
|
||||
# [/DEF:ApiRoutesModule:Module]
|
||||
|
||||
Reference in New Issue
Block a user