🎨 clarify use of PROJECT variable

This commit is contained in:
Felix Lohmeier 2021-02-24 16:18:11 +01:00
parent 498a261dd7
commit f7472b4683
3 changed files with 20 additions and 12 deletions

View File

@ -3,7 +3,8 @@ version: '3'
tasks: tasks:
main: main:
desc: Library Carpentry Lesson covering DOAJ desc: Library Carpentry Lesson covering DOAJ
vars: {DIR: '{{splitList ":" .TASK | first}}'} vars:
DIR: '{{splitList ":" .TASK | first}}'
cmds: cmds:
- task: refine - task: refine
- task: :check # check OpenRefine log for any warnings and exit on error - task: :check # check OpenRefine log for any warnings and exit on error
@ -12,10 +13,10 @@ tasks:
refine: refine:
dir: ./{{.DIR}} dir: ./{{.DIR}}
vars: vars:
DIR: '{{splitList ":" .TASK | first}}'
PROJECT: doaj
PORT: 3334 # assign a different port for each project PORT: 3334 # assign a different port for each project
RAM: 2048M # maximum RAM for OpenRefine java heap space 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 deps: # will be executed each run independent of up-to-date check
- task: download - task: download
cmds: cmds:
@ -44,6 +45,7 @@ tasks:
- task: :stop # shut down OpenRefine and archive the OpenRefine project - task: :stop # shut down OpenRefine and archive the OpenRefine project
vars: {DIR: '{{.DIR}}', PROJECT: '{{.PROJECT}}', PORT: '{{.PORT}}'} vars: {DIR: '{{.DIR}}', PROJECT: '{{.PROJECT}}', PORT: '{{.PORT}}'}
sources: sources:
- Taskfile.yml
- input/** - input/**
- config/** - config/**
generates: generates:
@ -55,7 +57,8 @@ tasks:
download: download:
dir: ./{{.DIR}} dir: ./{{.DIR}}
vars: {DIR: '{{splitList ":" .TASK | first}}'} vars:
DIR: '{{splitList ":" .TASK | first}}'
cmds: cmds:
- mkdir -p input config - mkdir -p input config
- > # Download input - > # Download input

View File

@ -3,7 +3,8 @@ version: '3'
tasks: tasks:
main: main:
desc: Removing duplicates in a very small test dataset desc: Removing duplicates in a very small test dataset
vars: {DIR: '{{splitList ":" .TASK | first}}'} vars:
DIR: '{{splitList ":" .TASK | first}}'
cmds: cmds:
- task: refine - task: refine
- task: :check # check OpenRefine log for any warnings and exit on error - task: :check # check OpenRefine log for any warnings and exit on error
@ -12,10 +13,10 @@ tasks:
refine: refine:
dir: ./{{.DIR}} dir: ./{{.DIR}}
vars: vars:
DIR: '{{splitList ":" .TASK | first}}'
PROJECT: duplicates
PORT: 3335 # assign a different port for each project PORT: 3335 # assign a different port for each project
RAM: 2048M # maximum RAM for OpenRefine java heap space RAM: 2048M # maximum RAM for OpenRefine java heap space
DIR: '{{splitList ":" .TASK | first}}'
PROJECT: '{{splitList ":" .TASK | first}}'
cmds: cmds:
- task: :start # launch OpenRefine - task: :start # launch OpenRefine
vars: {DIR: '{{.DIR}}', PORT: '{{.PORT}}', RAM: '{{.RAM}}'} vars: {DIR: '{{.DIR}}', PORT: '{{.PORT}}', RAM: '{{.RAM}}'}
@ -43,6 +44,7 @@ tasks:
- task: :stop # shut down OpenRefine and archive the OpenRefine project - task: :stop # shut down OpenRefine and archive the OpenRefine project
vars: {DIR: '{{.DIR}}', PROJECT: '{{.PROJECT}}', PORT: '{{.PORT}}'} vars: {DIR: '{{.DIR}}', PROJECT: '{{.PROJECT}}', PORT: '{{.PORT}}'}
sources: sources:
- Taskfile.yml
- input/** - input/**
- config/** - config/**
generates: generates:

View File

@ -3,7 +3,8 @@ version: '3'
tasks: tasks:
main: main:
desc: Powerhouse Museum Tutorial desc: Powerhouse Museum Tutorial
vars: {DIR: '{{splitList ":" .TASK | first}}'} vars:
DIR: '{{splitList ":" .TASK | first}}'
cmds: cmds:
- task: refine - task: refine
- task: :check # check OpenRefine log for any warnings and exit on error - task: :check # check OpenRefine log for any warnings and exit on error
@ -12,10 +13,10 @@ tasks:
refine: refine:
dir: ./{{.DIR}} dir: ./{{.DIR}}
vars: vars:
DIR: '{{splitList ":" .TASK | first}}'
PROJECT: phm
PORT: 3336 # assign a different port for each project PORT: 3336 # assign a different port for each project
RAM: 2048M # maximum RAM for OpenRefine java heap space 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 deps: # will be executed each run independent of up-to-date check
- task: download - task: download
cmds: cmds:
@ -44,8 +45,9 @@ tasks:
echo "used $(ps --no-headers -o cputime -p "$PID") CPU time" \ echo "used $(ps --no-headers -o cputime -p "$PID") CPU time" \
> >(tee -a openrefine.log) > >(tee -a openrefine.log)
- task: :stop # shut down OpenRefine and archive the OpenRefine project - 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: sources:
- Taskfile.yml
- input/** - input/**
- config/** - config/**
generates: generates:
@ -56,7 +58,8 @@ tasks:
# https://github.com/go-task/task/issues/141 # https://github.com/go-task/task/issues/141
download: download:
dir: ./{{.DIR}} dir: ./{{.DIR}}
vars: {DIR: '{{splitList ":" .TASK | first}}'} vars:
DIR: '{{splitList ":" .TASK | first}}'
cmds: cmds:
- mkdir -p input config - mkdir -p input config
- > # Download input - > # Download input