Hey, would anyone have the time to try out my plug...
# nextflow-plugins
m
Hey, would anyone have the time to try out my plugin? I can include the function as shown in the
<http://main.nf|main.nf>
but it seems to me that the
init
method of the
SlackExtension
class is not called and thus things fail. I'd appreciate any input. https://github.com/Midnighter/nf-slack
πŸ‘ŒπŸ½ 1
πŸ‘€ 1
j
it would be great to include also a DSL test (I like them because are very expressive what your plugin does) For example in nf-hello you can test the operator
Copy code
def 'should perform a hi and create a channel' () {
        when:
        def SCRIPT = '''
            include {reverse} from 'plugin/nf-hello'
            channel.reverse('hi!') 
            '''
        and:
        def result = new MockScriptRunner([:]).setScript(SCRIPT).execute()
        then:
        result.val == '!ih'
        result.val == Channel.STOP
    }
https://github.com/nextflow-io/nf-hello/blob/master/plugins/nf-hello/src/test/nextflow/hello/HelloDslTest.groovy Probably in your case you need to mock the Slack endpoint
m
Yeah, I can add that.
j
testing your plugin I founded a bug in core (I've reported the issue: https://github.com/nextflow-io/nextflow/issues/3348). I'll try to workaround it until it's fixed
m
I think that the NPE that I was seeing comes from the function call which tries to access
this.config
and
this.session
which are
null
because the
init
method wasn't called.
But maybe
init
isn't called because there's no operator defined.
j
exactly
m
I can test later if defining one would fix it.
Thank you for taking a look ☺️
j
congratulations
m
🍌
r
standing ovation
m
Still some work to do, to make it generally available but thanks πŸ˜€
Awesome, thank you for the changes @Jorge. Tested locally with the latest nextflow and it works. Now I just have to wait for the next release πŸ˜…
πŸ™Œ 1