common-workflow-language / common-workflow-language/cwltool

cwltool:MPIRequirement works without declaring the namespace cwltool

Open
#2,298 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
376
Forks
255
Avg merge
2d 7h
Merged PRs (30d)
12

Description

This tool:

```yaml
cwlVersion: v1.2
class: CommandLineTool

requirements:
- class: "cwltool:MPIRequirement"
processes: 2

baseCommand: hostname

inputs: []
outputs: []
```

Can be run fine, even though the namespace `cwltool:` is never declared.

```bash
(cwltool) kinow@ranma:/tmp/test$ cwltool --enable-ext hostname.cwl
INFO /home/kinow/Development/python/micromamba/envs/cwltool/bin/cwltool 3.2.20260413085819
INFO Resolved 'hostname.cwl' to 'file:///tmp/test/hostname.cwl'
INFO [job hostname.cwl] /tmp/8tlpmui7$ mpirun \
-n \
2 \
hostname
ranma
ranma
INFO [job hostname.cwl] completed success
{}INFO Final process status is success

```

The README doesn't specify whether the namespace is required or not, I think. But the main example for MPIRequirement does have the namespace,

```yaml
$namespaces:
cwltool: "http://commonwl.org/cwltool#"
```

I guess either the docs should be updated (if not listed elsewhere that I didn't find) saying this is not necessary, or we must check if the namespace is declared and fail if not.

Contributor guide

Open the contributing guide

Research direction

Reproduce the inline CWL example with the cwltool CLI, then compare it with the MPIRequirement example in the README. Trace how the undeclared cwltool namespace is handled and decide whether it should be accepted or rejected. Done means the behavior is validated and covered by documentation or a regression test.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.