Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cwl v1.3.0-dev1 native loop support #1779

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

cwl v1.3.0-dev1 native loop support #1779

wants to merge 10 commits into from

Conversation

GlassOfWhiskey
Copy link
Contributor

@GlassOfWhiskey GlassOfWhiskey commented Dec 25, 2022

This commit converts the logic introduced to handle the cwltool:Loop requirement extension to handle the new loop construct introduced in the CWL v1.3 spec.
A proper method in the upgrade.py module handles the automatic conversion from the old requirement to the new format.
The existing test_loop.py file is still useful to verify the correctness of the conversion process.

See also common-workflow-language/cwl-v1.3#5

Copy link
Member

@mr-c mr-c left a comment

Choose a reason for hiding this comment

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

Huzzah!

You'll also need to add a dump of the v1.3.0-dev1 schema to https://github.com/common-workflow-language/cwltool/tree/cwl-v1.3/cwltool/schemas

cwltool/update.py Outdated Show resolved Hide resolved
cwltool/update.py Outdated Show resolved Hide resolved
@mr-c mr-c changed the title Added loop support cwl v1.3.0-dev1 native loop support Dec 26, 2022
@codecov
Copy link

codecov bot commented Dec 29, 2022

Codecov Report

Attention: Patch coverage is 28.00000% with 36 lines in your changes are missing coverage. Please review.

Project coverage is 54.85%. Comparing base (270f9c6) to head (383832b).

Files Patch % Lines
cwltool/update.py 35.48% 18 Missing and 2 partials ⚠️
cwltool/workflow_job.py 14.28% 10 Missing and 2 partials ⚠️
cwltool/checker.py 0.00% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1779       +/-   ##
===========================================
- Coverage   83.84%   54.85%   -29.00%     
===========================================
  Files          46       46               
  Lines        8245     8266       +21     
  Branches     2190     2105       -85     
===========================================
- Hits         6913     4534     -2379     
- Misses        855     3195     +2340     
- Partials      477      537       +60     

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

"The `cwltool:Loop` clause is not compatible with the `when` directive."
)
if "loopWhen" not in r:
raise SourceLine(
Copy link
Member

Choose a reason for hiding this comment

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

Test case for this, please

)
cls = cast(str, r["class"])
if cls in rewrite:
r["class"] = rewrite[cls]
Copy link
Member

Choose a reason for hiding this comment

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

This line has no test coverage.

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.

None yet

3 participants