cookiecutter-toil
A cookiecutter for the creation of toil pipelines.
pip install cookiecutter
cookiecutter https://github.com/papaemmelab/cookiecutter-toil
Live Example
Check out toil_example, this project is updated automatically with every new commit on cookiecutter-toil.
Features
-
π³ Β Containerized System CallsThe
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 ProjectCheck 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 ModulesModule 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 FeaturesFile 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 SuitePytest: 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 IntegrationTravis 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 ModeClick 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.
Contributing
Please see the CONTRIBUTING.md in this repository!