Skip to content

Commit

Permalink
relation parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmonteiro committed Jul 2, 2024
1 parent bfd8f58 commit e997fa9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
9 changes: 4 additions & 5 deletions runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,11 @@ def parse_args(argv):
"serviceUri=", "user=", "passw=", "token=",
"tolerance=", "toleranceType=", "taskId=" ]
)
#python3 /workspaces/workflow_runner/runner.py --templateRepo=tercen/scyan_operator
#tercen/scyan_operator
templateRepo = "tercen/simple_workflow_template" #"tercen/image_analysis_STK_workflowRunner_template"
templateRepo ="tercen/image_analysis_STK_workflowRunner_template"

# If running locally or creating new operator, memory might no be set
# This parameter sets the memory for ALL operators
params["opMem"] = None #"1000000000"
params["opMem"] = None #"5000000000"

params["user"] = 'test'
params["passw"] = 'test'
Expand Down Expand Up @@ -159,7 +157,8 @@ def run_with_params(params, mode="cli"):
importTask.addMeta("GIT_URL", params["templateRepo"])
importTask.addMeta("GIT_BRANCH",params["branch"])
importTask.addMeta("GIT_MESSAGE", "")
importTask.addMeta("GIT_TAG", params["tag"])
if params["tag"] != "":
importTask.addMeta("GIT_TAG", params["tag"])

importTask = client.taskService.create(importTask)
client.taskService.runTask(importTask.id)
Expand Down
17 changes: 11 additions & 6 deletions workflow_funcs/workflow_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from tercen.model.impl import *
import tercen.util.helper_functions as utl
import numpy as np
import tercen.util.helper_functions as utl
from tercen.util.helper_objects import ObjectTraverser
import tercen.http.HttpClientService as th

def isnumeric(val):
Expand Down Expand Up @@ -269,7 +269,7 @@ def compare_export_step(client, tableIdx, stp, refStp, tol=0, tolType="absolute
def compare_step(client, tableIdx, stp, refStp, tol=0, tolType="absolute", tableComp=[], verbose=False):
stepResult = {}


if(isinstance(stp, DataStep)):
# If operator is not set, computedRelation will have no joinOperators and nothing to compare
if hasattr(stp.computedRelation, 'joinOperators'):
Expand Down Expand Up @@ -310,10 +310,15 @@ def compare_step(client, tableIdx, stp, refStp, tol=0, tolType="absolute", tabl
k+1 )
k = k + 1
continue

idList = get_simple_relation_id_list(jop.rightRelation)
refIdList = get_simple_relation_id_list(refJop.rightRelation)

# idList = get_simple_relation_id_list(jop.rightRelation)
# refIdList = get_simple_relation_id_list(refJop.rightRelation)
traverser = ObjectTraverser()
relList = traverser.traverse( jop.rightRelation, SimpleRelation )
idList = [rel.id for rel in relList]

traverser = ObjectTraverser()
relList = traverser.traverse( refJop.rightRelation, SimpleRelation )
refIdList = [rel.id for rel in relList]
if len(idList) != len(refIdList):
stpRes["NumTables"] = "Number of Relations in JoinOperator {} \
do not match: {:d} x {:d} (GoldenStandard vs Template)".format(
Expand Down

0 comments on commit e997fa9

Please sign in to comment.