Skip to content

handle type for val in topics correctly#3991

Merged
mashehu merged 6 commits intonf-core:devfrom
mashehu:fix-val-as-topic
Jan 30, 2026
Merged

handle type for val in topics correctly#3991
mashehu merged 6 commits intonf-core:devfrom
mashehu:fix-val-as-topic

Conversation

@mashehu
Copy link
Copy Markdown
Contributor

@mashehu mashehu commented Jan 21, 2026

Closes #3985

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.67%. Comparing base (2ef9d0f) to head (b698d1e).
⚠️ Report is 11 commits behind head on dev.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@prototaxites
Copy link
Copy Markdown
Contributor

Works for fastk/fastk, but something is failing after running --fix with merquryfk/merquryfk:

Fixed section of meta.yml:

  versions_merquryfk:
    - - ${task.process}:
          type: string
          description: Name of the process
      - merquryfk:
          type: string
          description: The name of the tool
      - "1.2":
          type: string
          description: The expression to obtain the version of the tool
  versions_fastk:
    - - ${task.process}:
          type: string
          description: Name of the process
      - fastk:
          type: string
          description: Name of the tool
      - "1.2":
          type: string
          description: The expression to obtain the version of the tool
  versions_r:
    - - ${task.process}:
          type: string
          description: Name of the process
      - R:
          type: string
          description: Name of the tool
      - R --version | sed "1!d; s/.*version //; s/ .*//":
          type: eval
          description: The expression to obtain the version of the tool
topics:
  versions:
    - - ${task.process}:
          type: string
          description: Name of the process
      - merquryfk:
          type: string
          description: The name of the tool
      - "1.2":
          type: string
          description: The expression to obtain the version of the tool
    - - ${task.process}:
          type: string
          description: Name of the process
      - fastk:
          type: string
          description: Name of the tool
      - "1.2":
          type: string
          description: The expression to obtain the version of the tool
    - - ${task.process}:
          type: string
          description: Name of the process
      - R:
          type: string
          description: Name of the tool
      - R --version | sed "1!d; s/.*version //; s/ .*//":
          type: eval
          description: The expression to obtain the version of the tool

lint fix output:

~/P/modules merqury_versions• 4.1s | 1 ❱ uvx --from git+https://github.com/mashehu/tools.git@fix-val-as-topic nf-core m lint merquryfk/merquryfk --fix  (nextflow)


                                          ,--./,-.
          ___     __   __   __   ___     /,-._.--~\
    |\ | |__  __ /  ` /  \ |__) |__         }  {
    | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                          `._,._,'

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


INFO     Linting modules repo: '.'
INFO     Linting module: 'merquryfk/merquryfk'
Linting nf-core modules ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0 of 1 » merquryfk/merquryfkINFO     Adding topic metadata for '1.2' at index 2: {'type': 'eval', 'description': 'The expression to obtain the version of the tool'}
INFO     Adding topic metadata for '1.2' at index 2: {'type': 'eval', 'description': 'The expression to obtain the version of the tool'}
Linting nf-core modules ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1 of 1 » merquryfk/merquryfkINFO     Updating modules/nf-core/merquryfk/merquryfk/meta.yml

╭─ [!] 2 Module Test Warnings ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                      ╷                                             ╷                                                                                            │
│ Module name          │ File path                                   │ Test message                                                                               │
│╶─────────────────────┼─────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────╴│
│ merquryfk/merquryfk  │ modules/nf-core/merquryfk/merquryfk/main.nf │ container_links: Unable to connect to container registry, code:  404, url:                 │
│                      │                                             │ https://community.wave.seqera.io/library/fastk_merquryfk_r-argparse_r-cowplot_pruned:d61b1 │
│                      │                                             │ 20497d4185b                                                                                │
│ merquryfk/merquryfk  │ modules/nf-core/merquryfk/merquryfk/main.nf │ main_nf_container: Container versions do not match                                         │
│                      ╵                                             ╵                                                                                            │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ [✗] 2 Module Tests Failed ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                      ╷                                              ╷                                                                                           │
│ Module name          │ File path                                    │ Test message                                                                              │
│╶─────────────────────┼──────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────╴│
│ merquryfk/merquryfk  │ modules/nf-core/merquryfk/merquryfk/meta.yml │ correct_meta_outputs: Module meta.yml does not match main.nf. Outputs should contain:     │
│                      │                                              │ {'stats': [['meta', '${prefix}.completeness.stats']], 'bed': [['meta',                    │
│                      │                                              │ '${prefix}._only.bed']], 'assembly_qv': [['meta', '${prefix}..qv']], 'qv': [['meta',      │
│                      │                                              │ '${prefix}.qv']], 'phased_block_bed': [['meta', '${prefix}.phased_block.bed']],           │
│                      │                                              │ 'phased_block_stats': [['meta', '${prefix}.phased_block.stats']], 'images': [['meta',     │
│                      │                                              │ '*.{pdf,png}']], 'versions_merquryfk': [['${task.process}', 'merquryfk', '1.2']],         │
│                      │                                              │ 'versions_fastk': [['${task.process}', 'fastk', '1.2']], 'versions_r':                    │
│                      │                                              │ [['${task.process}', 'R', 'R --version | sed "1!d; s/.version //; s/ .//"']]} Run nf-core │
│                      │                                              │ modules lint --fix to update the meta.yml file.                                           │
│ merquryfk/merquryfk  │ modules/nf-core/merquryfk/merquryfk/meta.yml │ correct_meta_topics: Module meta.yml does not match main.nf. Topics should contain:       │
│                      │                                              │ {'versions': [['${task.process}', 'merquryfk', '1.2'], ['${task.process}', 'fastk',       │
│                      │                                              │ '1.2'], ['${task.process}', 'R', 'R --version | sed "1!d; s/.version //; s/ .//"']]} Run  │
│                      │                                              │ nf-core modules lint --fix to update the meta.yml file.                                   │
│                      ╵                                              ╵                                                                                           │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭───────────────────────╮
│ LINT RESULTS SUMMARY  │
├───────────────────────┤
│ [✔]  53 Tests Passed  │
│ [!]   2 Test Warnings │
│ [✗]   2 Tests Failed  │
╰───────────────────────╯

Also, the adding metadata INFO output still says "eval":

INFO     Adding topic metadata for '1.2' at index 2: {'type': 'eval', 'description': 'The expression to obtain the version of the tool'}

@mashehu
Copy link
Copy Markdown
Contributor Author

mashehu commented Jan 21, 2026

yes, that is fixed in #3990

Copy link
Copy Markdown
Member

@mirpedrol mirpedrol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some small comments, otherwise LGTM!

Comment thread nf_core/modules/lint/__init__.py Outdated
Comment thread nf_core/modules/lint/__init__.py Outdated
Comment thread tests/modules/lint/test_meta_yml.py Outdated
@mashehu mashehu enabled auto-merge (rebase) January 29, 2026 09:15
auto-merge was automatically disabled January 29, 2026 09:22

Rebase failed

@mashehu mashehu merged commit abcbd7c into nf-core:dev Jan 30, 2026
114 checks passed
@mashehu mashehu deleted the fix-val-as-topic branch January 30, 2026 12:52
mashehu added a commit to mashehu/tools that referenced this pull request Mar 25, 2026
Co-authored-by: Júlia Mir Pedrol <[email protected]>
Co-authored-by: nf-core-bot <[email protected]>
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