Skip to content

Commit

Permalink
fix(test): debugging for CommitCanvasTeston github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
cmhulbert committed Dec 16, 2024
1 parent 9f5ed24 commit 0626e2e
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.janelia.saalfeldlab.util.n5

import io.github.oshai.kotlinlogging.KotlinLogging
import org.commonmark.internal.util.Parsing
import org.janelia.saalfeldlab.n5.N5Reader
import org.janelia.saalfeldlab.n5.universe.N5DatasetDiscoverer
import org.janelia.saalfeldlab.n5.universe.N5TreeNode
Expand Down Expand Up @@ -27,6 +29,8 @@ private fun getDiscoverer(n5: N5Reader): N5DatasetDiscoverer {
return N5DatasetDiscoverer(n5, IO_EXECUTOR, METADATA_PARSERS, GROUP_PARSERS)
}

private val LOG = KotlinLogging.logger { }

/**
* Parses the metadata from a given N5Reader starting at a specified initial group and applies parsing results to nodes
* using the provided callback function.
Expand All @@ -39,5 +43,9 @@ private fun getDiscoverer(n5: N5Reader): N5DatasetDiscoverer {
@JvmOverloads
internal fun discoverAndParseRecursive(n5Reader: N5Reader, initialGroup: String = "/", callback: (N5TreeNode) -> Unit = {}): N5TreeNode {
val discoverer = getDiscoverer(n5Reader)
return discoverer.discoverAndParseRecursive(initialGroup, callback)
println("\tParsing ${n5Reader.uri}")
return discoverer.discoverAndParseRecursive(initialGroup) {
println("\t\tDiscovered dataset ${it.path} with metadata ${it.metadata}")
callback(it)
}
}

0 comments on commit 0626e2e

Please sign in to comment.