Skip to content

Commit

Permalink
pass pkg-test if no pre-install()
Browse files Browse the repository at this point in the history
  • Loading branch information
drernie committed Feb 6, 2024
1 parent 9eaf13c commit c808d75
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ ${nextflow}
String[] wildcards = summarize.split(',')
wildcards.each { wildcard ->
List<Path> paths = match(wildcard)
log.debug("setupSummarize: ${paths.size()} matches for ${wildcard}")
paths.each { path ->
String filename = path.getFileName()
Map entry = ['path': path.toString(), 'title': filename]
Expand Down
15 changes: 11 additions & 4 deletions plugins/nf-quilt/src/main/nextflow/quilt/jep/QuiltPackage.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,15 @@ class QuiltPackage {
}

static QuiltPackage forParsed(QuiltParser parsed) {
log.debug("QuiltPackage.forParsed: $parsed")
def pkgKey = parsed.toPackageString()
def pkg = PKGS.get(pkgKey)
log.debug("QuiltPackage.forParsed: $pkgKey -> $pkg")
if (pkg) { return pkg }

log.debug('QuiltPackage.forParsed: new')
pkg = new QuiltPackage(parsed)
log.debug("QuiltPackage.forParsed: -> $pkg")
PKGS[pkgKey] = pkg
return pkg
}
Expand All @@ -95,6 +99,7 @@ class QuiltPackage {
}

static boolean deleteDirectory(Path rootPath) {
log.debug 'deleteDirectory'
try {
if (!Files.exists(rootPath)) { return false }
}
Expand Down Expand Up @@ -162,7 +167,7 @@ class QuiltPackage {
void setup() {
Files.createDirectories(this.folder)
this.installed = false
install() // FIXME: only needed for nextflow < 23.12?
//install() // FIXME: only needed for nextflow < 23.12?
}

boolean is_force() {
Expand Down Expand Up @@ -211,6 +216,7 @@ class QuiltPackage {
// /does-files-createtempdirectory-remove-the-directory-after-jvm-exits-normally
void recursiveDeleteOnExit() throws IOException {
Path path = packageDest()
log.debug("recursiveDeleteOnExit: ${path}")
Files.walkFileTree(path, new SimpleFileVisitor<Path>() {

@Override
Expand All @@ -233,10 +239,11 @@ class QuiltPackage {
Namespace namespace = registry.getNamespace(packageName)

Manifest.Builder builder = Manifest.builder()
Path dest = packageDest()

Files.walk(packageDest()).filter(f -> Files.isRegularFile(f)).forEach(f -> {
log.debug("push: ${f} -> ${packageDest()}")
String logicalKey = packageDest().relativize(f)
Files.walk(dest).filter(f -> Files.isRegularFile(f)).forEach(f -> {
log.debug("push: ${f} -> ${dest}")
String logicalKey = dest.relativize(f)
LocalPhysicalKey physicalKey = new LocalPhysicalKey(f)
long size = Files.size(f)
builder.addEntry(logicalKey, new Entry(physicalKey, size, null, null))
Expand Down

0 comments on commit c808d75

Please sign in to comment.