diff --git a/src/main/groovy/io/seqera/wave/util/ContainerHelper.groovy b/src/main/groovy/io/seqera/wave/util/ContainerHelper.groovy index f56c46445..9ccb78d46 100644 --- a/src/main/groovy/io/seqera/wave/util/ContainerHelper.groovy +++ b/src/main/groovy/io/seqera/wave/util/ContainerHelper.groovy @@ -204,6 +204,9 @@ class ContainerHelper { //strip `pip:` prefix if( it.startsWith('pip:') && it.length()>4 && it[4]!=':') it = it.substring(4) + // ignore http based dependencies + if( it.startsWith('https://') || it.startsWith('http://')) + continue // strip channel prefix final int p=it.indexOf('::') if( p!=-1 ) diff --git a/src/test/groovy/io/seqera/wave/util/ContainerHelperTest.groovy b/src/test/groovy/io/seqera/wave/util/ContainerHelperTest.groovy index b418e4834..88c718105 100644 --- a/src/test/groovy/io/seqera/wave/util/ContainerHelperTest.groovy +++ b/src/test/groovy/io/seqera/wave/util/ContainerHelperTest.groovy @@ -494,6 +494,27 @@ class ContainerHelperTest extends Specification { - pandas==2.2.2 - numpy=1.0 '''.stripIndent(true) + @Shared def GIT1 = '''\ + channels: + - bioconda + - conda-forge + dependencies: + - pip + - pip: + - "https://github.com/seqeralabs/seqera-kit/archive/dev.zip" + '''.stripIndent(true) + @Shared def GIT2 = '''\ + channels: + - bioconda + - conda-forge + dependencies: + - bwa + - pip + - pip: + - "https://github.com/seqeralabs/seqera-kit/archive/dev.zip" + - "https://github.com/seqeralabs/seqera-kit/archive/dev2.zip" + - "https://github.com/seqeralabs/seqera-kit/archive/dev3.zip" + '''.stripIndent(true) @Unroll def 'should make request target with name strategy' () { @@ -546,6 +567,16 @@ class ContainerHelperTest extends Specification { 'DOCKER' | 'foo.com/build' | '123' | PIP2 | 'tagPrefix' | 'foo.com/build:pip_pandas-2.2.2_numpy-1.0--123' 'DOCKER' | 'foo.com/build' | '123' | PIP2 | 'imageSuffix' | 'foo.com/build/pip_pandas_numpy:123' 'DOCKER' | 'foo.com/build' | '123' | PIP2 | 'none' | 'foo.com/build:123' + and: + 'DOCKER' | 'foo.com/build' | '123' | GIT1 | null | 'foo.com/build:pip--123' + 'DOCKER' | 'foo.com/build' | '123' | GIT1 | 'tagPrefix' | 'foo.com/build:pip--123' + 'DOCKER' | 'foo.com/build' | '123' | GIT1 | 'imageSuffix' | 'foo.com/build/pip:123' + 'DOCKER' | 'foo.com/build' | '123' | GIT1 | 'none' | 'foo.com/build:123' + and: + 'DOCKER' | 'foo.com/build' | '123' | GIT2 | null | 'foo.com/build:bwa_pip--123' + 'DOCKER' | 'foo.com/build' | '123' | GIT2 | 'tagPrefix' | 'foo.com/build:bwa_pip--123' + 'DOCKER' | 'foo.com/build' | '123' | GIT2 | 'imageSuffix' | 'foo.com/build/bwa_pip:123' + 'DOCKER' | 'foo.com/build' | '123' | GIT2 | 'none' | 'foo.com/build:123' } @@ -571,4 +602,5 @@ class ContainerHelperTest extends Specification { thrown(BadRequestException) } + }