stable_ranks
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 2 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.8%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: mmaelicke
- License: cc0-1.0
- Language: Jupyter Notebook
- Default Branch: main
- Size: 233 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
tooltemplatejupyter
This is the template for a generic containerized Jupyter notebook tool following the Tool Specification for reusable research software using Docker.
This template can be used to generate new Github repositories from it.
How generic?
Tools using this template can be run by the toolbox-runner. That is only convenience, the tools implemented using this template are independent of any framework.
The main idea is to implement a common file structure inside container to load inputs and outputs of the tool. The template shares this structures with thePython template, R template, NodeJS template and Octave template, but can be mimiced in any container.
Each container needs at least the following structure:
/
|- in/
| |- input.json
|- out/
| |- ...
|- src/
| |- tool.yml
| |- run.py
| |- toolname.ipynb
| |- CITATION.cff
input.jsonare parameters and data references. Whichever framework runs the container, this is how parameters are passed.tool.ymlis the tool specification. It contains metadata about the scope of the tool, the number of endpoints (functions) and their parametersrun.pyis a Python script that handles the execution. The notebooks are executed by papermill.toolname.ipynbis the tool itself. The name of the notebook must match the name you specified intool.yml. This way you can add more than one script to the container. If a single tool should run more than one notebook, you need to change therun.py.
How to build the image?
You can build the image from within the root of this repo by
docker build -t tbr_jupyter_tempalate .
Use any tag you like.
Alternatively, the contained .github/workflows/docker-image.yml will build the image for you
on new releases on Github. You need to change the target repository in the aforementioned yaml.
How to run?
This template installs the json2args python package to parse the parameters in the /in/input.json. This assumes that
the files are not renamed and not moved and there is actually only one tool in the container. For any other case, the environment variables
PARAM_FILE can be used to specify a new location for the input.json and TOOL_RUN can be used to specify the tool to be executed.
The run.py has to take care of that.
To invoke the docker container directly run something similar to:
docker run --rm -it -v /path/to/local/in:/in -v /path/to/local/out:/out -e TOOL_RUN=foobar tbr_jupyter_template
Then, the output will be in your local out and based on your local input folder. Stdout and Stderr are also connected to the host.
With the toolbox runner, this is simplyfied:
```python from toolboxrunner import listtools tools = list_tools() # dict with tool names as keys
foobar = tools.get('foobar') # it has to be present there...
foobar.run(resultpath='./', fooint=1337, foo_string="Please change me")
``
The example above will create a temporary file structure to be mounted into the container and then create a.tar.gz` on termination of all
inputs, outputs, specifications and some metadata, including the image sha256 used to create the output in the current working directory.
What about real tools, no foobar?
Yeah.
- change the
tool.ymlto describe your actual tool - add any
pip installorapt-get installneeded to the Dockerfile - add additional source code to
/src - change the
toolname.ipynbto consume parameters and data from/inand useful output inout - build, run, rock!
Owner
- Name: Mirko Mälicke
- Login: mmaelicke
- Kind: user
- Location: Karlsruhe, Germany
- Company: Karlsruhe Institute of Technology (KIT)
- Website: http://hyd.iwg.kit.edu/personal_maelicke.php
- Repositories: 44
- Profile: https://github.com/mmaelicke
PhD canidate and hydrologist at Karlsruhe Institute of Technology (KIT); My main fields are geostatistics, Python programming and data science.
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: Tool Spec Python template
message: >-
Please replace this citation information with appropriate
metadata for your tool
type: software
authors:
- given-names: Mirko
family-names: Mälicke
email: mirko.maelicke@KIT.edu
affiliation: >-
Institute for Water and Environment, Hydrology,
Karlsruhe Institute for Technology (KIT)
orcid: 'https://orcid.org/0000-0002-0424-2651'
- given-names: Bischof
family-names: Balazs
email: balazs.bischof@kit.edu
affiliation: >-
Institute for Water and Environment, Hydrology,
Karlsruhe Institute for Technology (KIT)
- given-names: Alexander
family-names: Dolich
email: alexander.dolich@kit.edu
affiliation: >-
Institute for Water and Environment, Hydrology,
Karlsruhe Institute for Technology (KIT)
orcid: 'https://orcid.org/0000-0003-4160-6765'
repository-code: 'https://github.com/VForWaTer/tool_template_python'
url: 'https://vforwater.github.io/tool-specs/'
abstract: >-
This is a Github repository template for scientific data
(pre-)processing tools follwoing the tool specs
(https://vforwater.github.io/tool-specs/) for
containerized scientific tools. You can use this
repository as a starting point for scientific tools.
keywords:
- docker
- tool-spec
- V-For-WaTer
license: CC-BY-4.0
version: '0.1'
date-released: '2024-11-14'
GitHub Events
Total
- Member event: 1
- Push event: 11
- Create event: 4
Last Year
- Member event: 1
- Push event: 11
- Create event: 4
Issues and Pull Requests
Last synced: over 1 year ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- actions/checkout v3 composite
- docker/build-push-action v3 composite
- docker/login-action v2 composite
- docker/metadata-action v4 composite
- docker/setup-buildx-action v2 composite
- docker/setup-qemu-action v2 composite
- softprops/action-gh-release v1 composite
- python 3.12 build
- postgis/postgis 15-3.4