Hi there!
I'm an amateur Python developer, and I love tyrannosaurus
,
and equally love cookiecutter-hypermodern-python
.
However, in my extended use of both, I noticed some shortcomings that I wanted to address.
tyrannosaurus
uses its own templating engine, but it unfortunately is very buggy and most of its exclusive features (like sync) are poorly implemented. I wanted to usecookiecutter
's templating engine, which is much more robust and well-maintained.tyrannosaurus
tries too hard to make testing into a monolith, which yields unintelligible test results. Even though I prefer tox over nox, I still chose to takecookiecutter-hypermodern-python
's approach of using nox, because it's much more flexible and easier to use.tyrannosaurus
never seems to update its dependencies, and it's stuck on Python 3.8. I wanted to use Python 3.11 exclusively to make use of the increased performance and syntax features, and I wanted to use the latest versions of all the dependencies.tyrannosaurus
has a lot of boilerplate code pre-included, mainly for capturing test data and retrieving assets. While this is a good idea. It doesn't help that half of it is wrong and fails its own type checks. 🙃 The boilerplate I chose to implement in my template is a lot lighter and only supplies things that EVERY project uses.cookiecutter-hypermodern-python
is a great template, but it lacks the tooling for containerization and deployment with Docker liketyrannosaurus
has. I wanted to add that to this template.cookiecutter-hypermodern-python
also favors lower-level libraries like click over higher-level libraries like typer. I wanted to use typer, because it's a great library that makes it easy to build CLI applications.
For all of these reasons, I decided to fork cookiecutter-hypermodern-python
and make my own template, cookiecutter-neopy
. I hope you enjoy it!
- Convert to Python 3.11
- Update dependencies
- Add settings.yml for GitHub Probot
- Add
typer
- Add Dockerfile
- Add docker-compose.yml
- Add GitHub Actions for publishing Docker image
- Write typer boilerplate & tests
- Write asset & metadata boilerplate & tests
All testing was done on cookiecutter 2.3.0 and Python 3.11.4.
cookiecutter gh:regulad/cookiecutter-neopy --checkout=2023.8.4
The following segment of the README is the original README from cookiecutter-hypermodern-python
.
Cookiecutter template for a Python package based on the Hypermodern Python article series.
✨📚✨ Read the full documentation
cookiecutter gh:cjolowicz/cookiecutter-hypermodern-python --checkout=2022.8.23
Special branches in the frameworks
folder are available for some Python frameworks like FastAPI, Discord.py, and more. Check GitHub to see if there's a branch for your framework of choice.
These special templates also carry the opinionated nature of the base template, so you can expect the same quality of code and documentation.
cookiecutter gh:cjolowicz/cookiecutter-hypermodern-python --checkout=frameworks/fastapi
- Packaging and dependency management with Poetry
- Test automation with Nox
- Linting with pre-commit and Flake8
- Continuous integration with GitHub Actions
- Documentation with Sphinx, MyST, and Read the Docs using the furo theme
- Automated uploads to PyPI and TestPyPI
- Automated release notes with Release Drafter
- Automated dependency updates with Dependabot
- Code formatting with Black and Prettier
- Import sorting with isort
- Testing with pytest
- Code coverage with Coverage.py
- Coverage reporting with Codecov
- Command-line interface with Click
- Static type-checking with mypy
- Runtime type-checking with Typeguard
- Automated Python syntax upgrades with pyupgrade
- Security audit with Bandit and Safety
- Check documentation examples with xdoctest
- Generate API documentation with autodoc and napoleon
- Generate command-line reference with sphinx-click
- Manage project labels with GitHub Labeler
The template supports Python 3.7, 3.8, 3.9, and 3.10.