Skip to content

papaemmelab/cookiecutter-toil

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

cookiecutter-toil

pypi badge gitter badge travis badge pyup badge

A cookiecutter for the creation of toil pipelines.

pip install cookiecutter
cookiecutter https://github.com/papaemmelab/cookiecutter-toil

Live Example

travis badge codecov badge

Check out toil_example, this project is updated automatically with every new commit on cookiecutter-toil.

Features

  • 🐳 Β  Containerized System Calls

    The commands.BaseJob inherits from ContainerJob, 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 generated README will include information on how to generate a singularity image.

  • πŸ“¦ Β  Pip Installable Project

    Check the setup.py and setup.json for pip configurations. The only place where you have to define the version of your project is in the VERSION 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 on master. To encrypt your PyPi 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.

Contributing

Please see the CONTRIBUTING.md in this repository!