Skip to content

Determine rule/args from command #6

@richfitz

Description

@richfitz

Replace things like

  growth_mortality_traits:
    depends: download/wright_2010.txt
    rule: process_wright_2010

with

 growth_mortality_traits:
    command: process_wright_2010("download/wright_2010.txt")

or more generally

target:
  depends: [foo, bar]
  rule: func

with

target:
  command: func(foo, bar)

Retain, at least for now the current depends: / rule: interface. An explicit depends will be needed for fake targets anyway.

The inverse problem to target_argument_name appears: how to pass in the name of the target into the function. Doing that manually is of course possible:

target.csv:
  command: f("target.csv")

But better would be to allow . (following dplyr) and/or more explicitly:

target.csv:
  command: f(target_name)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions