🥅 exemplify log dir in examples
This commit is contained in:
parent
48e24b004d
commit
1a8cfee580
|
@ -1,8 +1,7 @@
|
||||||
.task
|
.task
|
||||||
openrefine
|
openrefine
|
||||||
*/output
|
*/output
|
||||||
*/openrefine.log
|
*/log
|
||||||
*/*.openrefine.tar.gz
|
|
||||||
example-doaj/input
|
example-doaj/input
|
||||||
example-doaj/config
|
example-doaj/config
|
||||||
example-powerhouse/input
|
example-powerhouse/input
|
||||||
|
|
|
@ -128,12 +128,14 @@ Please file an [issue](https://github.com/opencultureconsulting/openrefine-task-
|
||||||
|
|
||||||
## To do
|
## To do
|
||||||
|
|
||||||
|
- [ ] add kill task to save time by skipping storing an OpenRefine project archive
|
||||||
- [ ] differentiate examples
|
- [ ] differentiate examples
|
||||||
- [ ] example for loading multiple input files by providing a zip archive
|
- [ ] example for loading multiple input files by providing a zip archive
|
||||||
- [ ] example for download "fresh" input data as a dependent task and generating archives/diffs
|
- [ ] example for download "fresh" input data as a dependent task and generating archives/diffs
|
||||||
- [ ] example for applying multiple json files
|
- [ ] example for applying multiple json files
|
||||||
- [ ] example for templating xml and validation with xmllint
|
- [ ] example for templating xml and validation with xmllint
|
||||||
- [ ] example for multiple projects in one directory/taskfile
|
- [ ] example for multiple projects in one directory/taskfile
|
||||||
|
- [ ] example for using kill task to save time and disk space
|
||||||
- [ ] describe example datasets (and differences) with source code examples
|
- [ ] describe example datasets (and differences) with source code examples
|
||||||
- [ ] elaborate how-to for developing tasks
|
- [ ] elaborate how-to for developing tasks
|
||||||
- [ ] document openrefine-client options and defaults (tables for input and output with file-format-specific defaults) including templating
|
- [ ] document openrefine-client options and defaults (tables for input and output with file-format-specific defaults) including templating
|
||||||
|
|
|
@ -17,12 +17,12 @@ tasks:
|
||||||
PROJECT: doaj
|
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
|
||||||
LOG: '>(tee -a "{{.PROJECT}}.log") 2>&1'
|
LOG: '>(tee -a "log/{{.PROJECT}}.log") 2>&1'
|
||||||
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:
|
||||||
- task: :start # launch OpenRefine
|
- task: :start # launch OpenRefine
|
||||||
vars: {DIR: '{{.DIR}}', PROJECT: '{{.PROJECT}}', PORT: '{{.PORT}}', RAM: '{{.RAM}}'}
|
vars: {DIR: '{{.DIR}}/log', PROJECT: '{{.PROJECT}}', PORT: '{{.PORT}}', RAM: '{{.RAM}}'}
|
||||||
- > # import file
|
- > # import file
|
||||||
"$CLIENT" -P {{.PORT}}
|
"$CLIENT" -P {{.PORT}}
|
||||||
--create "$(readlink -m input/doaj-article-sample.csv)"
|
--create "$(readlink -m input/doaj-article-sample.csv)"
|
||||||
|
@ -42,13 +42,13 @@ tasks:
|
||||||
echo "used $(($(ps --no-headers -o rss -p "$PID") / 1024)) MB RAM" > {{.LOG}}
|
echo "used $(($(ps --no-headers -o rss -p "$PID") / 1024)) MB RAM" > {{.LOG}}
|
||||||
echo "used $(ps --no-headers -o cputime -p "$PID") CPU time" > {{.LOG}}
|
echo "used $(ps --no-headers -o cputime -p "$PID") CPU time" > {{.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}}/log', PROJECT: '{{.PROJECT}}', PORT: '{{.PORT}}'}
|
||||||
sources:
|
sources:
|
||||||
- Taskfile.yml
|
- Taskfile.yml
|
||||||
- input/**
|
- input/**
|
||||||
- config/**
|
- config/**
|
||||||
generates:
|
generates:
|
||||||
- ./{{.PROJECT}}.openrefine.tar.gz
|
- log/{{.PROJECT}}.openrefine.tar.gz
|
||||||
- output/**
|
- output/**
|
||||||
ignore_error: true # workaround to avoid an orphaned Java process on error
|
ignore_error: true # workaround to avoid an orphaned Java process on error
|
||||||
# https://github.com/go-task/task/issues/141
|
# https://github.com/go-task/task/issues/141
|
||||||
|
|
|
@ -17,10 +17,10 @@ tasks:
|
||||||
PROJECT: duplicates
|
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
|
||||||
LOG: '>(tee -a "{{.PROJECT}}.log") 2>&1'
|
LOG: '>(tee -a "log/{{.PROJECT}}.log") 2>&1'
|
||||||
cmds:
|
cmds:
|
||||||
- task: :start # launch OpenRefine
|
- task: :start # launch OpenRefine
|
||||||
vars: {DIR: '{{.DIR}}', PROJECT: '{{.PROJECT}}', PORT: '{{.PORT}}', RAM: '{{.RAM}}'}
|
vars: {DIR: '{{.DIR}}/log', PROJECT: '{{.PROJECT}}', PORT: '{{.PORT}}', RAM: '{{.RAM}}'}
|
||||||
- > # import file
|
- > # import file
|
||||||
"$CLIENT" -P {{.PORT}}
|
"$CLIENT" -P {{.PORT}}
|
||||||
--create "$(readlink -m input/duplicates.csv)"
|
--create "$(readlink -m input/duplicates.csv)"
|
||||||
|
@ -41,13 +41,13 @@ tasks:
|
||||||
echo "used $(($(ps --no-headers -o rss -p "$PID") / 1024)) MB RAM" > {{.LOG}}
|
echo "used $(($(ps --no-headers -o rss -p "$PID") / 1024)) MB RAM" > {{.LOG}}
|
||||||
echo "used $(ps --no-headers -o cputime -p "$PID") CPU time" > {{.LOG}}
|
echo "used $(ps --no-headers -o cputime -p "$PID") CPU time" > {{.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}}/log', PROJECT: '{{.PROJECT}}', PORT: '{{.PORT}}'}
|
||||||
sources:
|
sources:
|
||||||
- Taskfile.yml
|
- Taskfile.yml
|
||||||
- input/**
|
- input/**
|
||||||
- config/**
|
- config/**
|
||||||
generates:
|
generates:
|
||||||
- ./{{.PROJECT}}.openrefine.tar.gz
|
- log/{{.PROJECT}}.openrefine.tar.gz
|
||||||
- output/**
|
- output/**
|
||||||
ignore_error: true # workaround to avoid an orphaned Java process on error
|
ignore_error: true # workaround to avoid an orphaned Java process on error
|
||||||
# https://github.com/go-task/task/issues/141
|
# https://github.com/go-task/task/issues/141
|
||||||
|
|
|
@ -17,12 +17,12 @@ tasks:
|
||||||
PROJECT: phm
|
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
|
||||||
LOG: '>(tee -a "{{.PROJECT}}.log") 2>&1'
|
LOG: '>(tee -a "log/{{.PROJECT}}.log") 2>&1'
|
||||||
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:
|
||||||
- task: :start # launch OpenRefine
|
- task: :start # launch OpenRefine
|
||||||
vars: {DIR: '{{.DIR}}', PROJECT: '{{.PROJECT}}', PORT: '{{.PORT}}', RAM: '{{.RAM}}'}
|
vars: {DIR: '{{.DIR}}/log', PROJECT: '{{.PROJECT}}', PORT: '{{.PORT}}', RAM: '{{.RAM}}'}
|
||||||
- > # import file
|
- > # import file
|
||||||
"$CLIENT" -P {{.PORT}}
|
"$CLIENT" -P {{.PORT}}
|
||||||
--create "$(readlink -m input/phm-collection.tsv)"
|
--create "$(readlink -m input/phm-collection.tsv)"
|
||||||
|
@ -44,13 +44,13 @@ tasks:
|
||||||
echo "used $(($(ps --no-headers -o rss -p "$PID") / 1024)) MB RAM" > {{.LOG}}
|
echo "used $(($(ps --no-headers -o rss -p "$PID") / 1024)) MB RAM" > {{.LOG}}
|
||||||
echo "used $(ps --no-headers -o cputime -p "$PID") CPU time" > {{.LOG}}
|
echo "used $(ps --no-headers -o cputime -p "$PID") CPU time" > {{.LOG}}
|
||||||
- task: :stop # shut down OpenRefine and archive the OpenRefine project
|
- task: :stop # shut down OpenRefine and archive the OpenRefine project
|
||||||
vars: {DIR: '{{.DIR}}', PORT: '{{.PORT}}', PROJECT: '{{.PROJECT}}'}
|
vars: {DIR: '{{.DIR}}/log', PORT: '{{.PORT}}', PROJECT: '{{.PROJECT}}'}
|
||||||
sources:
|
sources:
|
||||||
- Taskfile.yml
|
- Taskfile.yml
|
||||||
- input/**
|
- input/**
|
||||||
- config/**
|
- config/**
|
||||||
generates:
|
generates:
|
||||||
- ./{{.PROJECT}}.openrefine.tar.gz
|
- log/{{.PROJECT}}.openrefine.tar.gz
|
||||||
- output/**
|
- output/**
|
||||||
ignore_error: true # workaround to avoid an orphaned Java process on error
|
ignore_error: true # workaround to avoid an orphaned Java process on error
|
||||||
# https://github.com/go-task/task/issues/141
|
# https://github.com/go-task/task/issues/141
|
||||||
|
|
Loading…
Reference in New Issue