A cookiecutter for the creation of toil pipelines.
pip install cookiecutter
cookiecutter https://github.com/papaemmelab/cookiecutter-toil
Check out toil_example, this project is updated automatically with every new commit on cookiecutter-toil.
-
🐳 Containerized System Calls
The
commands.BaseJob
inherits fromContainerJob
, a Job Class used to run commands with either Docker, Singularity or Python's subprocess. See toil_container to learn more.A
Dockerfile
example is included. If you use singularity, the generatedREADME
will include information on how to generate a singularity image. -
📦 Pip Installable Project
Check the
setup.py
andsetup.json
for pip configurations. The only place where you have to define the version of your project is in theVERSION
file. After generated, your project can be installed with:# local install pip install --editable <your_project_dir> # after deployment - check the continuous integration section pip install <your_project_name>
-
🍉 Python Modules
Module Description cli.py
Include the function that is mapped to the cli command, see setup.json:entry_points
commands.py
Include a toil example pipeline exceptions.py
Include package specific exceptions utils.py
Multiple util functions are available validators.py
Defines common validators -
🚧 Contributing Features
File Description README.md
with some example sections .gitignore
with well curated python ignore patterns .gitmessage
with issue types mapped to emojis! Like 🚀 for a new feature, or 🐛 for a fix .github
Contributing guidelines, code of conduct, issue and PR templates -
✅ Testing Suite
Pytest: python test examples are included, give them a try with:
py.test tests
Pylint: Google style linting configuration is included with the
.pylintrc
. Additionally, Docstrings conventions are tested with pydocstyle and are defined in.pydocstylerc
.# check linting conventions pylint --rcfile={your_project_dir}/.pylintrc {your_project} # check docstrings pydocstyle --config={your_project_dir}/.pydocstylerc {your_project}
Tox: Run
pytest
,pylint
,pydocstyle
with coverage on isolated python environments at the same time:tox
-
🌀 Continuous Integration
Travis CI configuration with automatic deployment to
PyPi
with tags onmaster
. To encrypt yourPyPi
password simply run:# you need travis (e.g. brew install travis) travis encrypt --add deploy.password
Check out this tutorial if you want to learn more about deployment.
-
🐁 Click Mode
Click is an great package to seamlessly build CLI packages. Use
cli_type="click"
if you want to use the goodies of this cookiecutter but don't need the toil rocketry. By using this mode, some of the toil specific modules and tests will be removed.
Please see the CONTRIBUTING.md in this repository!