Welcome to the Coffee Tasting Sessions repository! This project aims to collect and analyze data from our monthly coffee tasting events to personalize coffee recommendations for participants.
Warning
The README.md file (as well as the rest of the project) was generated by ChatGPT. I've made some changes to the project structure (e.g., using uv to install dependencies, all Python code in src/) that are not reflected in this file. Keep that in mind when using this project.
Our coffee tasting sessions are collaborative events where participants bring their own coffee beans, brew filter coffee, and taste different varieties. We collect detailed ratings and rankings for each coffee to understand individual preferences and provide personalized recommendations.
This repository stores all the data collected during these sessions, along with scripts for validation and report generation.
Click the "Fork" button at the top right of this repository to create a copy under your GitHub account.
git clone https://github.com/<your-username>/coffee-tasting.git
cd coffee-tastingIf you're bringing a new coffee to the session:
- Copy the
templates/coffee_template.yamlfile intodata/coffees/. - Navigate to
data/coffees/. - Rename the file to your unique coffee_id (e.g.,
coffee_ethiopia_yirgacheffe.yaml). - Fill in the template with your coffee bean information.
If you're a new participant:
- Copy the
templates/participant_template.yamlfile intodata/participants/. - Navigate to
data/participants/. - Rename the file to your participant_id (e.g.,
participant_jane_smith.yaml). - Fill in your participant information.
-
Switch to your participant branch:
git checkout <session_date>/<participant_id>
-
Fill in your ratings:
- Navigate to
data/sessions/<session_date>/ratings/. - Open your
<participant_id>.yamlfile. - Fill in your ratings for each coffee.
- Navigate to
-
Fill in your rankings:
- Navigate to
data/sessions/<session_date>/rankings/. - Open your
<participant_id>.yamlfile. - Fill in your rankings.
- Navigate to
git add .
git commit -m "Add ratings and rankings for <participant_id>"
git push origin <session_date>/<participant_id>Go to your forked repository on GitHub. Click on "Compare & pull request". Provide a descriptive title and description. Submit the pull request.
Every pull request triggers an automated validation workflow using GitHub Actions. The validate_data.py script checks:
- Required fields are present.
- Data types are correct.
- References (e.g.,
coffee_id,participant_id) are valid. - Data is consistent.
When a new session is added:
- The
auto_branch_creation.ymlworkflow runs on push tomaster. - It creates a new branch for each participant named
<session_date>/<participant_id>. - Templates are copied and placeholders are replaced with known information.
Upon merging data into master, the generate_reports.yml workflow:
- Runs the
generate_reports.pyscript. - Generates an HTML report for each session in the
reports/directory. - Commits and pushes the reports back to the repository.
Templates are provided in the templates/ directory for easy reuse:
coffee_template.yamlparticipant_template.yamlsession_ratings_template.yamlsession_rankings_template.yaml
- Navigate to the
templates/directory. - Copy the required template to the appropriate directory.
- Rename the file as per the naming conventions.
- Replace placeholders (enclosed in
< >) with your data.
Use the following command to install all required Python packages before running any script:
uv sync- Location:
validate_data.py - Purpose: Validates all YAML data files against predefined schemas using Pydantic.
- Usage:
uv run validate_data
- Location:
generate_reports.py - Purpose: Generates HTML reports summarizing each session.
- Usage:
uv run generate_reports