fix(deps): align manual install coreml-diffusion minimum

This commit is contained in:
dajiaohuang
2026-11-04 17:45:09 +01:00
committed by aszc
parent 5e57024336
commit eae74a012f
2 changed files with 27 additions and 1 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
coreml-diffusion>=0.1.4,<0.2
coreml-diffusion>=0.1.6,<0.2
coremltools>=9,<10
numpy>=2,<3
diffusers>=0.30
+26
View File
@@ -0,0 +1,26 @@
"""Keep the manual-install dependency bounds aligned with package metadata."""
from pathlib import Path
import tomllib
import unittest
REPO_ROOT = Path(__file__).resolve().parents[2]
class DependencyMetadataTests(unittest.TestCase):
def test_manual_requirements_match_project_coreml_diffusion_spec(self):
project = tomllib.loads((REPO_ROOT / "pyproject.toml").read_text())
project_spec = next(
requirement
for requirement in project["project"]["dependencies"]
if requirement.lower().startswith("coreml-diffusion")
)
manual_specs = [
line.strip()
for line in (REPO_ROOT / "requirements.txt").read_text().splitlines()
if line.strip().lower().startswith("coreml-diffusion")
]
self.assertEqual(len(manual_specs), 1)
self.assertEqual(manual_specs[0], project_spec)