💡 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 .task
openrefine openrefine
*/output */output
*/openrefine.log */*.log
*/*.openrefine.tar.gz */*.openrefine.tar.gz
example-doaj/input example-doaj/input
example-doaj/config example-doaj/config

View File

@ -128,12 +128,15 @@ Please file an [issue](https://github.com/opencultureconsulting/openrefine-task-
## To do ## 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 - [ ] 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

View File

@ -4,7 +4,7 @@ tasks:
main: main:
desc: Library Carpentry Lesson covering DOAJ desc: Library Carpentry Lesson covering DOAJ
vars: vars:
DIR: '{{splitList ":" .TASK | first}}' DIR: '{{splitList ":" .TASK | first}}' # results in the task namespace, which is identical to the directory name
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
@ -17,9 +17,9 @@ 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 "{{.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: # will be executed each run independent of up-to-date check deps:
- task: download - task: download # will be executed each run independent of up-to-date check
cmds: cmds:
- task: :start # launch OpenRefine - task: :start # launch OpenRefine
vars: {DIR: '{{.DIR}}', PROJECT: '{{.PROJECT}}', PORT: '{{.PORT}}', RAM: '{{.RAM}}'} vars: {DIR: '{{.DIR}}', PROJECT: '{{.PROJECT}}', PORT: '{{.PORT}}', RAM: '{{.RAM}}'}
@ -50,8 +50,7 @@ tasks:
generates: generates:
- ./{{.PROJECT}}.openrefine.tar.gz - ./{{.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
download: download:
dir: ./{{.DIR}} dir: ./{{.DIR}}

View File

@ -4,7 +4,7 @@ tasks:
main: main:
desc: Removing duplicates in a very small test dataset desc: Removing duplicates in a very small test dataset
vars: vars:
DIR: '{{splitList ":" .TASK | first}}' DIR: '{{splitList ":" .TASK | first}}' # results in the task namespace, which is identical to the directory name
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
@ -17,7 +17,7 @@ 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 "{{.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: cmds:
- task: :start # launch OpenRefine - task: :start # launch OpenRefine
vars: {DIR: '{{.DIR}}', PROJECT: '{{.PROJECT}}', PORT: '{{.PORT}}', RAM: '{{.RAM}}'} vars: {DIR: '{{.DIR}}', PROJECT: '{{.PROJECT}}', PORT: '{{.PORT}}', RAM: '{{.RAM}}'}
@ -49,8 +49,7 @@ tasks:
generates: generates:
- ./{{.PROJECT}}.openrefine.tar.gz - ./{{.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
default: # enable standalone execution (running `task` in project directory) default: # enable standalone execution (running `task` in project directory)
cmds: cmds:

View File

@ -4,7 +4,7 @@ tasks:
main: main:
desc: Powerhouse Museum Tutorial desc: Powerhouse Museum Tutorial
vars: vars:
DIR: '{{splitList ":" .TASK | first}}' DIR: '{{splitList ":" .TASK | first}}' # results in the task namespace, which is identical to the directory name
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
@ -17,9 +17,9 @@ 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 "{{.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: # will be executed each run independent of up-to-date check deps:
- task: download - task: download # will be executed each run independent of up-to-date check
cmds: cmds:
- task: :start # launch OpenRefine - task: :start # launch OpenRefine
vars: {DIR: '{{.DIR}}', PROJECT: '{{.PROJECT}}', PORT: '{{.PORT}}', RAM: '{{.RAM}}'} vars: {DIR: '{{.DIR}}', PROJECT: '{{.PROJECT}}', PORT: '{{.PORT}}', RAM: '{{.RAM}}'}
@ -52,8 +52,8 @@ tasks:
generates: generates:
- ./{{.PROJECT}}.openrefine.tar.gz - ./{{.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
download: download:
dir: ./{{.DIR}} dir: ./{{.DIR}}
vars: vars: