.. image:: https://pyup.io/repos/github/ClimateImpactLab/cookiecutter-pypackage/shield.svg :target: https://pyup.io/repos/github/ClimateImpactLab/cookiecutter-pypackage/ :alt: Updates
Cookiecutter_ template for a Python package.
pytest
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
Linux:
.. image:: https://img.shields.io/travis/ClimateImpactLab/cookiecutter-pypackage.svg?branch=master :target: https://travis-ci.org/ClimateImpactLab/cookiecutter-pypackage :alt: Linux build status on Travis CI
Windows:
.. image:: https://ci.appveyor.com/api/projects/status/jvjb7rcdkighq26h/branch/master?svg=true :target: https://ci.appveyor.com/project/delgadom/cookiecutter-pypackage/branch/master :alt: Windows build status on Appveyor
Install the latest Cookiecutter if you haven't installed it yet (this requires Cookiecutter 1.4.0 or higher)::
pip install -U cookiecutter
Generate a Python package project::
cookiecutter https://github.com/ClimateImpactLab/cookiecutter-pypackage.git
Then:
pip install -r requirements_dev.txt
)travis_pypi_setup.py
to encrypt your PyPI password in Travis config
and activate automated deployment on PyPI when you push a new tag to master branch.requirements.txt
file that specifies the packages you will need for
your project and their versions. For more info see the pip docs for requirements files
_.pyup.io
_... _pip docs for requirements files
: https://pip.pypa.io/en/stable/user_guide/#requirements-files
For more details, see the cookiecutter-pypackage tutorial
_.
.. _cookiecutter-pypackage tutorial
: https://cookiecutter-pypackage.readthedocs.io/en/latest/tutorial.html
Don't worry, you have options:
Similar Cookiecutter Templates
* `Nekroze/cookiecutter-pypackage`_: A fork of this with a PyTest test runner,
strict flake8 checking with Travis/Tox, and some docs and `setup.py` differences.
* `tony/cookiecutter-pypackage-pythonic`_: Fork with py2.7+3.3 optimizations.
Flask/Werkzeug-style test runner, ``_compat`` module and module/doc conventions.
See ``README.rst`` or the `github comparison view`_ for exhaustive list of
additions and modifications.
* `ardydedase/cookiecutter-pypackage`_: A fork with separate requirements files rather than a requirements list in the ``setup.py`` file.
* Also see the `network`_ and `family tree`_ for this repo. (If you find
anything that should be listed here, please add it and send a pull request!)
Fork This / Create Your Own
If you have differences in your preferred setup, I encourage you to fork this to create your own version. Or create your own; it doesn't strictly have to be a fork.
Once you have your own version working, add it to the Similar Cookiecutter Templates list above with a brief description.
It's up to you whether or not to rename your fork/own version. Do whatever you think sounds good.
Or Submit a Pull Request
I also accept pull requests on this, if they're small, atomic, and if they
make my own packaging experience better.
.. _Travis-CI: http://travis-ci.org/
.. _Tox: http://testrun.org/tox/
.. _Sphinx: http://sphinx-doc.org/
.. _ReadTheDocs: https://readthedocs.io/
.. _`pyup.io`: https://pyup.io/
.. _Bumpversion: https://github.com/peritus/bumpversion
.. _PyPi: https://pypi.python.org/pypi
.. _`Nekroze/cookiecutter-pypackage`: https://github.com/Nekroze/cookiecutter-pypackage
.. _`tony/cookiecutter-pypackage-pythonic`: https://github.com/tony/cookiecutter-pypackage-pythonic
.. _`ardydedase/cookiecutter-pypackage`: https://github.com/ardydedase/cookiecutter-pypackage
.. _github comparison view: https://github.com/tony/cookiecutter-pypackage-pythonic/compare/audreyr:master...master
.. _`network`: https://github.com/audreyr/cookiecutter-pypackage/network
.. _`family tree`: https://github.com/audreyr/cookiecutter-pypackage/network/members