Skip to content
Snippets Groups Projects

Workflow Verification

Merged Adham Hashibon requested to merge workflow-verification into master

Created by: jjenthought

Required by https://github.com/force-h2020/force-wfmanager/pull/194 as some of the error reporting things are now in verifier.py. Changes the VerifierError object to have a local & global error message, which can be the same. The global message should be something useful when looking at the workflow as a whole, and the local one useful when the object causing the error is selected/ being edited.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
145 191
146 192 return errors
193
194
195 def multi_error_format(index_list):
196 """Takes a list of integers and returns a string where they are grouped
197 consecutively wherever possible.
198 For example an input of [0,1,2,4,5,7] returns the string '0-2, 4-5, 7' """
199 index_list.sort()
200 # Single, consecutive or non-consecutive
201 if len(index_list) == 1:
202 return str(index_list[0])
203 else:
204 repl = []
205
206 for i, index_group in groupby(enumerate(index_list), lambda val:
  • Adham Hashibon
    Adham Hashibon @has started a thread on commit 496dcab0
  • 188 "parameters {}".format(err_no_string),
    189 global_error="An output parameter is undefined in {}"
    190 " (Layer {})".format(factory.name, layer_number)))
    145 191
    146 192 return errors
    193
    194
    195 def multi_error_format(index_list):
    196 """Takes a list of integers and returns a string where they are grouped
    197 consecutively wherever possible.
    198 For example an input of [0,1,2,4,5,7] returns the string '0-2, 4-5, 7' """
    199 index_list.sort()
    200 # Single, consecutive or non-consecutive
    201 if len(index_list) == 1:
    202 return str(index_list[0])
    203 else:
    • Created by: stefanoborini

      you don't need the else clause here. you are returning in the first case. Keeps the code less indented.

  • Created by: stefanoborini

    So I guess we will need this one to support the other changes.

  • Please register or sign in to reply
    Loading