This project is based on tools discussed in the book Serious Python: Black-Belt Advice on Deployment, Scalability, Testing, and More by Julian Danjou
This project is also based on the aws cdk template for python adapted to pyex_cc
This project has been updated for cdk 2.x. See branch cdk1.x for cdk 1.x.
Assumptions
- Git repository is hosted on GitHub
- PyPI repository is hosted on AWS CodeArtifact
Instructions for using this cookiecutter
- Download and install Anaconda or Miniconda
- Create a new conda environment and activate it
conda create --name pyex_cdk_cc python={{cookiecutter.python_version}}
conda activate pyex_cdk_cc
- Install cookiecutter
pip install cookiecutter
- Create new project with pyex_cdk_cc
# for ssh credentials
cookiecutter git@github.com:ta2fb/pyex_cdk_cc.git
# for https credentials
cookiecutter https://github.com/ta2fb/pyex_cdk_cc
- Create git repository on GitHub
- Change to project directory and initialize git
cd {{cookiecutter.project_name}}
git init
- Set remote origin to GitHub git repository url
# for ssh credentials
git remote add origin git@github.com:{{cookiecutter.github_org}}/{{cookiecutter.project_name}}.git
# for https credentials
git remote add origin https://github.com/{{cookiecutter.github_org}}/{{cookiecutter.project_name}}.git
Note
You may need to change the region in the above urls
- Deactivate pyex_cdk_cc conda environment
conda deactivate
- Continue with the steps in the Development section within the new project created
- codeartifact-release (https://github.com/ta2fb/codeartifact_release)
- Cuts releases and pushes artifacts to AWS CodeArtifact
- pbr
- Part of setuptools configuration
- Automatic generation of Sphinx documentation
- Automatic generation of AUTHORS and ChangeLog files based on git history
- Automatic creation of file lists for git
- Version management based on git tags using semantic versioning
- pytest
- Unit testing
- pytest-cov
- Code coverage
- pytest-xdist (not implemented yet)
- Run tests on multiple CPUs (pytest -n NUM)
- sphinx
- Code documentation
- Themes to choose from: https://sphinx-themes.org/
- After building documentation can be viewed in your browser at
- file:///path/to/{cookiecutter.project_name}}/build/sphinx/html/index.html
- setuptools
- Project configuration
- tox
- Automate and standardize testing and building of the project
- Builds clean environments for proper testing of code
- tox-conda
- Plugin that forces tox to use conda environments instead of virtualenvs