Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
python-codebase/Makefile at development · IDTS-LAB/python-codebase · GitHub
Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
IDTS-LAB
python-codebase
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
development
Breadcrumbs
python-codebase
/
Makefile
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
107 lines (86 loc) · 3.53 KB
development
Breadcrumbs
python-codebase
/
Makefile
Copy path
Top
File metadata and controls
Code
Blame
107 lines (86 loc) · 3.53 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
SHELL
:= /bin/bash
PYTHON
:= .venv/bin/python
PYTEST
:= .venv/bin/pytest
RUFF
:= .venv/bin/ruff
IMPORT_LINTER
:= .venv/bin/lint-imports
UVICORN
:= .venv/bin/uvicorn
ALEMBIC
:= .venv/bin/alembic
POETRY
:= poetry
COMPOSE_FILE
:= docker-compose.yml
.DEFAULT_GOAL
:= help
.PHONY
: help install run test lint lint-imports import-check security-scan sbom check migrate seed downgrade revision db-up db-down db-logs clean
help
:
@echo
"
[make:help] Available commands:
"
@echo
"
[make:install] Install project dependencies with Poetry
"
@echo
"
[make:run] Run the FastAPI development server
"
@echo
"
[make:test] Run pytest
"
@echo
"
[make:lint] Run Ruff checks
"
@echo
"
[make:lint-imports] Enforce import boundary contracts
"
@echo
"
[make:import-check] Verify src.main imports
"
@echo
"
[make:security-scan] Run dependency vulnerability scan with pip-audit
"
@echo
"
[make:sbom] Generate CycloneDX SBOM for the project
"
@echo
"
[make:check] Run tests, lint, and import check
"
@echo
"
[make:migrate] Apply Alembic migrations
"
@echo
"
[make:seed] Seed baseline database records
"
@echo
"
[make:downgrade] Roll back one Alembic migration
"
@echo
"
[make:revision] Create an Alembic migration: make revision name=
\"
describe change
\"
"
@echo
"
[make:db-up] Start Docker Compose services
"
@echo
"
[make:db-down] Stop Docker Compose services
"
@echo
"
[make:db-logs] Follow Docker Compose logs
"
@echo
"
[make:clean] Remove local Python cache files
"
install
:
@echo
"
[make:install] Installing dependencies with Poetry
"
@
$(
POETRY
)
install
run
:
@echo
"
[make:run] Starting FastAPI development server on http://localhost:8000
"
@
$(
UVICORN
)
src.main:app --reload --host 0.0.0.0 --port 8000
test
:
@echo
"
[make:test] Running pytest
"
@
$(
PYTEST
)
-q
lint
:
@echo
"
[make:lint] Running Ruff checks
"
@
$(
RUFF
)
check src tests scripts
lint-imports
:
@echo
"
[make:lint-imports] Enforcing import boundary contracts
"
@
$(
IMPORT_LINTER
)
import-check
:
@echo
"
[make:import-check] Verifying src.main imports
"
@PYTHONDONTWRITEBYTECODE=1
$(
PYTHON
)
-c
"
import src.main; print('import ok')
"
security-scan
:
@echo
"
[make:security-scan] Running dependency vulnerability scan
"
@PIP_CACHE_DIR=.cache/pip
$(
POETRY
)
run pip-audit --cache-dir .cache/pip-audit
sbom
:
@echo
"
[make:sbom] Generating CycloneDX SBOM
"
@
$(
POETRY
)
run cyclonedx-py
check
: test lint lint-imports import-check
@echo
"
[make:check] All checks completed
"
migrate
:
@echo
"
[make:migrate] Applying Alembic migrations
"
@
$(
ALEMBIC
)
upgrade head
seed
:
@echo
"
[make:seed] Running database seeders
"
@
$(
PYTHON
)
scripts/seed.py
downgrade
:
@echo
"
[make:downgrade] Rolling back one Alembic migration
"
@
$(
ALEMBIC
)
downgrade -1
revision
:
@if [
-z
"
$(
name
)
"
]
;
then
\
echo
"
[make:revision] Usage: make revision name=
\"
describe change
\"
"
;
\
exit
1
;
\
fi
@echo
"
[make:revision] Creating Alembic migration:
$(
name
)
"
@
$(
ALEMBIC
)
revision --autogenerate -m
"
$(
name
)
"
db-up
:
@echo
"
[make:db-up] Starting Docker Compose services
"
@docker compose -f
$(
COMPOSE_FILE
)
up -d
db-down
:
@echo
"
[make:db-down] Stopping Docker Compose services
"
@docker compose -f
$(
COMPOSE_FILE
)
down
db-logs
:
@echo
"
[make:db-logs] Following Docker Compose logs
"
@docker compose -f
$(
COMPOSE_FILE
)
logs -f
clean
:
@echo
"
[make:clean] Removing local Python cache files
"
@find
.
-type d -name
"
__pycache__
"
-prune -exec rm -rf {} +
@find
.
-type d -name
"
.pytest_cache
"
-prune -exec rm -rf {} +
@find
.
-type d -name
"
.ruff_cache
"
-prune -exec rm -rf {} +
You can’t perform that action at this time.