Yet another modern Python Package (pypi) with emphasis in CI/CD and automation
Project description
Features
Fresh Python Package Project Generation, “packaged” with a Test Suite and a CI Pipeline (see Quickstart)
Python Package Template (source code at src/cookiecutter_python/) implemented as a Cookiecutter
Tested on python versions 3.6, 2.7, 3.8, 3.9 and 3.10, for both “Linux” and “MacOS” platforms (see Test Workflow on CI)
You can check the Biskotaki Python Package Project, which was entirely generated using this Python Package Template:
Generated Python Package Features
Test Suite using pytest
Parallel Execution of Unit Tests, on multiple cpu’s
Automation, using tox
Code Coverage measuring
Build Command, using the build python package
Pypi Deploy Command, supporting upload to both pypi.org and test.pypi.org servers
Type Check Command, using mypy
CI Pipeline, running on Github Actions
Job Matrix, spanning different platform’s and python version’s
Platforms: ubuntu-latest, macos-latest
Python Interpreters: 3.6, 3.7, 3.8, 3.9, 3.10
Parallel Job execution, generated from the matrix, that runs the Test Suite
Quickstart
Prerequisites
You need to have Cookiecutter installed. Check the Cookiecutter documentation pages for more on Cookiecutter.
Usage
Open a console/terminal and run:
git clone git@github.com:boromir674/cookiecutter-python-package.git cookiecutter cookiecutter-python-package/src/cookiecutter_python
Now, you should have generated a new Project for a Python Package, based on the Template!
Just ‘enter’ (cd into) the newly created directory, ie cd <my-great-python-package>.
Try Running the Test Suite!
tox
Read the Documentation’s Use Cases section for more on how to leverage your generated Python Package features.
License
Free software: Affero GNU General Public License v3.0
Notes
Currently, since the actual cookiecutter template does not reside on the root directory of the repository (but rather in src/cookiecutter_python), ‘cloning’ the repository locally is required at first.
This was demonstrated in the Quickstart section, as well.
For more complex use cases, you can modify the Template and also leverage all of cookiecutter’s features, according to your needs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cookiecutter_python-0.8.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff04dde19ee0f14486bb863c42891529ef8ae892c65e818245356da4ab5e638b |
|
MD5 | 8635b5ec6e43284ffa06f33ac40a4eef |
|
BLAKE2b-256 | dc213a9c5e27801b5325af337249e718feaca3856b764c3eda9c172013c11497 |
Hashes for cookiecutter_python-0.8.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70b8a7e0e6f778dea34736a3e692c8ab69ae95002eee7153dcb9b8654671fd59 |
|
MD5 | 0b1e3688ec32768bdd3c4a7e50ea854e |
|
BLAKE2b-256 | 7109fa91591b0ead2fc7ebffcec963c66e4b5ca02a9cf53d419747e35f46aebd |