-
Notifications
You must be signed in to change notification settings - Fork 637
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Conda and Spack support for Wave to Java
Signed-off-by: Paolo Di Tommaso <[email protected]>
- Loading branch information
1 parent
f6e4b9b
commit 36b9e22
Showing
23 changed files
with
985 additions
and
516 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,25 +15,27 @@ | |
* | ||
*/ | ||
|
||
package io.seqera.wave.plugin.config | ||
package io.seqera.wave.config; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
/** | ||
* Conda build options | ||
* | ||
* @author Paolo Di Tommaso <[email protected]> | ||
*/ | ||
class CondaOpts { | ||
|
||
final public static String DEFAULT_MAMBA_IMAGE = 'mambaorg/micromamba:1.4.2' | ||
public class CondaOpts { | ||
final public static String DEFAULT_MAMBA_IMAGE = "mambaorg/micromamba:1.4.2"; | ||
|
||
final String mambaImage | ||
final List<String> commands | ||
final String basePackages | ||
final public String mambaImage; | ||
final public List<String> commands; | ||
final public String basePackages; | ||
|
||
CondaOpts(Map opts) { | ||
this.mambaImage = opts.mambaImage ?: DEFAULT_MAMBA_IMAGE | ||
this.commands = opts.commands as List<String> | ||
this.basePackages = opts.basePackages | ||
public CondaOpts(Map<String,?> opts) { | ||
this.mambaImage = opts.containsKey("mambaImage") ? opts.get("mambaImage").toString(): DEFAULT_MAMBA_IMAGE; | ||
this.commands = opts.containsKey("commands") ? (List<String>)opts.get("commands") : null; | ||
this.basePackages = (String)opts.get("basePackages"); | ||
} | ||
|
||
} |
58 changes: 58 additions & 0 deletions
58
plugins/nf-wave/src/main/io/seqera/wave/config/SpackOpts.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* Copyright 2013-2023, Seqera Labs | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
*/ | ||
|
||
package io.seqera.wave.config; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
/** | ||
* Spack build options | ||
* | ||
* @author Marco De La Pierre <[email protected]> | ||
*/ | ||
public class SpackOpts { | ||
|
||
final static public String DEFAULT_SPACK_BUILDER_IMAGE = "spack/ubuntu-jammy:v0.19.2"; | ||
final static public String DEFAULT_SPACK_RUNNER_IMAGE = "ubuntu:22.04"; | ||
final static public String DEFAULT_SPACK_OSPACKAGES = ""; | ||
final static public String DEFAULT_SPACK_FLAGS = "-O3"; | ||
|
||
public final Boolean checksum; | ||
public final String builderImage; | ||
public final String runnerImage; | ||
public final String osPackages; | ||
public final String cFlags; | ||
public final String cxxFlags; | ||
public final String fFlags; | ||
public final List<String> commands; | ||
|
||
public SpackOpts() { | ||
this(Map.of()); | ||
} | ||
public SpackOpts(Map<String,?> opts) { | ||
this.checksum = opts.get("checksum") == null || Boolean.parseBoolean(opts.get("checksum").toString()); | ||
this.builderImage = opts.containsKey("builderImage") ? opts.get("builderImage").toString() : DEFAULT_SPACK_BUILDER_IMAGE; | ||
this.runnerImage = opts.containsKey("runnerImage") ? opts.get("runnerImage").toString() : DEFAULT_SPACK_RUNNER_IMAGE; | ||
this.osPackages = opts.containsKey("osPackages") ? opts.get("osPackages").toString() : DEFAULT_SPACK_OSPACKAGES; | ||
this.cFlags = opts.containsKey("cFlags") ? opts.get("cFlags").toString() : DEFAULT_SPACK_FLAGS; | ||
this.cxxFlags = opts.containsKey("cxxFlags") ? opts.get("cxxFlags").toString() : DEFAULT_SPACK_FLAGS; | ||
this.fFlags = opts.containsKey("fFlags") ? opts.get("fFlags").toString() : DEFAULT_SPACK_FLAGS; | ||
this.commands = opts.containsKey("commands") ? (List<String>)opts.get("commands") : null; | ||
} | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
plugins/nf-wave/src/main/io/seqera/wave/plugin/DescribeContainerResponse.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
plugins/nf-wave/src/main/io/seqera/wave/plugin/WaveObserver.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
plugins/nf-wave/src/main/io/seqera/wave/plugin/adapter/InstantAdapter.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
plugins/nf-wave/src/main/io/seqera/wave/plugin/config/ReportOpts.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
plugins/nf-wave/src/main/io/seqera/wave/plugin/config/RetryOpts.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 0 additions & 52 deletions
52
plugins/nf-wave/src/main/io/seqera/wave/plugin/config/SpackOpts.groovy
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.