fix(deps): align manual install coreml-diffusion minimum
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -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)
|
||||
Reference in New Issue
Block a user