@@ -22,16 +22,20 @@ help: # Preview Makefile commands
2222# Python environment and dependency commands
2323# #############################################
2424
25- install : .venv .git/hooks/pre-commit # Install Python dependencies and create virtual environment if not exists
25+ install : .venv .git/hooks/pre-commit # Install Python dependencies and create virtual environment if needed
2626 uv sync --dev
2727
2828.venv : # Creates virtual environment if not found
2929 @echo " Creating virtual environment at .venv..."
3030 uv venv .venv
3131
32- .git/hooks/pre-commit : # Sets up pre-commit hook if not setup
33- @echo " Installing pre-commit hooks..."
34- uv run pre-commit install
32+ .git/hooks/pre-commit : # Sets up pre-commit commit hooks if not setup
33+ @echo " Installing pre-commit commit hooks..."
34+ uv run pre-commit install --hook-type pre-commit
35+
36+ .git/hooks/pre-push : # Sets up pre-commit push hooks if not setup
37+ @echo " Installing pre-commit push hooks..."
38+ uv run pre-commit install --hook-type pre-push
3539
3640venv : .venv # Create the Python virtual environment
3741
@@ -52,42 +56,25 @@ coveralls: test # Write coverage data to an LCOV report
5256 uv run coverage lcov -o ./coverage/lcov.info
5357
5458# ###################################
55- # Code quality and safety commands
59+ # Code linting and formatting
5660# ###################################
5761
58- lint : black mypy ruff safety # Run linters
59-
60- black : # Run 'black' linter and print a preview of suggested changes
61- uv run black --check --diff .
62-
63- mypy : # Run 'mypy' linter
62+ lint : # Run linting, alerts only, no code changes
63+ uv run ruff format --diff
6464 uv run mypy .
65-
66- ruff : # Run 'ruff' linter and print a preview of errors
6765 uv run ruff check .
6866
69- safety : # Check for security vulnerabilities and verify Pipfile.lock is up-to-date
70- uv run pip-audit
71-
72- lint-apply : black-apply ruff-apply # Apply changes with 'black' and resolve 'fixable errors' with 'ruff'
73-
74- black-apply : # Apply changes with 'black'
75- uv run black .
76-
77- ruff-apply : # Resolve 'fixable errors' with 'ruff'
67+ lint-fix : # Run linting, auto fix behaviors where supported
68+ uv run ruff format .
7869 uv run ruff check --fix .
7970
80- # ###################################
81- # MinIO local S3 commands
82- # ###################################
83-
84- start-minio-server :
85- docker compose --env-file .env -f $(MINIO_COMPOSE_FILE ) up -d
71+ security : # Run security / vulnerability checks
72+ uv run pip-audit
8673
87- stop-minio-server :
88- docker compose --env-file .env -f $(MINIO_COMPOSE_FILE ) stop
8974
90- # ## Terraform-generated Developer Deploy Commands for Dev environment ###
75+ # ##############################################
76+ # Docker image, ECR, and Lambda Management
77+ # ##############################################
9178check-arch :
9279 @ARCH_FILE=" .aws-architecture" ; \
9380 if [[ " $( CPU_ARCH) " != " linux/amd64" && " $( CPU_ARCH) " != " linux/arm64" ]]; then \
@@ -99,19 +86,18 @@ check-arch:
9986 echo " latest" > .arch_tag; \
10087 fi
10188
102- dist-dev : check-arch # # Build docker container (intended for developer-based manual build)
89+ dist-dev : check-arch # Build docker container (intended for developer-based manual build)
10390 @ARCH_TAG=$$(cat .arch_tag ) ; \
10491 docker buildx inspect $(ECR_NAME_DEV ) > /dev/null 2>&1 || docker buildx create --name $(ECR_NAME_DEV ) --use; \
10592 docker buildx use $(ECR_NAME_DEV ) ; \
10693 docker buildx build --platform $(CPU_ARCH ) \
107- --load \
108- --tag $(ECR_URL_DEV ) :$$ ARCH_TAG \
109- --tag $(ECR_URL_DEV ) :make-$$ ARCH_TAG \
110- --tag $(ECR_URL_DEV ) :make-$(shell git describe --always) \
111- --tag $(ECR_NAME_DEV ) :$$ ARCH_TAG \
112- .
113-
114- publish-dev : dist-dev # # Build, tag and push (intended for developer-based manual publish)
94+ --load \
95+ --tag $(ECR_URL_DEV ) :$$ ARCH_TAG \
96+ --tag $(ECR_URL_DEV ) :make-$$ ARCH_TAG \
97+ --tag $(ECR_URL_DEV ) :make-$(shell git describe --always) \
98+ --tag $(ECR_NAME_DEV ) :$$ ARCH_TAG \
99+
100+ publish-dev : dist-dev # Build, tag and push (intended for developer-based manual publish)
115101 @ARCH_TAG=$$(cat .arch_tag ) ; \
116102 aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin $(ECR_URL_DEV ) ; \
117103 docker push $(ECR_URL_DEV ) :$$ ARCH_TAG; \
@@ -120,15 +106,7 @@ publish-dev: dist-dev ## Build, tag and push (intended for developer-based manua
120106 echo " Cleaning up dangling Docker images..." ; \
121107 docker image prune -f --filter " dangling=true"
122108
123- # ## If this is a Lambda repo, uncomment the two lines below ###
124- # update-lambda-dev: ## Updates the lambda with whatever is the most recent image in the ecr (intended for developer-based manual update)
125- # @ARCH_TAG=$$(cat .arch_tag); \
126- # aws lambda update-function-code \
127- # --region us-east-1 \
128- # --function-name $(FUNCTION_DEV) \
129- # --image-uri $(ECR_URL_DEV):make-$$ARCH_TAG
130-
131- docker-clean : # # Clean up Docker detritus
109+ docker-clean : # Clean up Docker detritus
132110 @ARCH_TAG=$$(cat .arch_tag ) ; \
133111 echo " Cleaning up Docker leftovers (containers, images, builders)" ; \
134112 docker rmi -f $(ECR_URL_DEV ) :$$ ARCH_TAG; \
@@ -137,3 +115,13 @@ docker-clean: ## Clean up Docker detritus
137115 docker rmi -f $(ECR_NAME_DEV ) :$$ ARCH_TAG || true ; \
138116 docker buildx rm $(ECR_NAME_DEV ) || true
139117 @rm -rf .arch_tag
118+
119+ # ###################################
120+ # MinIO local S3 commands
121+ # ###################################
122+
123+ start-minio-server :
124+ docker compose --env-file .env -f $(MINIO_COMPOSE_FILE ) up -d
125+
126+ stop-minio-server :
127+ docker compose --env-file .env -f $(MINIO_COMPOSE_FILE ) stop
0 commit comments