This is a package template provided by the PlanetaryPy project.
Using this template, packages can make use of the setup, installation,
and documentation infrastructure developed for the planetarypy
core and affiliated packages.
- GitHub repo: https://github.com/planetarypy/package-template/
- Free software: BSD license
- Testing setup with
unittest
andpython setup.py test
orpytest
- Travis-CI: Ready for Travis Continuous Integration testing
- Tox testing: Setup to easily test for Python 3.5, 3.6, 3.7, 3.8
- Sphinx docs: Documentation ready for generation with, for example, ReadTheDocs
- bump2version: Pre-configured version bumping with a single command
- Auto-release to PyPI when you push a new tag to master (optional)
- Command line interface using Click (optional)
This package template makes use of the cookiecutter package to make it easier to get started with the package template. You will need to install cookiecutter which can be done easily using conda or pip.
Install the latest Cookiecutter if you haven't installed it yet (this requires Cookiecutter 1.4.0 or higher) via conda:
conda install -c conda-forge cookiecutter
... or via pip:
pip install -U cookiecutter
Generate a Python package project:
cookiecutter gh:planetarypy/package-template
This will ask you a series of questions to configure your package, unless you downloaded the cookiecutter.json file in this repo, and modified it for your use, in which case you can:
cookiecutter --config-file my_project.json gh:planetarypy/package-template
Then:
- Create a repo and put it there.
- Add the repo to your Travis-CI account.
- Install the dev requirements into a virtualenv. (
pip install -r requirements_dev.txt
) - Register your project with PyPI.
- Run the Travis CLI command travis encrypt --add deploy.password to encrypt your PyPI password in Travis config and activate automated deployment on PyPI when you push a new tag to master branch.
- Add the repo to your ReadTheDocs account + turn on the ReadTheDocs service hook.
- Release your package by pushing a new tag to master.
- Add a 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.
- Activate your project on pyup.io.
For more details, see the cookiecutter-pypackage tutorial.