Add compatibility shims at top-level to re-export SYS modules (pipeline/result_table/metadata/models/rich_display)

This commit is contained in:
2025-12-29 23:36:01 -08:00
parent ef01ca03a0
commit 4920ebf765
5 changed files with 56 additions and 0 deletions

11
metadata.py Normal file
View File

@@ -0,0 +1,11 @@
"""Backwards-compatibility shim for top-level `metadata` module.
Moved into `SYS.metadata` — keep the old import path working for tests
and third-party code.
"""
from importlib import import_module
import sys
_real = import_module("SYS.metadata")
sys.modules[__name__] = _real

10
models.py Normal file
View File

@@ -0,0 +1,10 @@
"""Backwards-compatibility shim for top-level `models` module.
Moved into `SYS.models` — preserve old import semantics.
"""
from importlib import import_module
import sys
_real = import_module("SYS.models")
sys.modules[__name__] = _real

14
pipeline.py Normal file
View File

@@ -0,0 +1,14 @@
"""Backwards-compatibility shim for top-level `pipeline` module.
The project moved core modules into the `SYS` package (e.g. `SYS.pipeline`).
Many third-party code and tests still import top-level names like `pipeline`.
This shim ensures `import pipeline` returns the `SYS.pipeline` module object.
"""
from importlib import import_module
import sys
# Import the real implementation and ensure subsequent imports of
# the top-level name point to the SYS package module object.
_real = import_module("SYS.pipeline")
sys.modules[__name__] = _real

11
result_table.py Normal file
View File

@@ -0,0 +1,11 @@
"""Backwards-compatibility shim for top-level `result_table` module.
Moved into `SYS.result_table` — keep the old import path working for tests
and third-party code.
"""
from importlib import import_module
import sys
_real = import_module("SYS.result_table")
sys.modules[__name__] = _real

10
rich_display.py Normal file
View File

@@ -0,0 +1,10 @@
"""Backwards-compatibility shim for top-level `rich_display` module.
Moved into `SYS.rich_display` — preserve old import path.
"""
from importlib import import_module
import sys
_real = import_module("SYS.rich_display")
sys.modules[__name__] = _real