@@ -6,47 +6,44 @@ Python Project Blueprint
66
77Check the [ Makefile] ( ./Makefile ) for automation as the initial step, it defines all project commands.
88
9- Short summary of commands in a desired order of use.
9+ ### Make Commands
10+
11+ | Make Command | Description |
12+ | :----------------------| :----------------------------------------------------------------------------------------|
13+ | ` make venv ` | Creates a virtual environment in ` .venv ` . |
14+ | ` make lock ` | Generates ` requirements.txt ` from ` pyproject.toml ` using ` pip-compile ` . |
15+ | ` make upgrade ` | Updates all packages in ` requirements.txt ` to the latest allowed versions. |
16+ | ` make install ` | Syncs the environment with locked dependencies and installs the app in editable mode. |
17+ | ` make setup ` | Installs dependencies and sets up git hooks (runs ` install ` and ` pre-commit install ` ). |
18+ | ` make outdated ` | Checks for newer versions of dependencies using ` pip-check-updates ` . |
19+ | ` make pip-upgrade ` | Upgrades ` pip ` to its latest version. |
20+ | ` make lint ` | Checks code style using ` ruff ` without modifying files. |
21+ | ` make format ` | Automatically fixes code style issues using ` ruff ` . |
22+ | ` make security ` | Runs ` bandit ` to check for security vulnerabilities. |
23+ | ` make test ` | Runs unit and integration tests using ` pytest ` (also runs ` security ` ). |
24+ | ` make sbom ` | Generates a Software Bill of Materials (SBOM) in ` sbom.json ` . |
25+ | ` make audit ` | Generates a security audit report in ` audit.json ` . |
26+ | ` make build ` | Creates distribution files (Wheel & Tarball) in ` dist/ ` . |
27+ | ` make publish ` | Uploads artifacts to the repository using ` twine ` . |
28+ | ` make docker-up ` | Starts the application locally using ` docker-compose ` . |
29+ | ` make docker-down ` | Stops the application running via ` docker-compose ` . |
30+ | ` make docker-build ` | Builds the Docker image for the application. |
31+ | ` make aws-login ` | Authenticates Docker with AWS ECR. |
32+ | ` make docker-publish ` | Tags and pushes the Docker image to AWS ECR. |
33+ | ` make docs ` | Generates documentation from docstrings into the ` docs/ ` directory. |
34+ | ` make clean ` | Removes build artifacts, caches, and generated files. |
35+ | ` make all ` | Runs the full development cycle: ` lock ` , ` install ` , ` upgrade ` , ` lint ` , ` test ` , ` build ` . |
36+
37+ The ` make publish ` require
1038
1139``` shell
12- make venv # Create virtual environment (first step)
13-
14- make install # Install dependencies (second step)
15- make setup # Install dependencies and git hooks (runs install)
16-
17- mske lock # Lock dependencies
18- make upgrade # Upgrade dependencies
19- make outdated # Check for outdated dependencies
20-
21- make lint # Check the code style
22- make format # Fix style issues
23- make security # Check for security issues
24- make test # Run tests
25-
26- make sbom # Generate Software Bill of Materials - run it when dependencies change
27- make audit # Run vulnerability audit - not tracked by Git
28-
29- make build # Create distributable packages (artefacts)
30-
31- make docker-build # Build Docker image
32- make aws-login # Login to the ECR repository
33- make docker-publish # Run Docker container
34- make docker-up # Run the Docker container
35- make docker-down # Stop Docker container and clean up
36-
37- # Set repository access configurations
38- # Alternative configuration is provided in the notes section
3940export TWINE_USERNAME=your_ldap_user
4041export TWINE_PASSWORD=your_ldap_password
4142export TWINE_REPOSITORY_URL=" https://nexus.mycompany.com/repository/pypi-internal/"
42- make publish # Publish the artefacts
43-
44- make clean # Remove all generated files
45- make docs # Generate documentation - not tracked by Git
46-
47- make all # In development (lock install upgrade lint test build)
4843```
4944
45+ environment variables.
46+
5047## Usage
5148
5249Start the application
0 commit comments