-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
template updates See merge request epi2melabs/workflow-containers/wf-artic!113
- Loading branch information
Showing
9 changed files
with
232 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Bug Report | ||
description: File a bug report | ||
title: "[Bug]: " | ||
labels: ["bug", "triage"] | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thanks for taking the time to fill out this bug report! | ||
- type: textarea | ||
id: what-happened | ||
attributes: | ||
label: What happened? | ||
description: Also tell us, what did you expect to happen? | ||
placeholder: Tell us what you see! | ||
value: "A bug happened!" | ||
validations: | ||
required: true | ||
- type: dropdown | ||
id: os | ||
attributes: | ||
label: Operating System | ||
description: What operating system are you running? | ||
options: | ||
- Windows 10 | ||
- Windows 11 | ||
- macOS | ||
- ubuntu 18.04 | ||
- ubuntu 20.04 | ||
validations: | ||
required: true | ||
- type: dropdown | ||
id: execution | ||
attributes: | ||
label: Workflow Execution | ||
description: Where are you running the workflow? | ||
options: | ||
- EPI2ME Labs desktop application | ||
- Command line | ||
- EPI2ME | ||
- Other (please describe) | ||
validations: | ||
required: true | ||
- type: input | ||
id: labs-version | ||
attributes: | ||
label: Workflow Execution - EPI2ME Labs Versions | ||
description: If you're running using EPI2ME Labs please provide the version and the environment version (Click the blue help icon bottom left and select ":bout")? | ||
validations: | ||
required: false | ||
- type: dropdown | ||
id: profile | ||
attributes: | ||
label: Workflow Execution - Execution Profile | ||
description: If you're using the CLI to run the workflow, what profile are you using? | ||
options: | ||
- Docker | ||
- Singularity | ||
- Conda | ||
validations: | ||
required: false | ||
- type: input | ||
id: version | ||
attributes: | ||
label: Workflow Version | ||
description: What version of the workflow are you running? | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: logs | ||
attributes: | ||
label: Relevant log output | ||
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. | ||
render: shell | ||
validations: | ||
required: true |
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,5 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Nanopore customer support | ||
url: https://nanoporetech.com/contact | ||
about: For general support, including bioinformatics questions. |
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
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,61 @@ | ||
/* Check arguments of a Nextflow function | ||
* | ||
* Nextflow script does not support the Groovy idiom: | ||
* | ||
* def function(Map args[:], arg1, arg2, ...) | ||
* | ||
* to support unordered kwargs. The methods here are designed | ||
* to reduce boileplate while allowing Nextflow script to implement | ||
* | ||
* def function(Map args[:]) | ||
* | ||
* with required and default values. This is similar to some Python | ||
* libraries' (notably matplotlib) extensive use of things like: | ||
* | ||
* def function(*args, **kwargs) | ||
* | ||
* to implement generic APIs. Why do we want to do all this? Because | ||
* we want to write library code with a clean set of required parameters | ||
* but also extensible with non-required parameters with default values. | ||
* This allows us to later add parameters without breaking existing code, | ||
* and is very common practice elsewhere. | ||
*/ | ||
|
||
import java.util.Set | ||
|
||
class ArgumentParser { | ||
Set args | ||
Map kwargs | ||
String name | ||
|
||
/* Parse arguments, raising an error on unknown keys */ | ||
public Map parse_args(LinkedHashMap given_args) { | ||
Set opt_keys = kwargs.keySet() | ||
Set given_keys = given_args.keySet() | ||
check_required(given_keys) | ||
check_unknown(given_keys, opt_keys) | ||
return kwargs + given_args | ||
} | ||
|
||
/* Parse arguments, without raising an error for extra keys */ | ||
public Map parse_known_args(LinkedHashMap given_args) { | ||
Set opt_keys = kwargs.keySet() | ||
Set given_keys = given_args.keySet() | ||
check_required(given_keys) | ||
return kwargs + given_args | ||
} | ||
|
||
private void check_required(Set given) { | ||
Set missing_keys = args - given | ||
if (!missing_keys.isEmpty()) { | ||
throw new Exception("Missing arguments for function ${name}: ${missing_keys}") | ||
} | ||
} | ||
|
||
private void check_unknown(Set given, Set kwargs_keys) { | ||
Set extra_keys = given - (args + kwargs_keys) | ||
if (!extra_keys.isEmpty()) { | ||
throw new Exception("Unknown arguments provided to function ${name}: ${extra_keys}.") | ||
} | ||
} | ||
} |
Oops, something went wrong.