A simple program that predicts the number of cookies necessary to bake.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bake_forecast_cicd-1.2.0.tar.gz.
File metadata
- Download URL: bake_forecast_cicd-1.2.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07eb3fa617f5d0562b66eed587243474928965a7df39ddd38fcd5516e589bf38
|
|
| MD5 |
ae3f4d61f8d7b312d9af4bd7ea2ca3ae
|
|
| BLAKE2b-256 |
94295cfa80de74d6e28e57cf918ccf893e8bc71c8478c3f2c4b5aafbd43615b8
|
Provenance
The following attestation bundles were made for bake_forecast_cicd-1.2.0.tar.gz:
Publisher:
publish.yaml on ca5ual/bake-forecast-cicd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bake_forecast_cicd-1.2.0.tar.gz -
Subject digest:
07eb3fa617f5d0562b66eed587243474928965a7df39ddd38fcd5516e589bf38 - Sigstore transparency entry: 731962594
- Sigstore integration time:
-
Permalink:
ca5ual/bake-forecast-cicd@f77b0f1be9afe3949726434fdc3b33f9891d6037 -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/ca5ual
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@f77b0f1be9afe3949726434fdc3b33f9891d6037 -
Trigger Event:
release
-
Statement type:
File details
Details for the file bake_forecast_cicd-1.2.0-py3-none-any.whl.
File metadata
- Download URL: bake_forecast_cicd-1.2.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f09c77f4704154d4c253aaab409c57d3b6bd77750715b1fa3a7914f95cdb769f
|
|
| MD5 |
f7257127e9139c9128cac16a790a08fc
|
|
| BLAKE2b-256 |
f47348187b45ce04b099a227025d91f09006a45ddac28e8218b7ed43438ebe2c
|
Provenance
The following attestation bundles were made for bake_forecast_cicd-1.2.0-py3-none-any.whl:
Publisher:
publish.yaml on ca5ual/bake-forecast-cicd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bake_forecast_cicd-1.2.0-py3-none-any.whl -
Subject digest:
f09c77f4704154d4c253aaab409c57d3b6bd77750715b1fa3a7914f95cdb769f - Sigstore transparency entry: 731962595
- Sigstore integration time:
-
Permalink:
ca5ual/bake-forecast-cicd@f77b0f1be9afe3949726434fdc3b33f9891d6037 -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/ca5ual
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@f77b0f1be9afe3949726434fdc3b33f9891d6037 -
Trigger Event:
release
-
Statement type: