Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.7.4: print exception stack trace #152

Merged
merged 6 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [0.7.4] 2023-10-16b

- Actually print the exception stack trace
- `make install` to enable nextflow testing

## [0.7.3] 2023-10-16a

- Catch and log exception on push failure
Expand Down
36 changes: 12 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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=<value>' to override"
Expand All @@ -39,9 +44,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
Expand All @@ -67,42 +69,28 @@ 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
#

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
#
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

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

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -75,15 +75,15 @@ 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 [email protected].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 [email protected].4
```

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:
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion plugins/nf-quilt/src/main/nextflow/quilt/QuiltProduct.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/nf-quilt/src/resources/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -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

Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -129,7 +130,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 = [
Expand Down
Loading