From f7472b46832d4e556383975d5b4bccd463abb429 Mon Sep 17 00:00:00 2001 From: Felix Lohmeier Date: Wed, 24 Feb 2021 16:18:11 +0100 Subject: [PATCH] :art: clarify use of PROJECT variable --- example-doaj/Taskfile.yml | 11 +++++++---- example-duplicates/Taskfile.yml | 8 +++++--- example-powerhouse/Taskfile.yml | 13 ++++++++----- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/example-doaj/Taskfile.yml b/example-doaj/Taskfile.yml index a3f411f..f7ce490 100644 --- a/example-doaj/Taskfile.yml +++ b/example-doaj/Taskfile.yml @@ -3,7 +3,8 @@ version: '3' tasks: main: desc: Library Carpentry Lesson covering DOAJ - vars: {DIR: '{{splitList ":" .TASK | first}}'} + vars: + DIR: '{{splitList ":" .TASK | first}}' cmds: - task: refine - task: :check # check OpenRefine log for any warnings and exit on error @@ -12,10 +13,10 @@ tasks: refine: dir: ./{{.DIR}} vars: + DIR: '{{splitList ":" .TASK | first}}' + PROJECT: doaj PORT: 3334 # assign a different port for each project RAM: 2048M # maximum RAM for OpenRefine java heap space - DIR: '{{splitList ":" .TASK | first}}' - PROJECT: '{{splitList ":" .TASK | first}}' deps: # will be executed each run independent of up-to-date check - task: download cmds: @@ -44,6 +45,7 @@ tasks: - task: :stop # shut down OpenRefine and archive the OpenRefine project vars: {DIR: '{{.DIR}}', PROJECT: '{{.PROJECT}}', PORT: '{{.PORT}}'} sources: + - Taskfile.yml - input/** - config/** generates: @@ -55,7 +57,8 @@ tasks: download: dir: ./{{.DIR}} - vars: {DIR: '{{splitList ":" .TASK | first}}'} + vars: + DIR: '{{splitList ":" .TASK | first}}' cmds: - mkdir -p input config - > # Download input diff --git a/example-duplicates/Taskfile.yml b/example-duplicates/Taskfile.yml index 60a31fe..b514be0 100644 --- a/example-duplicates/Taskfile.yml +++ b/example-duplicates/Taskfile.yml @@ -3,7 +3,8 @@ version: '3' tasks: main: desc: Removing duplicates in a very small test dataset - vars: {DIR: '{{splitList ":" .TASK | first}}'} + vars: + DIR: '{{splitList ":" .TASK | first}}' cmds: - task: refine - task: :check # check OpenRefine log for any warnings and exit on error @@ -12,10 +13,10 @@ tasks: refine: dir: ./{{.DIR}} vars: + DIR: '{{splitList ":" .TASK | first}}' + PROJECT: duplicates PORT: 3335 # assign a different port for each project RAM: 2048M # maximum RAM for OpenRefine java heap space - DIR: '{{splitList ":" .TASK | first}}' - PROJECT: '{{splitList ":" .TASK | first}}' cmds: - task: :start # launch OpenRefine vars: {DIR: '{{.DIR}}', PORT: '{{.PORT}}', RAM: '{{.RAM}}'} @@ -43,6 +44,7 @@ tasks: - task: :stop # shut down OpenRefine and archive the OpenRefine project vars: {DIR: '{{.DIR}}', PROJECT: '{{.PROJECT}}', PORT: '{{.PORT}}'} sources: + - Taskfile.yml - input/** - config/** generates: diff --git a/example-powerhouse/Taskfile.yml b/example-powerhouse/Taskfile.yml index 643f35d..77eaa19 100644 --- a/example-powerhouse/Taskfile.yml +++ b/example-powerhouse/Taskfile.yml @@ -3,7 +3,8 @@ version: '3' tasks: main: desc: Powerhouse Museum Tutorial - vars: {DIR: '{{splitList ":" .TASK | first}}'} + vars: + DIR: '{{splitList ":" .TASK | first}}' cmds: - task: refine - task: :check # check OpenRefine log for any warnings and exit on error @@ -12,10 +13,10 @@ tasks: refine: dir: ./{{.DIR}} vars: + DIR: '{{splitList ":" .TASK | first}}' + PROJECT: phm PORT: 3336 # assign a different port for each project RAM: 2048M # maximum RAM for OpenRefine java heap space - DIR: '{{splitList ":" .TASK | first}}' - PROJECT: '{{splitList ":" .TASK | first}}' deps: # will be executed each run independent of up-to-date check - task: download cmds: @@ -44,8 +45,9 @@ tasks: echo "used $(ps --no-headers -o cputime -p "$PID") CPU time" \ > >(tee -a openrefine.log) - task: :stop # shut down OpenRefine and archive the OpenRefine project - vars: {DIR: '{{.DIR}}', PROJECT: '{{.PROJECT}}', PORT: '{{.PORT}}'} + vars: {DIR: '{{.DIR}}', PORT: '{{.PORT}}', PROJECT: '{{.PROJECT}}'} sources: + - Taskfile.yml - input/** - config/** generates: @@ -56,7 +58,8 @@ tasks: # https://github.com/go-task/task/issues/141 download: dir: ./{{.DIR}} - vars: {DIR: '{{splitList ":" .TASK | first}}'} + vars: + DIR: '{{splitList ":" .TASK | first}}' cmds: - mkdir -p input config - > # Download input