diff --git a/.dockerignore b/.dockerignore
index 1afb66fa..f1e53452 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -1,33 +1,56 @@
-*.env
-git/
+# Git
+.git
+.github
+.gitignore
-build
-dist
+# Python
+.venv
+venv
+__pycache__
+*.pyc
+*.pyo
+*.pyd
+.Python
+*.so
+*.egg
*.egg-info
-*.egg/
+dist
+build
+.pytest_cache
+.coverage
+htmlcov
+.tox
+.mypy_cache
+.ruff_cache
+
+# Environment files
+.env
+.env.*
+!.env.example
+
+# IDE
+.vscode
+.idea
*.swp
+*.swo
+*~
-.tox
-.coverage
-html/*
-**/__pycache__
-**/*.pyc
-
-# Development files - should not be in production
-.dev/
-src/.dev/
-src/.dev
-**/.dev/
-**/.dev
-*.sqlite3
-*.db
-db.sqlite3
-src/db.sqlite3
-**/db.sqlite3
-
-# Test artifacts
-.pytest_cache/
-src/.pytest_cache/
-**/.pytest_cache/
-.coverage
-htmlcov/
\ No newline at end of file
+# Logs
+*.log
+
+# Documentation
+*.md
+!README.md
+docs/
+
+# Testing
+tests/
+*.test
+
+# macOS
+.DS_Store
+
+# Temporary files
+tmp/
+temp/
+*.tmp
diff --git a/.github/SETUP.md b/.github/SETUP.md
index 24b25262..c8830530 100644
--- a/.github/SETUP.md
+++ b/.github/SETUP.md
@@ -39,18 +39,18 @@ After adding the secret, the workflow will automatically:
- Authenticate to AWS using OIDC (no credentials stored)
- Build Docker images for ARM64 platform
- Push to ECR with appropriate tags:
- - `:staging` for non-master branches
- - `:prod` for master branch (after CI passes)
+ - `:staging` for non-main branches
+ - `:prod` for main branch (after CI passes)
## Testing
To test the setup:
-1. **Test staging build**: Push to any branch except `master`
+1. **Test staging build**: Push to any branch except `main`
- Should trigger Docker build and push to `:staging` tag
- Check ECR repository to verify image was pushed
-2. **Test production build**: Merge to `master` branch
+2. **Test production build**: Merge to `main` branch
- Should run lint, test, security checks first
- If all pass, should build and push to `:prod` tag
- Check ECR repository to verify image was pushed
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 9c13f970..e8efec6b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -2,9 +2,9 @@ name: CI
on:
push:
- branches: [master]
+ branches: [main]
pull_request:
- branches: [master]
+ branches: [main]
env:
POETRY_VERSION: "2.3.0"
@@ -14,8 +14,8 @@ jobs:
lint:
name: Lint
runs-on: ubuntu-latest
- # Only run on master branch pushes and PRs to master
- if: github.event_name == 'pull_request' || github.ref == 'refs/heads/master'
+ # Only run on main branch pushes and PRs to main
+ if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
steps:
- name: Checkout code
uses: actions/checkout@v4
@@ -62,8 +62,8 @@ jobs:
test:
name: Test
runs-on: ubuntu-latest
- # Only run on master branch pushes and PRs to master
- if: github.event_name == 'pull_request' || github.ref == 'refs/heads/master'
+ # Only run on main branch pushes and PRs to main
+ if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
steps:
- name: Checkout code
uses: actions/checkout@v4
@@ -125,8 +125,8 @@ jobs:
security:
name: Security Scan
runs-on: ubuntu-latest
- # Only run on master branch pushes and PRs to master
- if: github.event_name == 'pull_request' || github.ref == 'refs/heads/master'
+ # Only run on main branch pushes and PRs to main
+ if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
steps:
- name: Checkout code
uses: actions/checkout@v4
@@ -172,10 +172,10 @@ jobs:
docker-build-push:
name: Build and Push Docker Image
- runs-on: ubuntu-latest
- # Run on push to master (build+push) and on PRs (build only)
+ runs-on: ubuntu-24.04-arm
+ # Run on push to main (build+push) and on PRs (build only)
if: github.event_name == 'push' || github.event_name == 'pull_request'
- # For master/PR, wait for CI checks to pass
+ # For main/PR, wait for CI checks to pass
needs: [ci-success]
permissions:
id-token: write # Required for OIDC authentication
@@ -232,7 +232,7 @@ jobs:
- name: Determine Docker tag
id: docker-tag
run: |
- if [ "${{ github.ref }}" == "refs/heads/master" ]; then
+ if [ "${{ github.ref }}" == "refs/heads/main" ]; then
echo "image=633607774026.dkr.ecr.us-east-2.amazonaws.com/back-end:prod" >> $GITHUB_OUTPUT
echo "environment=Production" >> $GITHUB_OUTPUT
else
@@ -260,7 +260,7 @@ jobs:
uses: aws-actions/amazon-ecr-login@v2
- name: Build and push Docker image
- uses: docker/build-push-action@v5
+ uses: docker/build-push-action@v6
with:
context: .
target: runtime
@@ -269,8 +269,8 @@ jobs:
tags: |
${{ steps.docker-tag.outputs.image }}
provenance: false
- cache-from: type=gha
- cache-to: type=gha,mode=max
+ cache-from: type=gha,scope=arm64
+ cache-to: type=gha,mode=max,scope=arm64
- name: Output image URI
if: steps.can-push.outputs.push == 'true'
@@ -286,12 +286,12 @@ jobs:
# Always run to satisfy docker-build-push dependency
if: always()
steps:
- - name: Check all jobs passed (master/PR only)
- if: github.event_name == 'pull_request' || github.ref == 'refs/heads/master'
+ - name: Check all jobs passed (main/PR only)
+ if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
run: |
- # Check if jobs were skipped (non-master) or failed
+ # Check if jobs were skipped (non-main) or failed
if [[ "${{ needs.lint.result }}" == "skipped" ]]; then
- echo "Lint job was skipped - this should not happen on master/PR"
+ echo "Lint job was skipped - this should not happen on main/PR"
exit 1
fi
if [[ "${{ needs.lint.result }}" != "success" ]]; then
@@ -299,7 +299,7 @@ jobs:
exit 1
fi
if [[ "${{ needs.test.result }}" == "skipped" ]]; then
- echo "Test job was skipped - this should not happen on master/PR"
+ echo "Test job was skipped - this should not happen on main/PR"
exit 1
fi
if [[ "${{ needs.test.result }}" != "success" ]]; then
@@ -308,7 +308,7 @@ jobs:
fi
# Security is informational, doesn't fail CI
echo "All required jobs passed!"
- - name: Pass through for non-master branches
- if: github.event_name != 'pull_request' && github.ref != 'refs/heads/master'
+ - name: Pass through for non-main branches
+ if: github.event_name != 'pull_request' && github.ref != 'refs/heads/main'
run: |
- echo "Skipping CI checks for non-master branch (staging build will proceed)"
+ echo "Skipping CI checks for non-main branch (staging build will proceed)"
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 3b2da3d2..b86de683 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -172,7 +172,7 @@ High level overview of upcoming Operation Code goals. This is the source of upc
## Working On Your Issue
-* Please first **read** Operation Code's [guidelines for working an issue](https://github.com/OperationCode/operationcode/blob/master/CONTRIBUTING.md#guidelines-for-working-an-issue)
+* Please first **read** Operation Code's [guidelines for working an issue](https://github.com/OperationCode/operationcode/blob/main/CONTRIBUTING.md#guidelines-for-working-an-issue)
* From the forked and cloned repository on your environment, you can now create a [feature branch](http://nvie.com/posts/a-successful-git-branching-model/). It is a good idea to name your branch after the issue it is attached to.
@@ -188,10 +188,10 @@ git branch
* Once you have finished your work, head over to **Operation Code**'s main GitHub page, and make a pull request. More information about pull requests can be found in the next section.
-* To return to your main `master` branch, type the following in the terminal:
+* To return to your main `main` branch, type the following in the terminal:
```bash
-git checkout master
+git checkout main
```
@@ -202,10 +202,10 @@ git checkout master