[ARVADOS] updated: 0f53d219c91812baeac4cff3387196c6501ec0c0

Git user git at public.curoverse.com
Mon Aug 29 17:37:39 EDT 2016


Summary of changes:
 .../controllers/container_requests_controller.rb   |  4 ++--
 .../app/controllers/work_units_controller.rb       |  2 +-
 apps/workbench/app/helpers/application_helper.rb   | 27 ++++++++++++++++++----
 .../views/container_requests/_show_inputs.html.erb |  9 ++++----
 build/run-build-packages.sh                        |  6 ++---
 sdk/cwl/arvados_cwl/arvworkflow.py                 |  1 -
 sdk/cwl/setup.py                                   |  2 +-
 7 files changed, 35 insertions(+), 16 deletions(-)

       via  0f53d219c91812baeac4cff3387196c6501ec0c0 (commit)
      from  86af9b2ebc9240e9041870786e87021c94f11eea (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 0f53d219c91812baeac4cff3387196c6501ec0c0
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Mon Aug 29 17:37:34 2016 -0400

    9766: Full workflow: create workflow using command line, select run from
    workbench, choose inputs, run, get results.

diff --git a/apps/workbench/app/controllers/container_requests_controller.rb b/apps/workbench/app/controllers/container_requests_controller.rb
index 14685d6..b67d100 100644
--- a/apps/workbench/app/controllers/container_requests_controller.rb
+++ b/apps/workbench/app/controllers/container_requests_controller.rb
@@ -26,8 +26,8 @@ class ContainerRequestsController < ApplicationController
     input_obj = @updates[:mounts].andand[:"/var/lib/cwl/cwl.input.json"].andand[:content]
     if input_obj
       workflow = @object.mounts[:"/var/lib/cwl/workflow.json"][:content]
-      workflow[:inputs].each do |input_schema|
-        if not input_obj.include? input_schema[:id]
+      get_cwl_inputs(workflow).each do |input_schema|
+        if not input_obj.include? cwl_shortname(input_schema[:id])
           next
         end
         required, primary_type, param_id = cwl_input_info(input_schema)
diff --git a/apps/workbench/app/controllers/work_units_controller.rb b/apps/workbench/app/controllers/work_units_controller.rb
index 0c8ea6e..6d92110 100644
--- a/apps/workbench/app/controllers/work_units_controller.rb
+++ b/apps/workbench/app/controllers/work_units_controller.rb
@@ -63,7 +63,7 @@ class WorkUnitsController < ApplicationController
       attrs['state'] = "Uncommitted"
 
       # required
-      attrs['command'] = ["arvados-cwl-runner", "--local", "--api=containers", "/var/lib/cwl/workflow.json", "/var/lib/cwl/cwl.input.json"]
+      attrs['command'] = ["arvados-cwl-runner", "--local", "--api=containers", "/var/lib/cwl/workflow.json#main", "/var/lib/cwl/cwl.input.json"]
       attrs['container_image'] = "arvados/jobs"
       attrs['cwd'] = "/var/spool/cwl"
       attrs['output_path'] = "/var/spool/cwl"
diff --git a/apps/workbench/app/helpers/application_helper.rb b/apps/workbench/app/helpers/application_helper.rb
index 981b7cd..b5df9f3 100644
--- a/apps/workbench/app/helpers/application_helper.rb
+++ b/apps/workbench/app/helpers/application_helper.rb
@@ -418,6 +418,25 @@ module ApplicationHelper
     lt
   end
 
+  def get_cwl_inputs(workflow)
+    if workflow[:inputs]
+      return workflow[:inputs]
+    else
+      workflow[:"$graph"].each do |tool|
+        if tool[:id] == "#main"
+          return tool[:inputs]
+        end
+      end
+    end
+  end
+
+  def cwl_shortname(id)
+    if id[0] == "#"
+      id = id[1..-1]
+    end
+    return id.split("/")[-1]
+  end
+
   def cwl_input_info(input_schema)
     required = !(input_schema[:type].include? "null")
     if input_schema[:type].is_a? Array
@@ -427,7 +446,7 @@ module ApplicationHelper
     elsif input_schema[:type].is_a? Hash
       primary_type = input_schema[:type]
     end
-    param_id = input_schema[:id]
+    param_id = cwl_shortname(input_schema[:id])
     return required, primary_type, param_id
   end
 
@@ -510,7 +529,7 @@ module ApplicationHelper
                      "data-type" => "select",
                      "data-source" => (opt_empty_selection + [{value: "true", text: "true"}, {value: "false", text: "false"}]).to_json,
                      "data-url" => url_for(action: "update", id: object.uuid, controller: object.class.to_s.pluralize.underscore, merge: true),
-                     "data-title" => "Set value for #{input_schema[:id]}",
+                     "data-title" => "Set value for #{cwl_shortname(input_schema[:id])}",
                      "data-name" => dn,
                      "data-pk" => "{id: \"#{object.uuid}\", key: \"#{object.class.to_s.underscore}\"}",
                      "data-value" => attrvalue.to_s,
@@ -526,7 +545,7 @@ module ApplicationHelper
                      "data-type" => "select",
                      "data-source" => (opt_empty_selection + primary_type[:symbols].map {|i| {:value => i, :text => i} }).to_json,
                      "data-url" => url_for(action: "update", id: object.uuid, controller: object.class.to_s.pluralize.underscore, merge: true),
-                     "data-title" => "Set value for #{input_schema[:id]}",
+                     "data-title" => "Set value for #{cwl_shortname(input_schema[:id])}",
                      "data-name" => dn,
                      "data-pk" => "{id: \"#{object.uuid}\", key: \"#{object.class.to_s.underscore}\"}",
                      "data-value" => attrvalue,
@@ -547,7 +566,7 @@ module ApplicationHelper
                      "data-placement" => "bottom",
                      "data-type" => datatype,
                      "data-url" => url_for(action: "update", id: object.uuid, controller: object.class.to_s.pluralize.underscore, merge: true),
-                     "data-title" => "Set value for #{input_schema[:id]}",
+                     "data-title" => "Set value for #{cwl_shortname(input_schema[:id])}",
                      "data-name" => dn,
                      "data-pk" => "{id: \"#{object.uuid}\", key: \"#{object.class.to_s.underscore}\"}",
                      "data-value" => attrvalue,
diff --git a/apps/workbench/app/views/container_requests/_show_inputs.html.erb b/apps/workbench/app/views/container_requests/_show_inputs.html.erb
index b365dc5..a6c4bff 100644
--- a/apps/workbench/app/views/container_requests/_show_inputs.html.erb
+++ b/apps/workbench/app/views/container_requests/_show_inputs.html.erb
@@ -1,12 +1,13 @@
-<% n_inputs = cwl_inputs_required(@object, @object.mounts[:"/var/lib/cwl/workflow.json"][:content][:inputs], [:mounts, :"/var/lib/cwl/cwl.input.json", :content]) %>
+<% n_inputs = cwl_inputs_required(@object, get_cwl_inputs(@object.mounts[:"/var/lib/cwl/workflow.json"][:content]), [:mounts, :"/var/lib/cwl/cwl.input.json", :content]) %>
 
 <% content_for :pi_input_form do %>
 <form role="form" style="width:60%">
   <div class="form-group">
     <% workflow = @object.mounts[:"/var/lib/cwl/workflow.json"][:content] %>
-    <% workflow[:inputs].each do |input| %>
-      <label for="#input-<%= input[:id] %>">
-        <%= input[:label] || input[:id] %>
+    <% inputs = get_cwl_inputs(workflow) %>
+    <% inputs.each do |input| %>
+      <label for="#input-<%= cwl_shortname(input[:id]) %>">
+        <%= input[:label] || cwl_shortname(input[:id]) %>
       </label>
       <div>
         <p class="form-control-static">
diff --git a/build/run-build-packages.sh b/build/run-build-packages.sh
index ae2de69..403e6c7 100755
--- a/build/run-build-packages.sh
+++ b/build/run-build-packages.sh
@@ -459,15 +459,15 @@ fpm_build $WORKSPACE/sdk/cwl "${PYTHON2_PKG_PREFIX}-arvados-cwl-runner" 'Curover
 # So we build this thing separately.
 #
 # Ward, 2016-03-17
-fpm_build schema_salad "" "" python 1.16.20160810195039
+fpm_build schema_salad "" "" python 1.17.20160820171034
 
 # And schema_salad now depends on ruamel-yaml, which apparently has a braindead setup.py that requires special arguments to build (otherwise, it aborts with 'error: you have to install with "pip install ."'). Sigh.
 # Ward, 2016-05-26
 # ...and schema_salad 1.12.20160610104117 doesn't work with ruamel-yaml > 0.11.11.
-fpm_build ruamel.yaml "" "" python 0.11.11 --python-setup-py-arguments "--single-version-externally-managed"
+fpm_build ruamel.yaml "" "" python 0.12.4 --python-setup-py-arguments "--single-version-externally-managed"
 
 # And for cwltool we have the same problem as for schema_salad. Ward, 2016-03-17
-fpm_build cwltool "" "" python 1.0.20160811184335
+fpm_build cwltool "" "" python 1.0.20160829211335
 
 # FPM eats the trailing .0 in the python-rdflib-jsonld package when built with 'rdflib-jsonld>=0.3.0'. Force the version. Ward, 2016-03-25
 fpm_build rdflib-jsonld "" "" python 0.3.0
diff --git a/sdk/cwl/arvados_cwl/arvworkflow.py b/sdk/cwl/arvados_cwl/arvworkflow.py
index 9a649eb..0e1ad9f 100644
--- a/sdk/cwl/arvados_cwl/arvworkflow.py
+++ b/sdk/cwl/arvados_cwl/arvworkflow.py
@@ -11,7 +11,6 @@ def make_workflow(arvRunner, tool, job_order, project_uuid, update_uuid):
     upload_docker(arvRunner, tool)
 
     document_loader, workflowobj, uri = (tool.doc_loader, tool.doc_loader.fetch(tool.tool["id"]), tool.tool["id"])
-    print workflowobj["steps"]
     for inp in workflowobj["inputs"]:
         sn = shortname(inp["id"])
         if sn in job_order:
diff --git a/sdk/cwl/setup.py b/sdk/cwl/setup.py
index 7ff823a..967e1c4 100644
--- a/sdk/cwl/setup.py
+++ b/sdk/cwl/setup.py
@@ -32,7 +32,7 @@ setup(name='arvados-cwl-runner',
       # Make sure to update arvados/build/run-build-packages.sh as well
       # when updating the cwltool version pin.
       install_requires=[
-          'cwltool==1.0.20160829192223',
+          'cwltool==1.0.20160829211335',
           'arvados-python-client>=0.1.20160714204738',
       ],
       data_files=[

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list