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

Plugin references both monochrome_logs and monochromeLogs #14

Closed
Midnighter opened this issue Nov 27, 2023 · 1 comment
Closed

Plugin references both monochrome_logs and monochromeLogs #14

Midnighter opened this issue Nov 27, 2023 · 1 comment

Comments

@Midnighter
Copy link

Midnighter commented Nov 27, 2023

The plugin configures its own logging using nf-core conventions. For this it uses both parameters monochrome_logs and monochromeLogs. I assume the latter is supported for backwards compatibility. However, the current code creates a slightly annoying warning (as in, the warning may confuse users who don't know what it means).

WARN: Access to undefined parameter `monochromeLogs` -- Initialise it to a default value eg. `params.monochromeLogs = some_value`

I looked a bit in the code and I think it must be triggered by the containsKey method on line 248 in the SchemaValidator.groovy file, since you set the value afterwards, which I guess was intended to avoid exactly this.

        if( !params.containsKey("monochromeLogs") ) {
            params.monochromeLogs = false
        }

Alternatively, setting the value does not work as expected such that it is still null in the outer scope.

I'm, unfortunately, not familiar with the gradle build tools and testing, otherwise I could work on a fix myself. One suggestion would be to use the session.params, to initialize the plugin's own settings (which can be more or less a copy), rather than continuing to use those for checks.

@Midnighter Midnighter changed the title Plugin references both monochome_logs and monochromeLogs Plugin references both monochrome_logs and monochromeLogs Nov 27, 2023
@nvnieuwk nvnieuwk transferred this issue from nextflow-io/nf-validation Apr 23, 2024
@nvnieuwk
Copy link
Collaborator

This problem has been solved by moving to the validation.monochromeLogs configuration option instead in nf-schema

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants