[ARVADOS] created: 1.4.1-4-g6b9e490b5

Git user git at public.curoverse.com
Wed Nov 6 20:50:19 UTC 2019


        at  6b9e490b5d259ffedee2d5becbf4c71fc20de0c3 (commit)


commit 6b9e490b5d259ffedee2d5becbf4c71fc20de0c3
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Thu Sep 5 16:32:35 2019 -0400

    Merge branch '15361-acr-create-workflow' refs #15361
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/.licenseignore b/.licenseignore
index a9b6f5f6c..2145bc987 100644
--- a/.licenseignore
+++ b/.licenseignore
@@ -78,3 +78,4 @@ lib/dispatchcloud/test/sshkey_*
 *.asc
 sdk/java-v2/build.gradle
 sdk/java-v2/settings.gradle
+sdk/cwl/tests/wf/feddemo
\ No newline at end of file
diff --git a/sdk/cwl/arvados_cwl/__init__.py b/sdk/cwl/arvados_cwl/__init__.py
index 95711762c..68abdfe96 100644
--- a/sdk/cwl/arvados_cwl/__init__.py
+++ b/sdk/cwl/arvados_cwl/__init__.py
@@ -324,4 +324,5 @@ def main(args, stdout, stderr, api_client=None, keep_client=None,
                              logger_handler=arvados.log_handler,
                              custom_schema_callback=add_arv_hints,
                              loadingContext=executor.loadingContext,
-                             runtimeContext=executor.runtimeContext)
+                             runtimeContext=executor.runtimeContext,
+                             input_required=not (arvargs.create_workflow or arvargs.update_workflow))
diff --git a/sdk/cwl/arvados_cwl/runner.py b/sdk/cwl/arvados_cwl/runner.py
index 9385bde63..6751e7207 100644
--- a/sdk/cwl/arvados_cwl/runner.py
+++ b/sdk/cwl/arvados_cwl/runner.py
@@ -223,7 +223,8 @@ def upload_dependencies(arvrunner, name, document_loader,
                                  {shortname(t["id"]): t["default"] for t in obj["inputs"] if "default" in t},
                                  discovered)
 
-    visit_class(workflowobj, ("CommandLineTool", "Workflow"), discover_default_secondary_files)
+    copied, _ = document_loader.resolve_all(copy.deepcopy(cmap(workflowobj)), base_url=uri, checklinks=False)
+    visit_class(copied, ("CommandLineTool", "Workflow"), discover_default_secondary_files)
 
     for d in list(discovered):
         # Only interested in discovered secondaryFiles which are local
diff --git a/sdk/cwl/setup.py b/sdk/cwl/setup.py
index 1052fb0d7..dadc78d25 100644
--- a/sdk/cwl/setup.py
+++ b/sdk/cwl/setup.py
@@ -33,8 +33,8 @@ setup(name='arvados-cwl-runner',
       # Note that arvados/build/run-build-packages.sh looks at this
       # file to determine what version of cwltool and schema-salad to build.
       install_requires=[
-          'cwltool==1.0.20181217162649',
-          'schema-salad==3.0.20181129082112',
+          'cwltool==1.0.20190831161204',
+          'schema-salad==4.5.20190815125611',
           'typing >= 3.6.4',
           'ruamel.yaml >=0.15.54, <=0.15.77',
           'arvados-python-client>=1.3.0.20190205182514',
diff --git a/sdk/cwl/tests/test_submit.py b/sdk/cwl/tests/test_submit.py
index f11186950..586ac8e67 100644
--- a/sdk/cwl/tests/test_submit.py
+++ b/sdk/cwl/tests/test_submit.py
@@ -1806,6 +1806,43 @@ class TestCreateWorkflow(unittest.TestCase):
                          stubs.expect_workflow_uuid + '\n')
         self.assertEqual(exited, 0)
 
+    @stubs
+    def test_create_with_imports(self, stubs):
+        project_uuid = 'zzzzz-j7d0g-zzzzzzzzzzzzzzz'
+
+        exited = arvados_cwl.main(
+            ["--create-workflow", "--debug",
+             "--api=containers",
+             "--project-uuid", project_uuid,
+             "tests/wf/feddemo/feddemo.cwl"],
+            stubs.capture_stdout, sys.stderr, api_client=stubs.api)
+
+        stubs.api.pipeline_templates().create.refute_called()
+        stubs.api.container_requests().create.refute_called()
+
+        self.assertEqual(stubs.capture_stdout.getvalue(),
+                         stubs.expect_workflow_uuid + '\n')
+        self.assertEqual(exited, 0)
+
+    @stubs
+    def test_create_with_no_input(self, stubs):
+        project_uuid = 'zzzzz-j7d0g-zzzzzzzzzzzzzzz'
+
+        exited = arvados_cwl.main(
+            ["--create-workflow", "--debug",
+             "--api=containers",
+             "--project-uuid", project_uuid,
+             "tests/wf/revsort/revsort.cwl"],
+            stubs.capture_stdout, sys.stderr, api_client=stubs.api)
+
+        stubs.api.pipeline_templates().create.refute_called()
+        stubs.api.container_requests().create.refute_called()
+
+        self.assertEqual(stubs.capture_stdout.getvalue(),
+                         stubs.expect_workflow_uuid + '\n')
+        self.assertEqual(exited, 0)
+
+
 class TestTemplateInputs(unittest.TestCase):
     expect_template = {
         "components": {
@@ -1883,4 +1920,5 @@ class TestTemplateInputs(unittest.TestCase):
 
         stubs.api.pipeline_templates().create.assert_called_with(
             body=JsonDiffMatcher(expect_template), ensure_unique_name=True)
+
         self.assertEqual(exited, 0)
diff --git a/sdk/cwl/tests/wf/feddemo b/sdk/cwl/tests/wf/feddemo
new file mode 120000
index 000000000..077f65b74
--- /dev/null
+++ b/sdk/cwl/tests/wf/feddemo
@@ -0,0 +1 @@
+../../../../doc/user/cwl/federated
\ No newline at end of file
diff --git a/sdk/cwl/tests/wf/revsort/revsort.cwl b/sdk/cwl/tests/wf/revsort/revsort.cwl
new file mode 100644
index 000000000..af0be2f05
--- /dev/null
+++ b/sdk/cwl/tests/wf/revsort/revsort.cwl
@@ -0,0 +1,62 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+#
+# This is a two-step workflow which uses "revtool" and "sorttool" defined above.
+#
+class: Workflow
+doc: "Reverse the lines in a document, then sort those lines."
+cwlVersion: v1.0
+
+
+# The inputs array defines the structure of the input object that describes
+# the inputs to the workflow.
+#
+# The "reverse_sort" input parameter demonstrates the "default" field.  If the
+# field "reverse_sort" is not provided in the input object, the default value will
+# be used.
+inputs:
+  input:
+    type: File
+    doc: "The input file to be processed."
+  reverse_sort:
+    type: boolean
+    default: true
+    doc: "If true, reverse (decending) sort"
+
+# The "outputs" array defines the structure of the output object that describes
+# the outputs of the workflow.
+#
+# Each output field must be connected to the output of one of the workflow
+# steps using the "connect" field.  Here, the parameter "#output" of the
+# workflow comes from the "#sorted" output of the "sort" step.
+outputs:
+  output:
+    type: File
+    outputSource: sorted/output
+    doc: "The output with the lines reversed and sorted."
+
+# The "steps" array lists the executable steps that make up the workflow.
+# The tool to execute each step is listed in the "run" field.
+#
+# In the first step, the "inputs" field of the step connects the upstream
+# parameter "#input" of the workflow to the input parameter of the tool
+# "revtool.cwl#input"
+#
+# In the second step, the "inputs" field of the step connects the output
+# parameter "#reversed" from the first step to the input parameter of the
+# tool "sorttool.cwl#input".
+steps:
+  rev:
+    in:
+      input: input
+    out: [output]
+    run: revtool.cwl
+
+  sorted:
+    in:
+      input: rev/output
+      reverse: reverse_sort
+    out: [output]
+    run: sorttool.cwl
diff --git a/sdk/cwl/tests/wf/revsort/revtool.cwl b/sdk/cwl/tests/wf/revsort/revtool.cwl
new file mode 100644
index 000000000..780271749
--- /dev/null
+++ b/sdk/cwl/tests/wf/revsort/revtool.cwl
@@ -0,0 +1,45 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+#
+# Simplest example command line program wrapper for the Unix tool "rev".
+#
+class: CommandLineTool
+cwlVersion: v1.0
+doc: "Reverse each line using the `rev` command"
+
+hints:
+  ResourceRequirement:
+    ramMin: 8
+
+# The "inputs" array defines the structure of the input object that describes
+# the inputs to the underlying program.  Here, there is one input field
+# defined that will be called "input" and will contain a "File" object.
+#
+# The input binding indicates that the input value should be turned into a
+# command line argument.  In this example inputBinding is an empty object,
+# which indicates that the file name should be added to the command line at
+# a default location.
+inputs:
+  input:
+    type: File
+    inputBinding: {}
+
+# The "outputs" array defines the structure of the output object that
+# describes the outputs of the underlying program.  Here, there is one
+# output field defined that will be called "output", must be a "File" type,
+# and after the program executes, the output value will be the file
+# output.txt in the designated output directory.
+outputs:
+  output:
+    type: File
+    outputBinding:
+      glob: output.txt
+
+# The actual program to execute.
+baseCommand: rev
+
+# Specify that the standard output stream must be redirected to a file called
+# output.txt in the designated output directory.
+stdout: output.txt
diff --git a/sdk/cwl/tests/wf/revsort/sorttool.cwl b/sdk/cwl/tests/wf/revsort/sorttool.cwl
new file mode 100644
index 000000000..95f50cceb
--- /dev/null
+++ b/sdk/cwl/tests/wf/revsort/sorttool.cwl
@@ -0,0 +1,42 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+# Example command line program wrapper for the Unix tool "sort"
+# demonstrating command line flags.
+class: CommandLineTool
+doc: "Sort lines using the `sort` command"
+cwlVersion: v1.0
+hints:
+  ResourceRequirement:
+    ramMin: 8
+
+# This example is similar to the previous one, with an additional input
+# parameter called "reverse".  It is a boolean parameter, which is
+# intepreted as a command line flag.  The value of "prefix" is used for
+# flag to put on the command line if "reverse" is true, if "reverse" is
+# false, no flag is added.
+#
+# This example also introduced the "position" field.  This indicates the
+# sorting order of items on the command line.  Lower numbers are placed
+# before higher numbers.  Here, the "-r" (same as "--reverse") flag (if
+#  present) will be added to the command line before the input file path.
+inputs:
+  - id: reverse
+    type: boolean
+    inputBinding:
+      position: 1
+      prefix: "-r"
+  - id: input
+    type: File
+    inputBinding:
+      position: 2
+
+outputs:
+  - id: output
+    type: File
+    outputBinding:
+      glob: output.txt
+
+baseCommand: sort
+stdout: output.txt

commit 3fececec1fbcb1a71e2dd7de4bc4687df984cdb6
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date:   Fri Jul 26 17:17:26 2019 -0300

    Merge branch '15496-wb1-group-membership-admin'
    Closes #15496
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>

diff --git a/apps/workbench/app/views/users/_show_admin.html.erb b/apps/workbench/app/views/users/_show_admin.html.erb
index 89156aaf8..ddff79be0 100644
--- a/apps/workbench/app/views/users/_show_admin.html.erb
+++ b/apps/workbench/app/views/users/_show_admin.html.erb
@@ -76,7 +76,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
                     disabled: (group.owner_uuid == @object.uuid),
                     data: {
                       permission_head: group.uuid,
-                      permission_uuid: permitted_group_perms[group.uuid]}) %>
+                      permission_uuid: permitted_group_perms[group.uuid] || 'x'}) %>
                 <small>user→group</small>
               </label>
               <label class="checkbox-inline" data-toggle-permission="true" data-permission-head="<%= @object.uuid %>" data-permission-name="can_read">
@@ -87,7 +87,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
                     disabled: (group.owner_uuid == @object.uuid),
                     data: {
                       permission_tail: group.uuid,
-                      permission_uuid: member_group_perms[group.uuid]}) %>
+                      permission_uuid: member_group_perms[group.uuid] || 'x'}) %>
                 <small>group→user</small>
               </label>
               <label class="checkbox-inline">

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list