From 0287f46a82e22378b5c805138cd194849b03b9b4 Mon Sep 17 00:00:00 2001 From: Felix Lohmeier Date: Fri, 11 Jun 2021 19:17:13 +0200 Subject: [PATCH 1/6] add binder files #3 --- binder/apt.txt | 2 ++ binder/postBuild | 14 ++++++++++++++ binder/requirements.txt | 2 ++ 3 files changed, 18 insertions(+) create mode 100644 binder/apt.txt create mode 100755 binder/postBuild create mode 100644 binder/requirements.txt diff --git a/binder/apt.txt b/binder/apt.txt new file mode 100644 index 0000000..d3fbcfa --- /dev/null +++ b/binder/apt.txt @@ -0,0 +1,2 @@ +openjdk-8-jre +lsof diff --git a/binder/postBuild b/binder/postBuild new file mode 100755 index 0000000..3640287 --- /dev/null +++ b/binder/postBuild @@ -0,0 +1,14 @@ +#!/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 +mkdir -p $HOME/.local/bin +mv task $HOME/.local/bin/ + +# Run install task to download OpenRefine and openrefine-client +task install diff --git a/binder/requirements.txt b/binder/requirements.txt new file mode 100644 index 0000000..c298273 --- /dev/null +++ b/binder/requirements.txt @@ -0,0 +1,2 @@ +jupyter-server-proxy==1.5.3 +bash_kernel==0.7.2 From 20bc39ed74fbdafca5cd2138581b7f8e78cbf4c4 Mon Sep 17 00:00:00 2001 From: Felix Lohmeier Date: Fri, 11 Jun 2021 19:32:58 +0200 Subject: [PATCH 2/6] suppress wget log #3 --- Taskfile.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Taskfile.yml b/Taskfile.yml index 125b1a3..6050fd8 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -65,7 +65,7 @@ tasks: >> "{{.PROJECT}}.log" 2>&1 & - | # wait until OpenRefine API is available 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 done" From fd5d04786d56c86cff68f367217f0e1bece46388 Mon Sep 17 00:00:00 2001 From: Felix Lohmeier Date: Fri, 11 Jun 2021 19:33:39 +0200 Subject: [PATCH 3/6] cleanup archive file after extracting #3 --- binder/postBuild | 1 + 1 file changed, 1 insertion(+) diff --git a/binder/postBuild b/binder/postBuild index 3640287..665f60b 100755 --- a/binder/postBuild +++ b/binder/postBuild @@ -7,6 +7,7 @@ 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/ From 9fe9b0b3a6f682fe078620ee93569c13ccee9ca2 Mon Sep 17 00:00:00 2001 From: Felix Lohmeier Date: Fri, 11 Jun 2021 19:45:08 +0200 Subject: [PATCH 4/6] add jupyter notebook #3 --- demo.ipynb | 1 + 1 file changed, 1 insertion(+) create mode 100644 demo.ipynb diff --git a/demo.ipynb b/demo.ipynb new file mode 100644 index 0000000..79839ce --- /dev/null +++ b/demo.ipynb @@ -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} \ No newline at end of file From f068abdb272ef98c4acb16edb9cb7607d7870f02 Mon Sep 17 00:00:00 2001 From: Felix Lohmeier Date: Fri, 11 Jun 2021 20:01:01 +0200 Subject: [PATCH 5/6] add binder instructions to README #3 --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 08c7517..e81b270 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 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/binder?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). @@ -41,6 +41,16 @@ Templates for OpenRefine batch processing (import, transform, export) using the * GNU/Linux (tested with Fedora 32) * 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/binder?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 1. Clone this git repository From e78570123a717ce74867d1c7c18b4e86b2a0af49 Mon Sep 17 00:00:00 2001 From: Felix Lohmeier Date: Fri, 11 Jun 2021 20:02:51 +0200 Subject: [PATCH 6/6] finally change branch to main #3 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e81b270..bed3d48 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # OpenRefine Task Runner (💎+🤖) -[![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/binder?urlpath=lab/tree/demo.ipynb) +[![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). @@ -43,7 +43,7 @@ Templates for OpenRefine batch processing (import, transform, export) using the ## Demo via binder -[![Binder](https://notebooks.gesis.org/binder/badge_logo.svg)](https://notebooks.gesis.org/binder/v2/gh/opencultureconsulting/openrefine-task-runner/binder?urlpath=lab/tree/demo.ipynb) +[![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)