Skip to content

FIX: Strict syntax for eager/eva#1083

Open
maxulysse wants to merge 2 commits intomasterfrom
eager/eva
Open

FIX: Strict syntax for eager/eva#1083
maxulysse wants to merge 2 commits intomasterfrom
eager/eva

Conversation

@maxulysse
Copy link
Copy Markdown
Member


name: New Config
about: A new cluster config

Please follow these steps before submitting your PR:

  • If your PR is a work in progress, include [WIP] in its title
  • Your PR targets the master branch
  • You've included links to relevant issues, if any

Steps for adding a new config profile:

  • Add your custom config file to the conf/ directory
  • Add your documentation file to the docs/ directory
  • Add your custom profile to the nfcore_custom.config file in the top-level directory
  • Add your profile name to the profile: scope in .github/workflows/main.yml
  • OPTIONAL: Add your custom profile path and GitHub user name to .github/CODEOWNERS (**/<custom-profile>** @<github-username>)

@maxulysse
Copy link
Copy Markdown
Member Author

@jfy133 @TCLamnidis I tried to update this config to work with the coming new syntax (cf nf-co.re/blog/2026/configs-strict-syntax).
Please have a look, and let us know if it's working for you

@TCLamnidis
Copy link
Copy Markdown
Contributor

testing this today. sorry for the delay

@TCLamnidis
Copy link
Copy Markdown
Contributor

Preliminary results (still debugging as I'm not sure where the error is coming from):
Trying to set the custom config base and run this profiles throws an error (same thing happens when setting custom_config_version to eager/eva, which is expected):

$ nextflow run nf-core/eager -r 2.5.3 --custom_config_base 'https://raw.githubusercontent.com/nf-core/configs/refs/heads/eager/eva' -profile test,eva,archgen -w temp --outdir results 
N E X T F L O W  ~  version 22.04.5
WARNING: Could not load nf-core/config/eager profiles: https://raw.githubusercontent.com/nf-core/configs/refs/heads/eager/eva/pipeline/eager.config
No such file: Config file does not exist: https://raw.githubusercontent.com/nf-core/configs/refs/heads/eager/eva/pipeline/conf/test.config

While downloading locally and prviding the config with -c throws a different error:

$ nextflow run nf-core/eager -r 2.5.3 -profile test,eva,archgen -w temp --outdir results -c eva.config 
N E X T F L O W  ~  version 22.04.5
Launching `https://github.com/nf-core/eager` [determined_lumiere] DSL1 - revision: 3f9d64ced5 [2.5.3]


------------------------------------------------------
                                        ,--./,-.
        ___     __   __   __   ___     /,-._.--~'
  |\ | |__  __ /  ` /  \ |__) |__         }  {
  | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                        `._,._,'
  nf-core/eager v2.5.3
------------------------------------------------------

Invalid method invocation `doCall` with arguments:  on _run_closure5 type

 -- Check script '/home/thiseas_christos_lamnidis/.nextflow/assets/nf-core/eager/main.nf' at line: 31 or see '.nextflow.log' file for more details

@jfy133
Copy link
Copy Markdown
Member

jfy133 commented Apr 14, 2026

Could it be because the nextflow version is too old I wonder?

@TCLamnidis
Copy link
Copy Markdown
Contributor

I tried to mimic the nf-core config setup as much as possible locally.
I downloaded eva.config locally, and set up include.config with:

profiles {
    eva {
        includeConfig "/path/to/eva.config"
    }
}

Then ran nextflow run nf-core/eager -r 2.5.3 -profile eva,archgen,test -w temp --outdir results -c include.config

N E X T F L O W  ~  version 22.04.5
Unable to parse config file: '/[...]/include.config'

  Compile failed for sources FixedSetSources[name='/groovy/script/Script4859A5D001FCE1163A6160201FFBB497']. Cause: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
  /groovy/script/Script4859A5D001FCE1163A6160201FFBB497: 638: unable to resolve class MemoryUnit
   @ line 638, column 31.
                 if (obj.compareTo(params.max_memory as MemoryUnit) == 1)
                                   ^
  
  /groovy/script/Script4859A5D001FCE1163A6160201FFBB497: 639: unable to resolve class MemoryUnit
   @ line 639, column 24.
                     return params.max_memory as MemoryUnit
                            ^
  
  /groovy/script/Script4859A5D001FCE1163A6160201FFBB497: 648: unable to resolve class Duration
   @ line 648, column 31.
                 if (obj.compareTo(params.max_time as Duration) == 1)
                                   ^
  
  /groovy/script/Script4859A5D001FCE1163A6160201FFBB497: 649: unable to resolve class Duration
   @ line 649, column 24.
                     return params.max_time as Duration
                            ^
  
  4 errors

So I don't think this approach works? at least not for NXF 22.04.5?

@TCLamnidis
Copy link
Copy Markdown
Contributor

Re-adding the nextflow.util before the MemoryUnit and Duration stops the errors about configurations.

params.eager_eva_check_max_func = { obj, type ->
    if (type == 'memory') {
        try {
            if (obj.compareTo(params.max_memory as nextflow.util.MemoryUnit) == 1)
                return params.max_memory as nextflow.util.MemoryUnit
            else
                return obj
        } catch (_) {
            println "   ### ERROR ###   Max memory '${params.max_memory}' is not valid! Using default value: $obj"
            return obj
        }
    } else if (type == 'time') {
        try {
            if (obj.compareTo(params.max_time as nextflow.util.Duration) == 1)
                return params.max_time as nextflow.util.Duration
            else
                return obj
        } catch (_) {
            println "   ### ERROR ###   Max time '${params.max_time}' is not valid! Using default value: $obj"
            return obj
        }
    } else if (type == 'cpus') {
        try {
            return Math.min( obj, params.max_cpus as int )
        } catch (_) {
            println "   ### ERROR ###   Max cpus '${params.max_cpus}' is not valid! Using default value: $obj"
            return obj
        }
    }
}

The pipeline still fails at startup with error:

 -- Check script '/home/thiseas_christos_lamnidis/.nextflow/assets/nf-core/eager/main.nf' at line: 31 or see '.nextflow.log' file for more details

line 31 in main is:

    NfcoreSchema.validateParameters(params, json_schema, log)

@maxulysse
Copy link
Copy Markdown
Member Author

@nvnieuwk any idea, you provided the fix

@nvnieuwk
Copy link
Copy Markdown
Contributor

Yes, parameter functions don't work, I've discussed this config with @jfy133 and we decided that we should keep one DSL1 version of this config for backwards compatibility for now and migrate this to a proper config once the DSL2 version releases

@maxulysse
Copy link
Copy Markdown
Member Author

Yes, parameter functions don't work, I've discussed this config with @jfy133 and we decided that we should keep one DSL1 version of this config for backwards compatibility for now and migrate this to a proper config once the DSL2 version releases

ok, so what do we do here?

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

Successfully merging this pull request may close these issues.

4 participants