-
Notifications
You must be signed in to change notification settings - Fork 85
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
Increase worflow linting #1463
Merged
Merged
Increase worflow linting #1463
Changes from 25 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
64c684c
increase worflow linting
lldelisle af6758e
linting
lldelisle 1d61ca1
restore build_lint_args
lldelisle dd9b1bb
fix cases with no authors in dockstore.yml
lldelisle f7401d8
fix DOCKSTORE_REGISTRY_CONF_VERSION
lldelisle d4ae50f
change name from required to recommanded
lldelisle 619cae9
linting
lldelisle eb86e3b
fix forgotten consequence of name from required to recommanded
lldelisle 5516443
put iwc_grade in lint_args as suggested by @bernt-matthias
lldelisle 8639d1d
remove release/version from WorkflowLintContext as suggested by @matt…
lldelisle 5c19e56
fix type of lint_args
lldelisle 302c504
remove iwc_grade from WorkflowLintContext and add lint_dockstore_best…
lldelisle 1310eb7
new build_wf_lint_args to match what is happening with tools
lldelisle 906c5ca
fix error on CHANGELOG get version
lldelisle 39480a8
add tests
lldelisle 7bb3a50
restore comma
lldelisle db8f24c
test --iwc on file
lldelisle 22112e8
remove path from asserts output
lldelisle 147296a
run black
lldelisle f5af20f
run isort
lldelisle 6e8f0ce
fix strange output when no --skip
lldelisle f748c11
fix final test
lldelisle 0d8dbd6
change strategy for iwc on files
lldelisle f88024c
Merge remote-tracking branch 'upstream/master' into lint_workflow
lldelisle 64f9076
add comma
lldelisle bafecff
Add type annotation
nsoranzo b1eedf4
Apply suggestions from @bernt-matthias
lldelisle ecdcf0f
fix lint_args typing to different places
lldelisle 2f7c139
remove unused Union
lldelisle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
tests/data/wf_repos/basic_wf_iwc_invalid_version/.dockstore.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: 1.2 | ||
workflows: | ||
- name: main | ||
subclass: Galaxy | ||
publish: true | ||
primaryDescriptorPath: /Super-simple-workflow.ga | ||
testParameterFiles: | ||
- /Super-simple-workflow-tests.yml | ||
authors: | ||
- name: Lucille Delisle | ||
orcid: 0000-0002-1964-4960 |
5 changes: 5 additions & 0 deletions
5
tests/data/wf_repos/basic_wf_iwc_invalid_version/CHANGELOG.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Changelog | ||
|
||
## [0.1] 2024-06-17 | ||
|
||
First release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Super simple workflow | ||
|
||
This is a super simple workflow which generates a file with x lines with 'hello' |
10 changes: 10 additions & 0 deletions
10
tests/data/wf_repos/basic_wf_iwc_invalid_version/Super-simple-workflow-tests.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
- doc: Test outline for Super-simple-workflow | ||
job: | ||
n_rows: 5 | ||
outputs: | ||
outfile: | ||
asserts: | ||
has_n_lines: | ||
n: 5 | ||
has_line: | ||
line: "hello" |
95 changes: 95 additions & 0 deletions
95
tests/data/wf_repos/basic_wf_iwc_invalid_version/Super-simple-workflow.ga
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
{ | ||
"a_galaxy_workflow": "true", | ||
"annotation": "This workflow generates a file with x lines with 'hello'", | ||
"comments": [], | ||
"creator": [ | ||
{ | ||
"class": "Person", | ||
"identifier": "https://orcid.org/0000-0002-1964-4960", | ||
"name": "Lucille Delisle" | ||
} | ||
], | ||
"format-version": "0.1", | ||
"license": "MIT", | ||
"release": "0.2", | ||
"name": "Super simple workflow", | ||
"report": { | ||
"markdown": "\n# Workflow Execution Report\n\n## Workflow Inputs\n```galaxy\ninvocation_inputs()\n```\n\n## Workflow Outputs\n```galaxy\ninvocation_outputs()\n```\n\n## Workflow\n```galaxy\nworkflow_display()\n```\n" | ||
}, | ||
"steps": { | ||
"0": { | ||
"annotation": "Number of rows to generate", | ||
"content_id": null, | ||
"errors": null, | ||
"id": 0, | ||
"input_connections": {}, | ||
"inputs": [ | ||
{ | ||
"description": "Number of rows to generate", | ||
"name": "n_rows" | ||
} | ||
], | ||
"label": "n_rows", | ||
"name": "Input parameter", | ||
"outputs": [], | ||
"position": { | ||
"left": 0, | ||
"top": 0 | ||
}, | ||
"tool_id": null, | ||
"tool_state": "{\"parameter_type\": \"integer\", \"optional\": false}", | ||
"tool_version": null, | ||
"type": "parameter_input", | ||
"uuid": "2ee42c13-83f5-4ac4-b35d-74294edf7dea", | ||
"when": null | ||
}, | ||
"1": { | ||
"annotation": "this creates a file with a given number of lines", | ||
"content_id": "toolshed.g2.bx.psu.edu/repos/bgruening/text_processing/tp_text_file_with_recurring_lines/9.3+galaxy1", | ||
"errors": null, | ||
"id": 1, | ||
"input_connections": { | ||
"token_set_0|repeat_select|times": { | ||
"id": 0, | ||
"output_name": "output" | ||
} | ||
}, | ||
"inputs": [], | ||
"label": "create file", | ||
"name": "Create text file", | ||
"outputs": [ | ||
{ | ||
"name": "outfile", | ||
"type": "txt" | ||
} | ||
], | ||
"position": { | ||
"left": 236, | ||
"top": 11 | ||
}, | ||
"post_job_actions": {}, | ||
"tool_id": "toolshed.g2.bx.psu.edu/repos/bgruening/text_processing/tp_text_file_with_recurring_lines/9.3+galaxy1", | ||
"tool_shed_repository": { | ||
"changeset_revision": "fbf99087e067", | ||
"name": "text_processing", | ||
"owner": "bgruening", | ||
"tool_shed": "toolshed.g2.bx.psu.edu" | ||
}, | ||
"tool_state": "{\"token_set\": [{\"__index__\": 0, \"line\": \"hello\", \"repeat_select\": {\"repeat_select_opts\": \"user\", \"__current_case__\": 0, \"times\": {\"__class__\": \"ConnectedValue\"}}}], \"__page__\": null, \"__rerun_remap_job_id__\": null}", | ||
"tool_version": "9.3+galaxy1", | ||
"type": "tool", | ||
"uuid": "a86ff433-8dce-417c-baf0-bc106a93ee48", | ||
"when": null, | ||
"workflow_outputs": [ | ||
{ | ||
"label": "outfile", | ||
"output_name": "outfile", | ||
"uuid": "34572088-8ad8-4661-81a2-6dfe2d83a0fe" | ||
} | ||
] | ||
} | ||
}, | ||
"tags": [], | ||
"uuid": "72c87042-27a8-4bcc-92af-ca74704e6161", | ||
"version": 3 | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should just leave this a boolean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I keep it as boolean then I get a type violation as lint_args is supposed to be a dict of str -> str
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See
planemo/planemo/workflow_lint.py
Line 125 in b9e62ef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or I change it to :
lint_args: Dict[str, Union[str, List[str], bool]]
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dict[str, Any]
is probably enough, I'll push a commit to your branch.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, if not I can commit it.