From fb6a87a97b8fa84fa14749eb198f3dda0566374e Mon Sep 17 00:00:00 2001 From: Dima Ryazanov Date: Mon, 16 Oct 2023 22:43:16 -0700 Subject: [PATCH 1/6] 0.7.4: print exception stack trace --- CHANGELOG.md | 4 ++++ README.md | 4 ++-- plugins/nf-quilt/src/main/nextflow/quilt/QuiltProduct.groovy | 3 ++- plugins/nf-quilt/src/resources/META-INF/MANIFEST.MF | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0aacd619..b5289682 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [0.7.4] 2023-10-16b + +- Actually print the exception stack trace + ## [0.7.3] 2023-10-16a - Catch and log exception on push failure diff --git a/README.md b/README.md index 37fb020e..f076eb84 100644 --- a/README.md +++ b/README.md @@ -75,8 +75,8 @@ From the command-line, do, e.g.: ```bash # export NXF_VER=23.04.3 -export NXF_PLUGINS_TEST_REPOSITORY=https://github.com/quiltdata/nf-quilt/releases/download/0.7.3/nf-quilt-0.7.3-meta.json -nextflow run main.nf -plugins nf-quilt@0.7.3 +export NXF_PLUGINS_TEST_REPOSITORY=https://github.com/quiltdata/nf-quilt/releases/download/0.7.4/nf-quilt-0.7.4-meta.json +nextflow run main.nf -plugins nf-quilt@0.7.4 ``` For Tower, you can use the "Pre-run script" to set the environment variables. diff --git a/plugins/nf-quilt/src/main/nextflow/quilt/QuiltProduct.groovy b/plugins/nf-quilt/src/main/nextflow/quilt/QuiltProduct.groovy index 8522cf95..3e52d976 100644 --- a/plugins/nf-quilt/src/main/nextflow/quilt/QuiltProduct.groovy +++ b/plugins/nf-quilt/src/main/nextflow/quilt/QuiltProduct.groovy @@ -142,7 +142,8 @@ ${nextflow} pkg.push(msg, meta) } catch (Exception e) { - log.error("publish failed: ${e.getMessage()}\n${e}", pkg.meta) + log.error("publish failed:", e) + throw e } print("SUCCESS: $pkg\n") } diff --git a/plugins/nf-quilt/src/resources/META-INF/MANIFEST.MF b/plugins/nf-quilt/src/resources/META-INF/MANIFEST.MF index a3c9adec..c389fb18 100644 --- a/plugins/nf-quilt/src/resources/META-INF/MANIFEST.MF +++ b/plugins/nf-quilt/src/resources/META-INF/MANIFEST.MF @@ -1,7 +1,7 @@ Manifest-Version: 1.0 Plugin-Class: nextflow.quilt.QuiltPlugin Plugin-Id: nf-quilt -Plugin-Version: 0.7.3 +Plugin-Version: 0.7.4 Plugin-Provider: Quilt Data Plugin-Requires: >=22.10.6 From 0234f17ceda4706c35dc3ac5b3c72cc3a084cf1b Mon Sep 17 00:00:00 2001 From: Ernest Prabhakar Date: Tue, 17 Oct 2023 08:20:09 +0200 Subject: [PATCH 2/6] skip misssing feature --- .../nf-quilt/src/test/nextflow/quilt/QuiltProductTest.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/nf-quilt/src/test/nextflow/quilt/QuiltProductTest.groovy b/plugins/nf-quilt/src/test/nextflow/quilt/QuiltProductTest.groovy index c839aa97..28c2d630 100644 --- a/plugins/nf-quilt/src/test/nextflow/quilt/QuiltProductTest.groovy +++ b/plugins/nf-quilt/src/test/nextflow/quilt/QuiltProductTest.groovy @@ -129,7 +129,7 @@ class QuiltProductTest extends QuiltSpecification { quilt_summarize.size() == 1 } - @IgnoreIf({ env.WRITE_BUCKET == 'quilt-example' || env.WRITE_BUCKET == null }) + @Ignore('Not implemented yet') void 'pushes previous metadata if metadata=SKIP'() { given: Map meta = [ From 75df190a3436e6603cd91c7cc2848b314f9675ea Mon Sep 17 00:00:00 2001 From: Ernest Prabhakar Date: Tue, 17 Oct 2023 08:24:01 +0200 Subject: [PATCH 3/6] purge obsolete Makefile targets --- Makefile | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/Makefile b/Makefile index 471ac934..8e093341 100644 --- a/Makefile +++ b/Makefile @@ -39,9 +39,6 @@ compile-all: nextflow compile check: ./gradlew check --warning-mode all -coverage: compile - ./gradlew cloverInstrumentCodeForTest - .PHONY: clean test test-all all pkg-test tower-test test: clean compile check #coverage @@ -78,12 +75,6 @@ $(PIPELINE): compile-all deps: ./gradlew -q ${mm}dependencies -# echo "try 'make deps CONFIG=runtimeClasspath' or 'make deps CONFIG=groovyDoc'" -# ./gradlew -q ${mm}dependencies --configuration ${CONFIG} - -deps-all: - ./gradlew -q dependencyInsight -# ./gradlew -q ${mm}dependencies --configuration ${CONFIG} --dependency ${module} # # Refresh SNAPSHOTs dependencies @@ -91,15 +82,6 @@ deps-all: refresh: ./gradlew --refresh-dependencies dependencies -# -# Run all tests or selected ones -# -#test: -# ./gradlew ${mm}test - -test-class: - ./gradlew ${mm}test --tests ${class} - fast: ./gradlew ${mm}test --fail-fast || open ./plugins/nf-quilt/build/reports/tests/test/index.html From 617972e39e3a5267575202206e3afbf735519f0e Mon Sep 17 00:00:00 2001 From: Ernest Prabhakar Date: Tue, 17 Oct 2023 08:32:31 +0200 Subject: [PATCH 4/6] make install --- CHANGELOG.md | 1 + Makefile | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b5289682..c4ee7145 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## [0.7.4] 2023-10-16b - Actually print the exception stack trace +- `make install` to enable nextflow testing ## [0.7.3] 2023-10-16a diff --git a/Makefile b/Makefile index 8e093341..8916f0f8 100644 --- a/Makefile +++ b/Makefile @@ -9,12 +9,17 @@ QUERY ?= ?Name=$(USER)&Owner=Kevin+Moore&Date=2023-03-07&Type=CRISPR&Notebook+UR TEST_URI ?= quilt+s3://$(WRITE_BUCKET)$(QUERY)\#package=test/hurdat$(FRAGMENT) QUILT_URI ?= quilt+s3://$(WRITE_BUCKET)\#package=$(PROJECT)/$(PIPELINE) REPORT ?= ./plugins/$(PROJECT)/build/reports/tests/test/index.html +VERSION ?= $(shell grep 'Plugin-Version' plugins/$(PROJECT)/src/resources/META-INF/MANIFEST.MF | awk '{ print $$2 }') verify: #compile echo $(WRITE_BUCKET) ./gradlew check || open $(REPORT) +fast: + ./gradlew ${mm}test --fail-fast || open ./plugins/nf-quilt/build/reports/tests/test/index.html + check-env: + echo $(VERSION) echo $(WRITE_BUCKET) echo "$(TEST_URI)" echo "Use 'make WRITE_BUCKET=' to override" @@ -64,10 +69,10 @@ tower-test: compile-all # use `make $(PIPELINE) WRITE_BUCKET=my-s3-bucket` to publish `--outdir` to a Quilt package -$(PIPELINE): compile-all +$(PIPELINE): compile install echo "Ensure you have docker running" - ./launch.sh pull nf-core/$(PIPELINE) - ./launch.sh run nf-core/$(PIPELINE) -profile test,docker -plugins $(PROJECT) --outdir "$(QUILT_URI)" + nextflow pull nf-core/$(PIPELINE) + nextflow run nf-core/$(PIPELINE) -profile test,docker -plugins $(PROJECT)@$(VERSION) --outdir "$(QUILT_URI)" # # Show dependencies @@ -82,9 +87,10 @@ deps: refresh: ./gradlew --refresh-dependencies dependencies -fast: - ./gradlew ${mm}test --fail-fast || open ./plugins/nf-quilt/build/reports/tests/test/index.html - +install: + ./gradlew copyPluginZip + rm -rf ${HOME}/.nextflow/plugins/$(PROJECT)-${VERSION} + cp -r build/plugins/$(PROJECT)-${VERSION} ${HOME}/.nextflow/plugins/ # # Upload JAR artifacts to Maven Central From 8fa98a723780dbd818203db3fbb5cda5445880a2 Mon Sep 17 00:00:00 2001 From: Ernest Prabhakar Date: Tue, 17 Oct 2023 08:38:10 +0200 Subject: [PATCH 5/6] cleanup README --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f076eb84..aad59957 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ You can also specify these as YAML to pass to `-params-file`: ```yaml input: "quilt+s3://quilt-example#package=examples/hurdat" -outdir: "quilt+s3://seqera-quilt#package=test/hurdat" +outdir: "quilt+s3://nf-core-gallery#package=test/hurdat" ``` Note that `--key` on the command-line corresponds to `params.key` in your script. @@ -83,7 +83,7 @@ For Tower, you can use the "Pre-run script" to set the environment variables. ## II. Advanced URI Options -There are a number of additional paramters you can add to Quilt+ URIs, +There are a number of additional parameters you can add to Quilt+ URIs, in order to customize the behavior of the plugin: * Fragment Parameters: @@ -95,7 +95,7 @@ in order to customize the behavior of the plugin: * Query Parameters: also stored as package-level metadata * **msg**: specify the commit message to use when saving the package - * **readme**: specify a string for the package README + * **readme**: specify a string for the package README_NF_QUILT.md file (will substitute "${variables}"), or SKIP to not create a README * **metadata**: specify SKIP to not push any new metadata (implicit or explicit) * **_any other key_**: specify any other metadata key to store in the package From 23c1d26e387747e7a259e1439e17731d688f2a32 Mon Sep 17 00:00:00 2001 From: Ernest Prabhakar Date: Tue, 17 Oct 2023 08:40:41 +0200 Subject: [PATCH 6/6] fix Ignore --- plugins/nf-quilt/src/test/nextflow/quilt/QuiltProductTest.groovy | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/nf-quilt/src/test/nextflow/quilt/QuiltProductTest.groovy b/plugins/nf-quilt/src/test/nextflow/quilt/QuiltProductTest.groovy index 28c2d630..d1a10909 100644 --- a/plugins/nf-quilt/src/test/nextflow/quilt/QuiltProductTest.groovy +++ b/plugins/nf-quilt/src/test/nextflow/quilt/QuiltProductTest.groovy @@ -26,6 +26,7 @@ import java.nio.file.Files import java.nio.file.Path import java.nio.file.Paths import groovy.transform.CompileDynamic +import spock.lang.Ignore import spock.lang.IgnoreIf import spock.lang.Unroll