Skip to content

Commit

Permalink
docs: add secrets setup instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
lpm0073 committed Nov 19, 2023
1 parent 4fc1a64 commit 2574009
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions DEVELOPER_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,23 @@ This repository contains three distinct projects, respectively, written in

In each case there are various technology-specific resources that you'll need to initialize in your development environment.

## Basic repo setup
## Repository Setup

### GitHub Actions

As a 1-person operation this project depends heavily on automation, 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 Version releases
- minor version bumps from npm, PyPi and Terraform Registry

### pre-commit setup

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 api-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:

### pre-commit Quickstart

```console
git pull
make api-init
Expand All @@ -27,12 +36,14 @@ Output should look similar to the following:

![pre-commit output](./doc/pre-commit.png)

### Github Secrets
### Github Secrets setup

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-openai/settings/secrets/actions](https://github.com/FullStackWithLawrence/aws-openai/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.

![Github Secrets](./doc/github-secrets.png)

## Python Setup

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.
Expand Down
Binary file added doc/github-secrets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2574009

Please sign in to comment.