This is an example repository where some practices of the Continuous Delivery Course are demonstrated.
The following programming languages and tools are used in this repository:
- Programming and Scripting Language: Python, Bash
- Web Framework: FastAPI, Flask
- Web Server: Uvicorn, gevent
- Documentation: SphinX, reStructuredText, Swagger
- Build System and Monorepo Tool: Pants
- Packaging, Dependency Management, and Pinning: Pex
- Unit and Acceptance Testing: Pytest, Pytest-BDD
- Static Analysis and Formatter: Flake8, isort, Mypy, Autoflake, ShellCheck, Shfmt, Hadolint
- Virtualization and Container Orchestration: Docker, Docker Compose
- Pipeline: GitHub Actions
You can perform common tasks on the repository as follows:
Command | Description |
---|---|
pants lint :: |
Run all the linters on all the files. |
pants check :: |
Run all the checkers (e.g. Mypy) on all the files. |
pants package :: |
Build and generate packages (e.g. Pex, Docker image, etc.) and place the results in the dist/ directory. |
pants run docs/build.py |
Build the documents and place the results in the dist/ directory. |
pants run docs/build.py -- --auto |
Build the documents and start a live reload server. |
pants test tests/unit |
Run the unit tests. |
pants test tests/acceptance |
Run the acceptance tests. |
pants generate-lockfiles :: |
Generate lockfiles for the thirdparty requirements. |
pants run src/fitzy/analyzer/api:pex_binary |
Run the Analyzer RestAPI service. |
pants run src/fitzy/analyzer/api:docker_image |
Run the Analyzer RestAPI service using the Docker container. |
pants run src/fitzy/portal:pex_binary |
Run the Portal web application. |
pants run src/fitzy/portal:docker_image |
Run the Portal web apllication using the Docker container. |
docker compose up |
Start the application using the packaged Docker images. |
docker compose down |
Shut-down the started application. |
pants run deploy.py |
Deploy and start the application on the specified server. |
You can see the published docs here.