This repository aims to implement a few opinions and standards to aid the development of a python project.
Some things you get right out-of-the-box 📦
- Python Package and Dependency Management with Poetry
- Code Formatting and Linting with flake8 and black
- Testing with nox
- Package Versioning and Publishing with AWS CodeArtifact
- Support for VSCode Remote Container Development Environment
For an easier developer experience checkout the VSCode Remote Container section below
As mentioned for development we use Poetry.
To get started with this here are is a list of useful commands to get started with.
# NOTE: Poetry abstracts away the management of our virtual environments
# Install the dependencies
poetry install
# Run the main entry point of the program
poetry run main
# Run the code formatter
poetry run nox -s black
# Run the code linter
poetry run nox -s lint
# Run the tests
poetry run nox -s test
Note you don't have to use VSCode Remote Containers, you can instead use the Docker image directly
If you've never heard of VSCode Remote Container before they're great and worth checking out!
The general gist is that VSCode allows you to open up a VSCode workspace within a Docker container. This makes it super simple for new developers to get started. Developers are able to provide a Docker image with all of the dependencies and configurations already setup and installed.
For example in our use case for this project the Dockerfile image provided installs a few different versions of Python (for matrix testing capabilities), Poetry and nox.