Merge pull request #4 from opencultureconsulting/binder
resolve #3 add jupyter notebook and binder files
This commit is contained in:
commit
819dc307ad
12
README.md
12
README.md
|
@ -1,6 +1,6 @@
|
||||||
# OpenRefine Task Runner (💎+🤖)
|
# OpenRefine Task Runner (💎+🤖)
|
||||||
|
|
||||||
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/888dbf663fdd409e8d8fcf8472114194)](https://www.codacy.com/gh/opencultureconsulting/openrefine-task-runner/dashboard)
|
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/888dbf663fdd409e8d8fcf8472114194)](https://www.codacy.com/gh/opencultureconsulting/openrefine-task-runner/dashboard) [![Binder](https://notebooks.gesis.org/binder/badge_logo.svg)](https://notebooks.gesis.org/binder/v2/gh/opencultureconsulting/openrefine-task-runner/main?urlpath=lab/tree/demo.ipynb)
|
||||||
|
|
||||||
Templates for OpenRefine batch processing (import, transform, export) using the task runner [go-task](https://github.com/go-task/task) and the [openrefine-client](https://github.com/opencultureconsulting/openrefine-client) to control OpenRefine via [its HTTP API](https://docs.openrefine.org/technical-reference/openrefine-api).
|
Templates for OpenRefine batch processing (import, transform, export) using the task runner [go-task](https://github.com/go-task/task) and the [openrefine-client](https://github.com/opencultureconsulting/openrefine-client) to control OpenRefine via [its HTTP API](https://docs.openrefine.org/technical-reference/openrefine-api).
|
||||||
|
|
||||||
|
@ -41,6 +41,16 @@ Templates for OpenRefine batch processing (import, transform, export) using the
|
||||||
* GNU/Linux (tested with Fedora 32)
|
* GNU/Linux (tested with Fedora 32)
|
||||||
* JAVA 8+ (for OpenRefine)
|
* JAVA 8+ (for OpenRefine)
|
||||||
|
|
||||||
|
## Demo via binder
|
||||||
|
|
||||||
|
[![Binder](https://notebooks.gesis.org/binder/badge_logo.svg)](https://notebooks.gesis.org/binder/v2/gh/opencultureconsulting/openrefine-task-runner/main?urlpath=lab/tree/demo.ipynb)
|
||||||
|
|
||||||
|
- free to use on-demand server with Jupyterlab and Bash Kernel
|
||||||
|
- OpenRefine, openrefine-client and go-task [preinstalled](binder/postBuild)
|
||||||
|
- no registration needed, will start within a few minutes
|
||||||
|
- [restricted](https://notebooks.gesis.org/faq/) to 4 GB RAM and server will be deleted after 10 minutes of inactivity
|
||||||
|
- service is provided by GESIS and is intended for use by social scientists
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
1. Clone this git repository
|
1. Clone this git repository
|
||||||
|
|
|
@ -65,7 +65,7 @@ tasks:
|
||||||
>> "{{.PROJECT}}.log" 2>&1 &
|
>> "{{.PROJECT}}.log" 2>&1 &
|
||||||
- | # wait until OpenRefine API is available
|
- | # wait until OpenRefine API is available
|
||||||
timeout 30s bash -c "until
|
timeout 30s bash -c "until
|
||||||
wget -q -O - http://localhost:{{.PORT}} | cat | grep -q -o OpenRefine
|
wget -q -O - -o /dev/null http://localhost:{{.PORT}} | cat | grep -q -o OpenRefine
|
||||||
do sleep 1
|
do sleep 1
|
||||||
done"
|
done"
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
openjdk-8-jre
|
||||||
|
lsof
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Install bash_kernel https://github.com/takluyver/bash_kernel
|
||||||
|
python -m bash_kernel.install
|
||||||
|
|
||||||
|
# Install go-task https://github.com/go-task/task
|
||||||
|
wget -q https://github.com/go-task/task/releases/download/v3.2.2/task_linux_amd64.tar.gz
|
||||||
|
tar -xzf task_linux_amd64.tar.gz
|
||||||
|
rm task_linux_amd64.tar.gz
|
||||||
|
mkdir -p $HOME/.local/bin
|
||||||
|
mv task $HOME/.local/bin/
|
||||||
|
|
||||||
|
# Run install task to download OpenRefine and openrefine-client
|
||||||
|
task install
|
|
@ -0,0 +1,2 @@
|
||||||
|
jupyter-server-proxy==1.5.3
|
||||||
|
bash_kernel==0.7.2
|
|
@ -0,0 +1 @@
|
||||||
|
{"cells":[{"metadata":{},"cell_type":"markdown","source":"## Run all tasks in parallel"},{"metadata":{"trusted":true},"cell_type":"code","source":"task","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## Run a specific task"},{"metadata":{"trusted":true},"cell_type":"code","source":"task example-duplicates:main","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## Run some tasks in parallel"},{"metadata":{"trusted":true},"cell_type":"code","source":"task --parallel example-duplicates:main example-doaj:main","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## Force run a task even when the task is up-to-date"},{"metadata":{"trusted":true},"cell_type":"code","source":"task example-duplicates:main --force","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## Dry-run in verbose mode for debugging"},{"metadata":{"trusted":true},"cell_type":"code","source":"task example-duplicates:main --dry --verbose --force","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## List available tasks"},{"metadata":{"trusted":true},"cell_type":"code","source":"task --list","execution_count":null,"outputs":[]}],"metadata":{"kernelspec":{"name":"bash","display_name":"Bash","language":"bash"},"language_info":{"name":"bash","codemirror_mode":"shell","mimetype":"text/x-sh","file_extension":".sh"}},"nbformat":4,"nbformat_minor":5}
|
Loading…
Reference in New Issue