feat: add pyproject.toml, smoke tests, and Gitea CI workflow
Some checks failed
CI / Lint (push) Failing after 2m8s
CI / Test (push) Successful in 2m6s
CI / Publish (push) Has been skipped
CI / Notify (push) Successful in 2s

- pyproject.toml: hatchling build, ruff + pytest dev deps, CLI entrypoint
- tests/test_smoke.py: import validation for all modules
- .gitea/workflows/ci.yaml: lint, test, publish to Gitea PyPI, ntfy notifications
- .gitignore: exclude __pycache__
This commit is contained in:
2026-02-13 10:47:13 -05:00
parent 2df3f27af7
commit 6bcf84549c
6 changed files with 3044 additions and 0 deletions

0
tests/__init__.py Normal file
View File

59
tests/test_smoke.py Normal file
View File

@@ -0,0 +1,59 @@
"""Smoke tests for mlflow_utils package."""
from __future__ import annotations
import pytest
def test_package_imports() -> None:
"""All public symbols are importable."""
from mlflow_utils import ( # noqa: F401
MLflowConfig,
MLflowTracker,
InferenceMetricsTracker,
get_mlflow_client,
get_tracking_uri,
ensure_experiment,
)
def test_version() -> None:
import mlflow_utils
assert mlflow_utils.__version__
def test_mlflow_config_defaults() -> None:
from mlflow_utils.client import MLflowConfig
cfg = MLflowConfig()
assert "mlflow" in cfg.tracking_uri
assert cfg.tracking_uri.startswith("http")
def test_cli_entrypoint() -> None:
"""CLI main function exists and is callable."""
from mlflow_utils.cli import main
assert callable(main)
def test_kfp_components_importable() -> None:
kfp = pytest.importorskip("kfp") # noqa: F841
from mlflow_utils.kfp_components import ( # noqa: F401
create_mlflow_run,
log_metrics_component,
)
def test_model_registry_importable() -> None:
from mlflow_utils.model_registry import ( # noqa: F401
register_model_for_kserve,
generate_kserve_manifest,
)
def test_experiment_comparison_importable() -> None:
from mlflow_utils.experiment_comparison import ( # noqa: F401
ExperimentAnalyzer,
)