Bake Forecast CI/CD
Overview
This repository contains a Python project that predicts the number of cookies to bake based on historical sales data. It also implements DevOps best practices including CI/CD, linting, type checking, security checks, testing, and package publishing.
Features
- Predicts daily cookie bake quantities from CSV data.
- Built-in logging to track processing steps and potential issues.
- Fully typed Python code.
- Includes automated testing and validation.
- Implements CI/CD pipelines with GitHub Actions.
- Linting with
ruffand formatting withblack. - Build automation for Python packages.
- Optional publishing to TestPyPI or PyPI on release.
CI/CD
- The project includes GitHub Actions workflows to:
- Run tests on every push and pull request.
- Check code formatting, types, and security.
- Build Python distributions automatically.
- Optionally publish packages on release.
Usage Example
Install the package from PyPI and try it with prepared .csv file in this repo:
pip install bake-forecast-cicd
get_average_bakes sold_items_1.csv
## Example Output (Verbose Mode)
[2025-11-30 15:17:29] DEBUG bake_forecast.cli: Verbose logging enabled. [2025-11-30 15:17:29] DEBUG bake_forecast.cli: Received verbose flag: True [2025-11-30 15:17:29] DEBUG bake_forecast.cli: Received file path: sold_items_1.csv [2025-11-30 15:17:29] INFO bake_forecast.cli: Starting processing file 'sold_items_1.csv' [2025-11-30 15:17:29] INFO bake_forecast: Processed 21 rows.
--RESULT-- [2025-11-30 15:17:29] DEBUG bake_forecast.cli: Process finished with success. [2025-11-30 15:17:29] INFO bake_forecast.cli: Recommended number of cookies to bake today is: 67.3
## Example Output (Verbose Mode)
$ get_average_bakes nonexistent.csv -v [2025-11-30 15:20:01] DEBUG bake_forecast.cli: Verbose logging enabled. [2025-11-30 15:20:01] WARNING bake_forecast.cli: File not found error. Double check file path.
## About the Calculation
The application calculates the average number of cookies sold based on the content of the provided CSV file and uses this value as the recommended amount to bake.
## Notes
* Use the `-v` flag to enable verbose logging.
Metadata
Release files for bake-forecast-cicd 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| bake_forecast_cicd-1.2.0.tar.gz | 4.8 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bake_forecast_cicd-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.4 kB
Release files / bake_forecast_cicd-1.2.0.tar.gz
| Download URL | bake_forecast_cicd-1.2.0.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
07eb3fa617f5d0562b66eed587243474928965a7df39ddd38fcd5516e589bf38
|
|
BLAKE2b-256 checksum How to use checksums |
94295cfa80de74d6e28e57cf918ccf893e8bc71c8478c3f2c4b5aafbd43615b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2025.
Transparency logRelease files / bake_forecast_cicd-1.2.0-py3-none-any.whl
| Download URL | bake_forecast_cicd-1.2.0-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f09c77f4704154d4c253aaab409c57d3b6bd77750715b1fa3a7914f95cdb769f
|
|
BLAKE2b-256 checksum How to use checksums |
f47348187b45ce04b099a227025d91f09006a45ddac28e8218b7ed43438ebe2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2025.
Transparency logSecurity for bake-forecast-cicd 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for bake_forecast_cicd-1.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.