@@ -74,15 +74,23 @@ def test_image_pyprojects(subtests: pytest_subtests.plugin.SubTests):
7474 manifest = load_manifests_file_for (directory )
7575
7676 with subtests .test (msg = "checking the `notebook-software` array" , pyproject = file ):
77- # TODO(jdanek)
78- pytest .skip ("checking the `notebook-software` array not yet implemented" )
7977 for s in manifest .sw :
8078 if s .get ("name" ) == "Python" :
8179 assert s .get ("version" ) == f"v{ python } " , (
8280 "Python version in imagestream does not match Pipfile"
8381 )
82+ elif s .get ("name" ) in ("R" , "code-server" ):
83+ # TODO(jdanek): check not implemented yet
84+ continue
85+ elif s .get ("name" ) in ("CUDA" , "ROCm" ):
86+ # TODO(jdanek): check not implemented yet
87+ continue
8488 else :
85- pytest .fail (f"unexpected { s = } " )
89+ e = next ((dep for dep in manifest .dep if dep .get ("name" ) == s .get ("name" )), None )
90+ if e :
91+ assert s .get ("version" ) == e .get ("version" )
92+ else :
93+ pytest .fail (f"unexpected { s = } " )
8694
8795 with subtests .test (msg = "checking the `notebook-python-dependencies` array" , pyproject = file ):
8896 for d in manifest .dep :
@@ -130,6 +138,7 @@ def test_image_pyprojects(subtests: pytest_subtests.plugin.SubTests):
130138 "Torch" ,
131139 "Transformers" ,
132140 "TrustyAI" ,
141+ "TensorFlow-ROCm" ,
133142 }
134143
135144 name = d ["name" ]
@@ -216,7 +225,7 @@ class VersionData:
216225 "Numpy" ,
217226 (
218227 "1.26" , # trustyai 0.6.2 depends on numpy~=1.26.4
219- # 2.0 for tensorflow rocm, but we don't have that in manifests
228+ " 2.0" , # for tensorflow rocm
220229 "2.1" , # for tensorflow cuda
221230 "2.2" , # for python 3.11 n-1 images
222231 "2.3" , # this is our latest where possible
@@ -273,7 +282,7 @@ def test_image_pyprojects_version_alignment(subtests: pytest_subtests.plugin.Sub
273282 ("torchvision" , ("==0.22.1" , "~=0.22.1" , "==0.22.1+cu128" , "==0.22.1+rocm6.2.4" )),
274283 (
275284 "matplotlib" ,
276- ("~=3.10.6" ),
285+ ("~=3.10.6" , ),
277286 ),
278287 (
279288 "numpy" ,
@@ -377,12 +386,8 @@ def is_suffix[T](main_sequence: Sequence[T], suffix_sequence: Sequence[T]):
377386
378387
379388def _skip_unimplemented_manifests (directory : pathlib .Path , call_skip = True ) -> bool :
380- # TODO(jdanek): missing manifests
381- dirs = (
382- "runtimes/rocm-tensorflow/ubi9-python-3.12" ,
383- "jupyter/rocm/tensorflow/ubi9-python-3.12" ,
384- )
385- for d in dirs :
389+ unimplemented_dirs = ()
390+ for d in unimplemented_dirs :
386391 if is_suffix (directory .parts , pathlib .Path (d ).parts ):
387392 if call_skip :
388393 pytest .skip (f"Manifest not implemented { directory .parts } " )
@@ -429,8 +434,11 @@ def load_manifests_file_for(directory: pathlib.Path) -> Manifest:
429434 )
430435 current_tag = recommended_tags [0 ] if recommended_tags else imagestream ["spec" ]["tags" ][0 ]
431436
432- sw = json .loads (current_tag ["annotations" ]["opendatahub.io/notebook-software" ])
433- dep = json .loads (current_tag ["annotations" ]["opendatahub.io/notebook-python-dependencies" ])
437+ try :
438+ sw = json .loads (current_tag ["annotations" ]["opendatahub.io/notebook-software" ])
439+ dep = json .loads (current_tag ["annotations" ]["opendatahub.io/notebook-python-dependencies" ])
440+ except Exception as e :
441+ raise ValueError (f"invalid json syntax in { manifest_file } " ) from e
434442
435443 return Manifest (
436444 filename = manifest_file ,
0 commit comments