Skip to content

Python cookiecutter project for aws cdk projects

Notifications You must be signed in to change notification settings

ta2fb/pyex_cdk_cc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pyex_cdk_cc

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.

Cookiecutter initial instructions

Assumptions

  • Git repository is hosted on GitHub
  • PyPI repository is hosted on AWS CodeArtifact

Instructions for using this cookiecutter

  1. Download and install Anaconda or Miniconda
  2. Create a new conda environment and activate it
conda create --name pyex_cdk_cc python={{cookiecutter.python_version}}
conda activate pyex_cdk_cc
  1. Install cookiecutter
pip install cookiecutter
  1. 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
  1. Create git repository on GitHub
  2. Change to project directory and initialize git
cd {{cookiecutter.project_name}}
git init
  1. 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

  1. Deactivate pyex_cdk_cc conda environment
conda deactivate
  1. Continue with the steps in the Development section within the new project created

Cookiecutter packages and purposes

  • 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

About

Python cookiecutter project for aws cdk projects

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published