A python cookiecutter application to create a new python project that uses poetry to manage its dependencies.
Project description
This is a cookiecutter repository to generate the file structure for a Python project that uses Poetry for its dependency management.
Features
- Poetry for dependency management
- CI/CD with GitHub Actions
- Pre-commit hooks with pre-commit
- Formatting with black and isort
- Linting with flake8
- Static type checking with mypy
- Dependency checking with deptry
- Publishing to Pypi or Artifactory by creating a new release on GitHub
- Testing with pytest
- Test coverage with codecov
- Documentation with MkDocs
- Compatibility testing for multiple versions of Python with Tox
- Containerization with Docker
Example CI/CD Pipeline
Quickstart
On your local machine, navigate to the directory in which you want to create a project directory, and run the following two commands:
pip install cookiecutter-poetry
ccp
Alternatively, install cookiecutter
and directly pass the URL to this
Github repository to the cookiecutter
command:
pip install cookiecutter
cookiecutter https://github.com/fpgmaas/cookiecutter-poetry.git
Create a repository on GitHub, and then run the following commands, replacing <project-name>
, with the name that you gave the Github repository and
<github_author_handle>
with your Github username.
cd <project_name>
git init -b main
git add .
git commit -m "Init commit"
git remote add origin git@github.com:<github_author_handle>/<project_name>.git
git push -u origin main
Finally, install the environment and the pre-commit hooks with
make install
You are now ready to start development on your project! The CI/CD pipeline will be triggered when you open a pull request, merge to main, or when you create a new release.
To finalize the set-up for publishing to PyPi or Artifactory, see here. For activating the automatic documentation with MkDocs, see here.
Acknowledgements
This project is partially based on Audrey Feldroy's's great cookiecutter-pypackage repository.
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-poetry-0.4a1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d47e5df06df25fabf21887656d0970b5ad3ce14b8882958378ad6215ff52349c |
|
MD5 | 6d018b882df6b5ac59e3e2fb97560e91 |
|
BLAKE2b-256 | 222691e48875d4a066906114119c6cfdd018cea216529e6cb513f667a416410e |
Hashes for cookiecutter_poetry-0.4a1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b300f9ccf68cf19ecc037af3740e5a863d7814d8a39c61c4260cc429fbbc002a |
|
MD5 | 46ae04c02c5ac2069e1de543bc4f8278 |
|
BLAKE2b-256 | d760a2276626d1b785c5a4f74ed6713bde8f1c6570899de815360ffbe3d8294e |