rename: tea-modulo / tea_modulo -> tea (distribution, package, entry-point groups, MLflow names, image paths)

This commit is contained in:
AlbertoPMDM
2026-11-19 08:26:43 -06:00
parent fe36d5d859
commit e8e5b96755
320 changed files with 360 additions and 360 deletions
+7 -7
View File
@@ -13,9 +13,9 @@ import pytest
mlflow = pytest.importorskip("mlflow")
from tea_modulo.legacy.biomarkers.posterior_rhythm import LegacyPosteriorRhythm # noqa: E402
from tea_modulo.preprocessing import DIRECTOR_CLUSTER, PreprocessPlan # noqa: E402
from tea_modulo.serving import Forbidden, load_biomarker, load_plan, log_biomarker, log_plan # noqa: E402
from tea.legacy.biomarkers.posterior_rhythm import LegacyPosteriorRhythm # noqa: E402
from tea.preprocessing import DIRECTOR_CLUSTER, PreprocessPlan # noqa: E402
from tea.serving import Forbidden, load_biomarker, load_plan, log_biomarker, log_plan # noqa: E402
@pytest.fixture
@@ -69,20 +69,20 @@ def test_biomarker_model_runs_with_only_its_code(store, tmp_path):
import sys, json, mlflow, pandas as pd
mlflow.set_tracking_uri({store!r}); mlflow.set_registry_uri({store!r})
m = mlflow.pyfunc.load_model("models:/tea-bio-iso/{bv.version}")
import tea_modulo
import tea
out = m.predict(pd.DataFrame({{"posterior_rhythm_hz": [5.0], "age_months": [30.0]}}))
try:
import tea_modulo.pipeline
import tea.pipeline
other = "importable"
except ImportError:
other = "missing"
print(json.dumps({{"pkg": tea_modulo.__file__, "pipeline": other, "outside": int(out.outside.iloc[0])}}))
print(json.dumps({{"pkg": tea.__file__, "pipeline": other, "outside": int(out.outside.iloc[0])}}))
"""
out = subprocess.run([sys.executable, "-W", "ignore", "-c", code], capture_output=True, text=True,
cwd=tmp_path, env={**__import__("os").environ, "MLFLOW_DISABLE_AGENT_HINT": "1"})
assert out.returncode == 0, out.stderr[-2000:]
r = json.loads(out.stdout.strip().splitlines()[-1])
assert "code" in Path(r["pkg"]).parts, r["pkg"] # tea_modulo comes from the model's code
assert "code" in Path(r["pkg"]).parts, r["pkg"] # tea comes from the model's code
assert r["pipeline"] == "missing" # nothing else of the library is there
assert r["outside"] == -1