Skip to content

Commit

Permalink
update workflowloow oscar
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioLangaritaBenitez committed Oct 31, 2024
1 parent 7c49c5c commit be8170a
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion DT_flood/workflows/cwl_OSCAR/upload/upload.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ baseCommand: python
arguments: [$(inputs.uploadScript),"--bucket",$(inputs.bucket),"--filename", $(inputs.file), "--endpoint",$(inputs.minioEndpoint),"--accesskey",$(inputs.minioAccesskey),"--secretkey",$(inputs.minioSecretkey)]
inputs:
file:
type: Directory?
type: File?
uploadScript:
type: File?
bucket:
Expand Down
7 changes: 4 additions & 3 deletions DT_flood/workflows/cwl_OSCAR/upload/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@
#print(filename)

# Create client with access and secret key.
with tarfile.open(filename+".tar", "w:gz") as tar:
tar.add(filename, arcname=os.path.basename(filename))
#with tarfile.open(filename+".tar", "w:gz") as tar:
# tar.add(filename, arcname=os.path.basename(filename))

client = Minio(str(endpoint), accesskey, secretkey)

result = client.fput_object(
bucket.split("/")[0], '/'.join(bucket.split("/")[1:])+"/"+filename.split("/")[-1], filename+".tar",
bucket.split("/")[0], '/'.join(bucket.split("/")[1:])+"/"+filename.split("/")[-1], filename,
)
6 changes: 3 additions & 3 deletions DT_flood/workflows/cwl_OSCAR/wait_output/wait.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ inputs:
type: string
minioSecretkey:
type: string

outputs:
example_out:
type: stdout
stdout: output.txt
fa_database_out:
type: Directory
Binary file added DT_flood/workflows/cwl_OSCAR/wflow_input.tar
Binary file not shown.
10 changes: 5 additions & 5 deletions DT_flood/workflows/cwl_OSCAR/workflow-minio.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ requirements:

inputs:
file:
type: Directory?
type: File?
uploadScript:
type: File?
waitScript:
Expand All @@ -24,9 +24,9 @@ inputs:
bucketOutput:
type: string
outputs:
out:
type: File?
outputSource: wait/example_out
fa_database_out:
type: Directory
steps:

upload:
Expand All @@ -49,4 +49,4 @@ steps:
minioSecretkey: minioSecretkey
data:
source: upload/example_out
out: [example_out]
out: [fa_database_out]
10 changes: 5 additions & 5 deletions DT_flood/workflows/cwl_OSCAR/workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
file:
class: Directory
path: archive/
class: File
path: wflow_input.tar


minioEndpoint:
minioAccesskey:
minioSecretkey:
minioEndpoint: minio.sleepy-lumiere4.im.grycap.net
minioAccesskey: minio
minioSecretkey: minio123

bucketInput: wflow/in
bucketOutput: wflow/out
Expand Down

0 comments on commit be8170a

Please sign in to comment.