common-workflow-language / common-workflow-language/schema_salad

Spurious warning with enum symbol names containing colon

Open
#645 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
86
Forks
64
Avg merge
19h 24m
Merged PRs (30d)
19

Description

> 2023-01-05T23:13:49.598203507Z URI prefix '#bcftools_view.cwl/bcftools-view/min_count/min_count/min_count_type/min_count_type/' of '#bcftools_view.cwl/bcftools-view/min_count/min_count/min_count_type/min_count_type/:nref' not recognized, are you missing a $namespaces section?

It is getting confused by the colon in the enum symbol name ":nref". The code is interpreting it as a possible prefix (like "sbg:") when in fact it is just part of the name.

I think the check could be a little more nuanced and does not need to print a warning in this case, because the rest of the code actually handles it just fine.

These sorts of warnings should also provide a line number.

Contributor guide

Open the contributing guide

Research direction

Start by locating the warning emitted when a URI prefix is not recognized and trace how enum symbol names containing ":" are parsed. Check the existing warning tests, if present, and reproduce the supplied `:nref` example. Done means the valid enum name no longer produces a spurious warning and warnings include a line number.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.