This template focus following:
- Target Python version: 3.5 - 3.9
- Dependency tracking using Pipenv
- Linting provided by both pylint, flake8, mypy [executed by GitHub Actions]
- Formatting provided by isort, pipenv-setup, black [checked by GitHub Actions]
- Analizing complexity and maintainability provided by radon, xenon [checked by GitHub Actions]
- All development tasks (lint, format, analize, test, etc) excluding deployment wrapped up in a python CLI by invoke
Omit documentation workflows since this project targets early stages of development. In the early stages of development it is better to focus on providing working software and writing README.md than providing comprehensive documentation.
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/yukihiko-shinoda/cookiecutter-pypackage.git --checkout master-yukihiko-shinoda
Then, you will interactively prompt some choices of templated values, for detail of templated values, see the Prompts.
Then initialized project direcotry is created in current directory.
Points to review after creating initialized project directory¶
1. Review support range if the one of your package is not Python 3.5 - 3.9
- docs/CONTRIBUTING.md -> Get Started! -> 5. oldest Python version
Pin wheel version in Pipfle and execute
if you prefer stability of deployment task.
Remaining task after creating initialized project directory¶
Commit and push to GitHub repository.
Activate your created repository on Code Climate.
If you prefer, Enable [Pull request comments] and [Pull request status updates] from [Repo Settings] -> [GitHub]
Copy and paste badge from [Repo Settings] -> [Badges] to this README file.
Copy "TEST REPORTER ID" from [Test Coverages]
register copied TEST REPORTER ID into secret in your pushed GitHub repository as name "CC_TEST_REPORTER_ID".
Activate your created repository on pyup.io.
Create a new account at pyup.io or log into your existing account.
Click on the green
Add Repo button in the top left corner
and select repository you created in Step 1.
A popup will ask you whether you want to pin your dependencies.
Pin to add the repo.
Once your repo is set up correctly, the pyup.io badge will show your current update status.
Issue API token at PyPI and register into secret of your GitHub repository
v[0-9]+.[0-9]+.[0-9]+ and push to GitHub repository
to deploy into PyPI.
Then, get your code on! 😎
Add your package dependencies to your pipenv with