Skip to content

Additional options for output file collection #134

Closed

Description

@StarvingMarvin

Right now the only way to specify which files goes to which output are globs, but we had issues with tools where ordinary globs weren't enough to distinguish between different outputs (e.g filenames without "something"). We kinda solved our problem with bash extended globs, but it's not the cleanest solution (we have to run it inside a docker container), and it is not really expected that other implementations will handle them. Adding another option in CommandOutputBinding like "regexp": "<something>" would probably suffice. Finally we could go "full Turing-complete" and add an option like "filter": {expression} that could get list of all files from working dir and return whatever files appropriate for that output.

Activity

  1. added this to the Draft 3 milestone on Oct 13, 2015
  2. tetron commented on Nov 26, 2015

    @tetron
    Member

    @StarvingMarvin how about this?

    We add a special case glob: ** that captures the entire contents of the output directory (including subdirectories), then use an expression to do arbitrary filtering.

    outputBinding:
      glob: **
      outputEval: |
       ${
         var ret = [];
         for (var i = 0; i < self.length; i++) {
           // only capture .txt files
           if (self[i].path.match(/\.txt$/) { ret.push(self[i]); }
         }
         return ret;
       }
  3. mr-c commented on Dec 9, 2015

    @mr-c
    Member

    We should get the major changes in Draft 3 finished first; I am moving this to the Draft 4 milestone.

  4. modified the milestones: , Draft 3 on Dec 9, 2015
  5. mr-c commented on Jun 14, 2016

    @mr-c
    Member

    According to @tetron this will be obsoleted by DirectoryType

  6. added a commit that references this issue on Mar 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions