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.BaseJobinherits fromContainerJob, a Job Class used to run commands with either Docker, Singularity or Python's subprocess. See toil_container to learn more.A
Dockerfileexample is included. If you use singularity, the generatedREADMEwill include information on how to generate a singularity image. -
๐ฆ ย Pip Installable Project
Check the
setup.pyandsetup.jsonfor pip configurations. The only place where you have to define the version of your project is in theVERSIONfile. 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.pyInclude the function that is mapped to the cli command, see setup.json:entry_pointscommands.pyInclude a toil example pipeline exceptions.pyInclude package specific exceptions utils.pyMultiple util functions are available validators.pyDefines common validators -
๐ง ย Contributing Features
File Description README.mdwith some example sections .gitignorewith well curated python ignore patterns .gitmessagewith issue types mapped to emojis! Like ๐ for a new feature, or ๐ for a fix .githubContributing guidelines, code of conduct, issue and PR templates -
โ ย Testing Suite
Pytest: python test examples are included, give them a try with:
py.test testsPylint: 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,pydocstylewith coverage on isolated python environments at the same time:tox -
๐ ย Continuous Integration
Travis CI configuration with automatic deployment to
PyPiwith tags onmaster. To encrypt yourPyPipassword simply run:# you need travis (e.g. brew install travis) travis encrypt --add deploy.passwordCheck 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!