nf-core / nf-core/tools

Creating a new module (seq2HLA) fails ungracefully

Open
#3,719 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
322
Forks
255
Avg merge
2d 3h
Merged PRs (30d)
5

Description

Description of the bug

When creating a new module in the modules repo with 3.4.0dev, the creation itself appears to work, but still the command fails ungracefully:

Command used and terminal output
> nf-core modules create    

nf-core/tools version 3.4.0.dev0 - https://nf-co.re


INFO     Repository type: modules                                                                                                                          
INFO     Press enter to use default values (shown in brackets) or type your own responses. ctrl+click underlined text to open links.                       
INFO     Using Bioconda package: 'bioconda::seq2hla=2.3'                                                                                                   
INFO     Using Docker container: 'biocontainers/seq2hla:2.3--hdfd78af_1'                                                                                   
INFO     Using Singularity container: 'https://depot.galaxyproject.org/singularity/seq2hla:2.3--hdfd78af_1'                                                
INFO     Found bio.tools information for 'seq2hla'                                                                                                         
INFO     Found bio.tools ID: 'biotools:seq2hla'                                                                                                            
GitHub Username: (@author): @FriederikeHanssen   
INFO     Provide an appropriate resource label for the process, taken from the nf-core pipeline template.                                                  
         For example: process_single, process_low, process_medium, process_high, process_long, process_high_memory                                         
? Process resource label: process_single
INFO     Where applicable all sample-specific information e.g. 'id', 'single_end', 'read_group' MUST be provided as an input via a Groovy Map called       
         'meta'. This information may not be required in some instances, for example indexing reference genome files.                                      
Will the module require a meta map of sample information? [y/n] (y): y
INFO     Created component template: 'seq2hla'                                                                                                             
CRITICAL Can't format ['modules/nf-core/seq2hla/main.nf', 'modules/nf-core/seq2hla/meta.yml', 'modules/nf-core/seq2hla/environment.yml',                   
         'modules/nf-core/seq2hla/tests/main.nf.test'] because it has a syntax error.                                                                      
         [INFO] Initializing environment for https://github.com/pre-commit/mirrors-prettier.                                                               
         [INFO] Initializing environment for https://github.com/pre-commit/mirrors-prettier:prettier@2.7.1.                                                
         [INFO] Installing environment for https://github.com/pre-commit/mirrors-prettier.                                                                 
         [INFO] Once installed this environment will be reused.                                                                                            
         [INFO] This may take a few minutes...                                                                                                             
         prettier.................................................................Failed                                                                   
         - hook id: prettier                                                                                                                               
         - exit code: 2                                                                                                                                    
                                                                                                                                                           
          modules/nf-core/seq2hla/meta.yml: SyntaxError: Sequence items must not have preceding content on the same line (26:13)                           
            24 | output:                                                                                                                                   
            25 | # TODO nf-core: Update the information obtained from bio.tools and make sure that it is correct                                           
          > 26 |   versions: -                                                                                                                             
               |             ^                                                                                                                             
          > 27 |     versions.yml:                                                                                                                         
               | ^^^^^^^^^^^^^^^^^                                                                                                                         
          > 28 |       type: file                                                                                                                          
               | ^^^^^^^^^^^^^^^^^                                                                                                                         
          > 29 |       description: File containing software versions                                                                                      
               | ^^^^^^^^^^^^^^^^^                                                                                                                         
          > 30 |       pattern: versions.yml                                                                                                               
               | ^^^^^^^^^^^^^^^^^                                                                                                                         
          > 31 |       ontologies:                                                                                                                         
               | ^^^^^^^^^^^^^^^^^                                                                                                                         
          > 32 |       - edam: http://edamontology.org/format_3750  # YAML                                                                                 
               | ^^^^^^^^^^^^^^^^^                                                                                                                         
          > 33 | authors:                                                                                                                                  
               | ^                                                                                                                                         
            34 | - "@FriederikeHanssen"                                                                                                                    
            35 | maintainers:                                                                                                                              
            36 | - "@FriederikeHanssen"                                                                                                                    
                                                                                                                                                           
                                                                                                                                                           
INFO     Created following files:                                                                                                                          
           modules/nf-core/seq2hla/main.nf                                                                                                                 
           modules/nf-core/seq2hla/meta.yml                                                                                                                
           modules/nf-core/seq2hla/environment.yml                                                                                                         
           modules/nf-core/seq2hla/tests/main.nf.test
System information

tools version: 3.4.0.dev0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with nf-core modules create using tools version 3.4.0.dev0, then inspect the generated modules/nf-core/seq2hla/meta.yml around the versions output. Run the reported Prettier hook against the created files; done means module creation completes without the YAML syntax error and the generated files are formatted successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.