Starter code for the AI110 Tinker 1B / 2B / 3B in-class activities. All three tinkers build on this one project, each working in a different module.
| Tinker | Focus | Files you'll work in |
|---|---|---|
| 1B, Split the Logic | Writing your first pytest test, then a cross-file refactor |
scoring.py, scoring_helpers.py, test_scoring.py |
| 2B, Wire It Up | Streamlit session_state, input validation, dataclasses, recurring dates |
sessions.py, app.py |
| 3B, Rank & Explain | CSV loading, weighted scoring that returns reasons, ranking, a data-flow diagram | ranking.py, data/study_spots.csv, diagram.mmd |
Fork this repo, then clone your fork:
git clone https://github.com/<YOUR-GITHUB-USERNAME>/ai110-tinker-studysync-starter.git
cd ai110-tinker-studysync-starterCreate and activate a virtual environment:
python3 -m venv .venvmacOS, Linux, Git Bash or WSL:
source .venv/bin/activateWindows PowerShell:
.\.venv\Scripts\Activate.ps1Install dependencies and run:
python -m pip install --upgrade pip
pip install -r requirements.txt
python -m streamlit run app.pyRun the tests:
pytestapp.py— Streamlit entry point, wires the three tabs togetherscoring.py—session_rating()and the Session Scorer tabscoring_helpers.py— helpers extracted during Tinker 1Bsessions.py— session log, the Tinker 2B surfaceranking.py— study-spot ranking, the Tinker 3B surfacedata/study_spots.csv— sample data for rankingdiagram.mmd— Mermaid data-flow diagram, completed in Tinker 3Btest_scoring.py— starting point for your own tests
Your instructor will tell you which tinker you're on. Follow the activity on the course portal.