-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
push filter operator to latest CLAIMED spec
- Loading branch information
Your Name
committed
Jan 22, 2024
1 parent
2c1239e
commit d7f1300
Showing
4 changed files
with
97 additions
and
19 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
cwlVersion: v1.2 | ||
class: CommandLineTool | ||
|
||
baseCommand: "claimed" | ||
|
||
inputs: | ||
component: | ||
type: string | ||
default: romeokienzler/claimed-filter:0.1 | ||
inputBinding: | ||
position: 1 | ||
prefix: --component | ||
log_level: | ||
type: string | ||
default: "INFO" | ||
inputBinding: | ||
position: 2 | ||
prefix: --log_level | ||
predicate: | ||
type: string | ||
default: None | ||
inputBinding: | ||
position: 3 | ||
prefix: --predicate | ||
file_name: | ||
type: string | ||
default: None | ||
inputBinding: | ||
position: 4 | ||
prefix: --file_name | ||
|
||
|
||
outputs: [] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: filter | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: filter | ||
image: romeokienzler/claimed-filter:0.1 | ||
workingDir: /opt/app-root/src/ | ||
command: ["/opt/app-root/bin/ipython","filter.py"] | ||
env: | ||
- name: log_level | ||
value: value_of_log_level | ||
- name: predicate | ||
value: value_of_predicate | ||
- name: file_name | ||
value: value_of_file_name | ||
restartPolicy: OnFailure | ||
imagePullSecrets: | ||
- name: image_pull_secret |
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,23 @@ | ||
name: file_name | ||
description: "# filter Filters rows based on predicate on pandas data frame Example 'predicate=~metadata.filename.str.contains('.gz') ' => filters all rows where column 'filename' contains '.gz' – CLAIMED V0.1" | ||
|
||
inputs: | ||
- {name: log_level, type: String, description: "update log level", default: "INFO"} | ||
- {name: predicate, type: String, description: "predicate (as described in documentation of the component)"} | ||
- {name: file_name, type: String, description: "file name / path of the CSV file to read"} | ||
|
||
|
||
outputs: | ||
|
||
|
||
implementation: | ||
container: | ||
image: romeokienzler/claimed-file_name:0.1 | ||
command: | ||
- sh | ||
- -ec | ||
- | | ||
ipython ./filter.py log_level="${0}" predicate="${1}" file_name="${2}" | ||
- {inputValue: log_level} | ||
- {inputValue: predicate} | ||
- {inputValue: file_name} |