Nicolas Vannieuwkerke
06/07/2024, 11:53 AMTraceObserver? I'm trying to create a plugin that uses it but can't get it working and could use a good example to take inspiration from 🙂Jorge
06/07/2024, 12:26 PMNicolas Vannieuwkerke
06/07/2024, 12:26 PMnf-hello and nf-quilt and couldn't get it working 😕 I sadly can't share a repo since it's on a private organizationJorge
06/07/2024, 12:32 PMNicolas Vannieuwkerke
06/07/2024, 12:34 PMextensions.idx looks like:
nextflow.drs.DrsObserverFactory
This is how the factory looks like:
class DrsObserverFactory implements TraceObserverFactory {
/**
* Create the TraceObserverFactory
*
* @param session A nextflow session instance.
*/
@Override
Collection<TraceObserver> create(Session session) {
final enabled = session.config.navigate("drs.enabled")
log.warn("Trying to create a TraceObserver")
return enabled ? [ new DrsObserver() ] = []
}
}Nicolas Vannieuwkerke
06/07/2024, 12:34 PMDrsObserverFactory somehow and I'm not sure whyJorge
06/07/2024, 12:54 PMNicolas Vannieuwkerke
06/07/2024, 12:55 PMJun-07 14:33:07.710 [main] DEBUG nextflow.plugin.PluginsFacade - Plugins resolved requirement=[nf-drs]
Jun-07 14:33:07.711 [main] DEBUG nextflow.plugin.PluginUpdater - Update not supported during development mode
Jun-07 14:33:07.711 [main] DEBUG nextflow.plugin.PluginUpdater - Starting plugin nf-drs version: 0.1.0
Jun-07 14:33:07.711 [main] INFO org.pf4j.AbstractPluginManager - Start plugin 'nf-drs@0.1.0'Jorge
06/07/2024, 12:56 PMNicolas Vannieuwkerke
06/07/2024, 12:57 PMJorge
06/07/2024, 1:04 PMNicolas Vannieuwkerke
06/07/2024, 1:05 PMNicolas Vannieuwkerke
06/07/2024, 1:46 PMNicolas Vannieuwkerke
06/07/2024, 1:47 PMbin/ folder instead of the src/ folder...Nicolas Vannieuwkerke
06/10/2024, 8:20 AMPlugin 'nf-drs' does not implement any extension point -- Check script '/home/nvnieuwk/Documents/cmgg/testpipeline/main.nf' at line: 1 or see '.nextflow.log' file for more details
Would you have any idea how to fix this? This is how my extension point looks like:
@Slf4j
@CompileStatic
class DrsExtension extends PluginExtensionPoint {
/**
* A session holds information about current nextflow execution.
*/
protected Session session
/**
* A custom configuration extracted from the drs scope.
*/
protected DrsConfig config
/**
* An extension that is automatically initialized by nextflow when the session is ready.
*
* @param session A nextflow session instance.
*/
@Override
protected void init(final Session session) {
this.session = session
this.config = new DrsConfig(session.config?.navigate('drs') as Map)
}
@Function
public String testFunction() {
return "testHello"
}
}Jorge
06/10/2024, 8:26 AMNicolas Vannieuwkerke
06/10/2024, 8:27 AMNicolas Vannieuwkerke
06/10/2024, 8:28 AMNicolas Vannieuwkerke
06/10/2024, 8:28 AMJorge
06/10/2024, 8:29 AMJorge
06/10/2024, 8:31 AMNicolas Vannieuwkerke
06/10/2024, 8:41 AMexport NXF_PLUGINS_DEV="${PWD}/plugins" or is that not the right way to do it?Jorge
06/10/2024, 8:44 AMNicolas Vannieuwkerke
06/10/2024, 8:45 AMJorge
06/10/2024, 8:45 AMNicolas Vannieuwkerke
06/10/2024, 8:45 AMnextflow.drs.DrsObserverFactory
nextflow.drs.DrsExtensionNicolas Vannieuwkerke
06/10/2024, 8:50 AMNicolas Vannieuwkerke
06/10/2024, 8:50 AMNicolas Vannieuwkerke
06/10/2024, 8:51 AMNicolas Vannieuwkerke
06/10/2024, 12:13 PM