This repository contains two distinct projects, respectively, written in
In each case there are various technology-specific resources that you'll need to initialize in your development environment.
As a 1-person operation this project depends heavily on GitHub Actions to automate routine activities, so that hopefully, the source code is always well-documented and easy to read, and everything works perfectly. We automate the following in this project:
- Code linting checks, during both pre-commit as well as triggered on pushes to the main branch
- Unit tests for Python, React and Terraform
- Semantic releases
- version bumps from npm, PyPi and Terraform Registry
A typical pull request will look like the following:
This project uses pre-commit as a first-pass automated code review / QC process. pre-commit runs a multitude of utilities and checks for code formatting, linting, syntax checking, and ensuring that you don't accidentally push something to GitHub which you'd later regret. Broadly speaking, these checks are aimed at minimizing the extent of commits that contain various kinds of defects and stylistic imperfections that don't belong on the main branch of the project.
Note that many of the pre-commit commands are actually executed by Python which in turn is calling pip-installed packages listed in requirements.txt located in the root of the repo. It therefore is important that you first create the Python virtual environment using make init
. It also is a good idea to do a complete 'dry run' of pre-commit, to ensure that your developer environment is correctly setup:
git pull
make pre-commit
Output should look similar to the following:
The GitHub Actions automated processes depend on several credentials which are stored inside of Github Secrets. When creating pull requests, the GitHub Actions will use these secrets, github.com/FullStackWithLawrence/aws-rekognition/settings/secrets/actions, so there's nothing special for you to do.
On the other hand, if you've forked this repo and are working on your own independent project, then you'll need to initialize each of these yourself.
This project includes four distinct Python project, all located in api/terraform/python. They are located here because each of these projects is deployed to AWS Lambda, which in turn is being actively managed by Terraform.
Note that this project leverages Dependabot for managing version numbers of all Python packages that are used in this project, regardless of where and how. Versions should always be up to date at the moment that you clone the repo. It therefore should never be necessary for you to manually bump PyPi package version numbers.
git pull
make init
source venv/bin/activate
Please refer to this Terraform setup guide for detailed instructions.
Note that this project leverages Dependabot for managing version numbers of all Terraform modules that are used in this project. Versions should always be up to date at the moment that you clone the repo. It therefore should never be necessary for you to manually bump module version numbers.
git pull
cd terraform
terraform init
terraform plan
terraform apply