💡 add some more source code comments

This commit is contained in:
Felix Lohmeier 2021-02-25 12:33:27 +01:00
parent a3151e6314
commit a6d455580a
5 changed files with 18 additions and 17 deletions

2
.gitignore vendored
View File

@ -1,7 +1,7 @@
.task
openrefine
*/output
*/openrefine.log
*/*.log
*/*.openrefine.tar.gz
example-doaj/input
example-doaj/config

View File

@ -128,12 +128,15 @@ Please file an [issue](https://github.com/opencultureconsulting/openrefine-task-
## To do
- [ ] hide OpenRefine install by renaming directory to .openrefine
- [ ] add kill task to save time by skipping storing an OpenRefine project archive
- [ ] differentiate examples
- [ ] 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 applying multiple json files
- [ ] example for templating xml and validation with xmllint
- [ ] 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
- [ ] elaborate how-to for developing tasks
- [ ] document openrefine-client options and defaults (tables for input and output with file-format-specific defaults) including templating

View File

@ -4,7 +4,7 @@ tasks:
main:
desc: Library Carpentry Lesson covering DOAJ
vars:
DIR: '{{splitList ":" .TASK | first}}'
DIR: '{{splitList ":" .TASK | first}}' # results in the task namespace, which is identical to the directory name
cmds:
- task: refine
- task: :check # check OpenRefine log for any warnings and exit on error
@ -17,9 +17,9 @@ tasks:
PROJECT: doaj
PORT: 3334 # assign a different port for each project
RAM: 2048M # maximum RAM for OpenRefine java heap space
LOG: '>(tee -a "{{.PROJECT}}.log") 2>&1'
deps: # will be executed each run independent of up-to-date check
- task: download
LOG: '>(tee -a "{{.PROJECT}}.log") 2>&1' # be careful when making changes here, as the path to the log file should match the server log (see main task "start")
deps:
- task: download # will be executed each run independent of up-to-date check
cmds:
- task: :start # launch OpenRefine
vars: {DIR: '{{.DIR}}', PROJECT: '{{.PROJECT}}', PORT: '{{.PORT}}', RAM: '{{.RAM}}'}
@ -50,8 +50,7 @@ tasks:
generates:
- ./{{.PROJECT}}.openrefine.tar.gz
- output/**
ignore_error: true # workaround to avoid an orphaned Java process on error
# https://github.com/go-task/task/issues/141
ignore_error: true # workaround to avoid an orphaned Java process on error https://github.com/go-task/task/issues/141
download:
dir: ./{{.DIR}}

View File

@ -4,7 +4,7 @@ tasks:
main:
desc: Removing duplicates in a very small test dataset
vars:
DIR: '{{splitList ":" .TASK | first}}'
DIR: '{{splitList ":" .TASK | first}}' # results in the task namespace, which is identical to the directory name
cmds:
- task: refine
- task: :check # check OpenRefine log for any warnings and exit on error
@ -17,7 +17,7 @@ tasks:
PROJECT: duplicates
PORT: 3335 # assign a different port for each project
RAM: 2048M # maximum RAM for OpenRefine java heap space
LOG: '>(tee -a "{{.PROJECT}}.log") 2>&1'
LOG: '>(tee -a "{{.PROJECT}}.log") 2>&1' # be careful when making changes here, as the path to the log file should match the server log (see main task "start")
cmds:
- task: :start # launch OpenRefine
vars: {DIR: '{{.DIR}}', PROJECT: '{{.PROJECT}}', PORT: '{{.PORT}}', RAM: '{{.RAM}}'}
@ -49,8 +49,7 @@ tasks:
generates:
- ./{{.PROJECT}}.openrefine.tar.gz
- output/**
ignore_error: true # workaround to avoid an orphaned Java process on error
# https://github.com/go-task/task/issues/141
ignore_error: true # workaround to avoid an orphaned Java process on error https://github.com/go-task/task/issues/141
default: # enable standalone execution (running `task` in project directory)
cmds:

View File

@ -4,7 +4,7 @@ tasks:
main:
desc: Powerhouse Museum Tutorial
vars:
DIR: '{{splitList ":" .TASK | first}}'
DIR: '{{splitList ":" .TASK | first}}' # results in the task namespace, which is identical to the directory name
cmds:
- task: refine
- task: :check # check OpenRefine log for any warnings and exit on error
@ -17,9 +17,9 @@ tasks:
PROJECT: phm
PORT: 3336 # assign a different port for each project
RAM: 2048M # maximum RAM for OpenRefine java heap space
LOG: '>(tee -a "{{.PROJECT}}.log") 2>&1'
deps: # will be executed each run independent of up-to-date check
- task: download
LOG: '>(tee -a "{{.PROJECT}}.log") 2>&1' # be careful when making changes here, as the path to the log file should match the server log (see main task "start")
deps:
- task: download # will be executed each run independent of up-to-date check
cmds:
- task: :start # launch OpenRefine
vars: {DIR: '{{.DIR}}', PROJECT: '{{.PROJECT}}', PORT: '{{.PORT}}', RAM: '{{.RAM}}'}
@ -52,8 +52,8 @@ tasks:
generates:
- ./{{.PROJECT}}.openrefine.tar.gz
- output/**
ignore_error: true # workaround to avoid an orphaned Java process on error
# https://github.com/go-task/task/issues/141
ignore_error: true # workaround to avoid an orphaned Java process on error https://github.com/go-task/task/issues/141
download:
dir: ./{{.DIR}}
vars: