Skip to content

Commit

Permalink
Merge pull request #58 from seqeralabs/dev
Browse files Browse the repository at this point in the history
Dev -> Main for 0.4.0 release
  • Loading branch information
drpatelh committed Jul 26, 2024
2 parents c9aec68 + a98423a commit 3831d1f
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 8 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [[0.4.0](https://github.com/seqeralabs/nf-aggregate/releases/tag/0.4.0)] - 2024-07-26

### Credits

Special thanks to the following for their contributions to the release:

- [Friederike Hanssen](https://github.com/FriederikeHanssen)

Thank you to everyone else that has contributed by reporting bugs, enhancements or in any other way, shape or form.

### Enhancements & fixes

[PR #52](https://github.com/seqeralabs/nf-aggregate/pull/52) - Organise results folder structure by pipeline
[PR #53](https://github.com/seqeralabs/nf-aggregate/pull/53) - Throw exception and terminate workflow in case config can't be read
[PR #57](https://github.com/seqeralabs/nf-aggregate/pull/57) - Check if fusion is enabled via the Platform API

## [[0.3.0](https://github.com/seqeralabs/nf-aggregate/releases/tag/0.3.0)] - 2024-07-01

### Credits
Expand Down
13 changes: 10 additions & 3 deletions modules/local/seqera_runs_dump/functions.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
@Grab('com.github.groovy-wslite:groovy-wslite:1.1.2;transitive=false')
import wslite.rest.RESTClient
import groovy.json.JsonSlurper
import nextflow.exception.ProcessException
import groovy.json.JsonBuilder

// Set system properties for custom Java trustStore
def setTrustStore(trustStorePath, trustStorePassword) {
Expand Down Expand Up @@ -47,9 +49,11 @@ Map getRunMetadata(meta, log, api_endpoint, trustStorePath, trustStorePassword)
if (workspaceId) {
def workflowResponse = client.get(path: "/workflow/${runId}", query: ["workspaceId":workspaceId], headers: authHeader)
if (workflowResponse.statusCode == 200) {
metaMap = workflowResponse?.json?.workflow?.subMap("runName", "workDir", "projectName")
config = new ConfigSlurper().parse( workflowResponse?.json?.workflow?.configText )
metaMap.fusion = config.fusion.enabled
def metaMap = workflowResponse?.json?.workflow?.subMap("runName", "workDir", "projectName")
def configText = new JsonBuilder(workflowResponse?.json?.workflow?.configText)
def pattern = /fusion\s*\{\\n\s*enabled\s*=\s*true/
def matcher = configText.toPrettyString() =~ pattern
metaMap.fusion = matcher.find()

return metaMap ?: [:]
}
Expand All @@ -60,12 +64,15 @@ Map getRunMetadata(meta, log, api_endpoint, trustStorePath, trustStorePassword)
↳ Status code ${ex.response?.statusCode} returned from request to ${ex.request?.url} (authentication headers excluded)
""".stripIndent()
log.error "Exception: ${ex.message}", ex
throw new ProcessException("Failed to get workflow details for workflow ${runId} in workspace ${meta.workspace}", ex)
} catch (Exception ex) {
log.warn """
An error occurred while getting workflow details for workflow ${runId} in workspace ${meta.workspace}:
${ex.message}
""".stripIndent()
log.error "Exception: ${ex.message}", ex
throw new ProcessException("Failed to get workflow details for workflow ${runId} in workspace ${meta.workspace}", ex)

}
return [:]
}
6 changes: 3 additions & 3 deletions modules/local/seqera_runs_dump/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Should run without failures": {
"content": [
[
"service-info.json:md5,108f149aafa287bb56d715c0c7ee0359",
"service-info.json:md5,72586e82ad2064d1a90008c7956d80d8",
"workflow-load.json:md5,4f02d5a24ab89aa648cd4346785c8f2c",
"workflow-metadata.json:md5,b37b4faeddf283a2c44cbe4000e4ab6e",
"workflow-metrics.json:md5,13a5b5d7447fad4a8baa053d1abf85e5",
Expand All @@ -13,8 +13,8 @@
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
"nextflow": "24.04.2"
},
"timestamp": "2024-05-20T15:32:40.565622058"
"timestamp": "2024-07-25T10:21:06.447483"
}
}
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,6 @@ manifest {
mainScript = 'main.nf'
nextflowVersion = '!>=23.10.0'
defaultBranch = 'main'
version = '0.3.0'
version = '0.4.0'
doi = ''
}
3 changes: 2 additions & 1 deletion workflows/nf_aggregate/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ workflow NF_AGGREGATE {
skip_multiqc // val: Skip MultiQC
java_truststore_path // val: Path to java truststore if using private certs
java_truststore_password // val: Password for java truststore if using private certs

main:

ch_versions = Channel.empty()
Expand All @@ -30,6 +30,7 @@ workflow NF_AGGREGATE {
//
// MODULE: Fetch run information via the Seqera CLI
//

SEQERA_RUNS_DUMP (
ids,
seqera_api_endpoint,
Expand Down

0 comments on commit 3831d1f

Please sign in to comment.