kfp_test_operator.yaml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. name: Test Operator
  2. description: 'This component description contains an unescaped " character'
  3. inputs:
  4. - {name: test_string_no_default, description: , type: String}
  5. - {name: test_string_default_value, description: 'The test command description', type: String, default: 'default'}
  6. - {name: test_string_default_empty, description: 'The test command description', type: String, default: ''}
  7. - {name: test_bool_default, description: 'The test command description', type: Bool}
  8. - {name: test_bool_false, description: 'The test command description', type: Bool, default: 'False'}
  9. - {name: test_bool_true, description: 'The test command description', type: Bool, default: 'True'}
  10. - {name: test_int_default, description: 'The test command description', type: Integer}
  11. - {name: test_int_zero, description: 'The test command description', type: Integer, default: '0'}
  12. - {name: test_int_non_zero, description: 'The test command description', type: Integer, default: '1'}
  13. - {name: test_float_default, description: 'The test command description', type: Float}
  14. - {name: test_float_zero, description: 'The test command description', type: Float, default: '0.0'}
  15. - {name: test_float_non_zero, description: 'The test command description', type: Float, default: '1.0'}
  16. - {name: test_dict_default, description: 'The test command description', type: Dict}
  17. - {name: test_list_default, description: 'The test command description', type: List}
  18. - {name: test_required_property, description: 'The test command description', type: String, optional: false}
  19. - {name: test_optional_property, description: 'The test command description', type: String, optional: true}
  20. - {name: test_required_property_default, description: 'The test command description', type: String}
  21. - {name: test_unusual_type_dict, description: 'The test command description', type: Dictionary of arrays}
  22. - {name: test_unusual_type_list, description: 'The test command description', type: An array}
  23. - {name: test_unusual_type_string, description: 'The test command description', type: A string}
  24. - {name: test_unusual_type_file, description: 'The test command description', type: Notebook}
  25. - {name: test_unusual_type_notgiven, description: 'The test command description'}
  26. outputs:
  27. - {name: Filtered text}
  28. implementation:
  29. container:
  30. image: alpine
  31. command:
  32. - sh
  33. - -ec
  34. - |
  35. text_path=$0
  36. pattern=$1
  37. filtered_text_path=$2
  38. mkdir -p "$(dirname "$filtered_text_path")"
  39. grep "$pattern" < "$text_path" > "$filtered_text_path"
  40. - {inputPath: Text}
  41. - {inputValue: Pattern}
  42. - {inputPath: test_unusual_type_file}
  43. - {outputPath: Filtered text}