From 123f9162f2cb7d20b5beda8c927441ce9ddf4589 Mon Sep 17 00:00:00 2001 From: Wei Ouyang Date: Wed, 6 Nov 2024 23:48:32 +0100 Subject: [PATCH] fix dependencies format --- src/bioimageio-packager.imjoy.html | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/bioimageio-packager.imjoy.html b/src/bioimageio-packager.imjoy.html index cc12308..a108e01 100644 --- a/src/bioimageio-packager.imjoy.html +++ b/src/bioimageio-packager.imjoy.html @@ -172,9 +172,15 @@ } exportSpec.weights[weightsFormat].architecture = wformat.architecture } - if(wformat.dependencies && wformat.dependencies.includes(':')){ - const dep = wformat.dependencies.split(':').slice(1).join(":") // e.g. pip:./requirements.txt - files.push(dep) + if(wformat.dependencies){ + if(typeof wformat.dependencies === 'string'){ + const dep = wformat.dependencies.split(':').slice(1).join(":") // e.g. pip:./requirements.txt + files.push(dep) + } + else { + const dep = wformat.dependencies.source.split(':').slice(1).join(":") // e.g. pip:./requirements.txt + files.push(dep) + } exportSpec.weights[weightsFormat].dependencies = wformat.dependencies } }