Skip to content

Commit 9a6af88

Browse files
Kyle ParkerKyle Parker
authored andcommitted
Upgrade repo for recruiter visibility with CI and tests
1 parent 67d0cd7 commit 9a6af88

File tree

5 files changed

+183
-23
lines changed

5 files changed

+183
-23
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.12"
20+
21+
- name: Run unit tests
22+
run: python -m unittest discover -s tests -p "test_*.py" -v

CAREER_VISIBILITY.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Career Visibility Checklist
2+
3+
Use this checklist to improve discovery by recruiters hiring for Business Analyst, Data Scientist, and AI roles.
4+
5+
## GitHub repository settings
6+
- Add the repository description from `README.md`.
7+
- Add topics: `python`, `sql`, `sqlite`, `business-analyst`, `data-science`, `machine-learning`, `ai`, `education`.
8+
- Pin this repo on your GitHub profile.
9+
- Enable "Discussions" if you want community feedback and activity signals.
10+
11+
## GitHub profile optimization
12+
- Update profile headline with target roles and keywords.
13+
- Add a profile README with:
14+
- Short bio and target roles.
15+
- Top skills (Python, SQL, analytics, ML basics).
16+
- 3 pinned projects with business impact statements.
17+
- Link LinkedIn and portfolio site in profile links.
18+
19+
## Employer-ready proof points
20+
- Add a short demo GIF/screenshot in the README.
21+
- Add metrics after updates (for example: number of challenges, test coverage, CI status).
22+
- Add a "Case Study" section describing problem, approach, and outcome.
23+
24+
## Networking strategy
25+
- Share the repo on LinkedIn with a short post describing:
26+
- Who it helps.
27+
- What technical decisions you made.
28+
- What you plan to improve next.
29+
- Ask for peer feedback and create follow-up commits based on comments.

CONTRIBUTING.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Contributing
2+
3+
Thanks for your interest in improving Code Quest.
4+
5+
## Development setup
6+
```bash
7+
cd "/Users/kyleparker/Documents/code game"
8+
python3 -m unittest discover -s tests -p "test_*.py" -v
9+
python3 main.py
10+
```
11+
12+
## Contribution guidelines
13+
- Keep changes focused and documented.
14+
- Add or update tests for behavior changes.
15+
- Keep the beginner-learning experience clear and simple.
16+
- Use descriptive commit messages.

README.md

Lines changed: 53 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,69 @@
11
# Code Quest: Python + SQL Trainer
22

3-
Learn Python and SQL by playing short, interactive coding challenges.
3+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
4+
[![Python](https://img.shields.io/badge/Python-3.10%2B-blue.svg)](https://www.python.org/)
5+
[![CI](https://img.shields.io/badge/tests-unittest-green.svg)](.github/workflows/ci.yml)
46

5-
> GitHub tagline: Beginner-friendly Python + SQL learning game with interactive challenges, hints, and progress tracking.
7+
Code Quest is a beginner-friendly command-line learning game for Python and SQL. It uses interactive challenges, instant feedback, and progress tracking to help users build practical coding and query skills.
68

7-
Code Quest is a beginner-focused terminal app designed to make coding practice feel like a game. Players solve Python and SQL tasks, get instant feedback, and build confidence step by step. SQL challenges run on a real SQLite dataset, so learners practice query skills they can actually use.
9+
## Why this project matters
10+
- Demonstrates Python programming fundamentals (`dataclasses`, validation logic, file persistence).
11+
- Demonstrates SQL competency using real query execution with SQLite.
12+
- Shows product thinking: gamification, hinting, progression, and user feedback loops.
13+
- Shows software engineering basics: tests, CI workflow, repo documentation, and MIT licensing.
814

9-
## GitHub About (Recommended)
10-
- Description: Beginner-friendly Python + SQL learning game with interactive challenges, hints, and progress tracking.
11-
- Website: https://github.com/kp147852-droid/Code-Quest-Python-SQL-Trainer
12-
- Topics: python, sql, sqlite, education, cli-game, beginner-friendly, learning-by-doing
15+
## Role relevance (for hiring)
16+
- Business Analyst: SQL filtering/aggregation patterns, data reasoning, and clear user flows.
17+
- Data Scientist: data manipulation mindset, query literacy, and iterative problem solving.
18+
- AI/ML Roles: core coding fluency, debugging discipline, and structured evaluation logic.
19+
20+
## Features
21+
- Python challenge mode with retry + hint support.
22+
- SQL challenge mode with executable queries against an in-memory SQLite dataset.
23+
- Scoring system (+10 Python, +15 SQL) and unlocked progression.
24+
- Local progress persistence in `progress.json`.
25+
- Reset option for repeated practice.
1326

14-
## What it does
15-
- Gives step-by-step Python challenges.
16-
- Gives SQL challenges against a real SQLite dataset.
17-
- Tracks score and progress in `progress.json`.
18-
- Lets players retry with hints.
27+
## Tech stack
28+
- Python 3
29+
- SQLite (standard library `sqlite3`)
30+
- JSON persistence
31+
- GitHub Actions-ready CI configuration
1932

20-
## Run
33+
## Quick start
2134
```bash
2235
cd "/Users/kyleparker/Documents/code game"
2336
python3 main.py
2437
```
2538

26-
## Game flow
39+
## Example game loop
2740
1. Pick Python or SQL challenge.
28-
2. Enter your answer/query.
29-
3. Get instant feedback and hints.
30-
4. Earn points and unlock the next challenge.
41+
2. Submit answer or SQL query.
42+
3. Receive immediate feedback (and hints if needed).
43+
4. Earn points and continue to the next level.
44+
45+
## Repository structure
46+
- `main.py` - menu and game loop.
47+
- `game.py` - challenge logic, scoring, SQLite setup, persistence.
48+
- `tests/test_game.py` - unit tests for core behavior.
49+
- `.github/workflows/ci.yml` - automated test run on push/PR.
50+
51+
## Suggested GitHub "About" settings
52+
- Description: Beginner-friendly Python + SQL learning game with interactive challenges, hints, and progress tracking.
53+
- Website: <YOUR_PORTFOLIO_OR_LINKEDIN_URL>
54+
- Topics: `python`, `sql`, `sqlite`, `business-analyst`, `data-science`, `ai-learning`, `education`, `cli-game`
55+
56+
## Portfolio talking points
57+
- Built an educational CLI product that maps technical exercises to measurable progression.
58+
- Designed challenge validation logic for both Python and SQL with constrained retries and hints.
59+
- Added test coverage and CI to keep behavior reliable as feature scope grows.
60+
- Documented recruiter-discovery steps in [CAREER_VISIBILITY.md](CAREER_VISIBILITY.md).
3161

32-
## Ideas to expand
33-
- Add more levels and difficulty modes.
34-
- Add timer/leaderboard features.
35-
- Add multiplayer quiz mode.
36-
- Add web UI (Flask/Streamlit) later.
62+
## Roadmap
63+
- Add intermediate and advanced challenge packs.
64+
- Add analytics export (CSV) for learner performance tracking.
65+
- Add optional web UI (Streamlit or Flask).
66+
- Add LLM-assisted hints for dynamic coaching.
3767

3868
## License
39-
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
69+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file.

tests/test_game.py

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import json
2+
import tempfile
3+
import unittest
4+
from pathlib import Path
5+
6+
import game
7+
8+
9+
class TestGame(unittest.TestCase):
10+
def test_default_python_challenges_count(self):
11+
challenges = game.default_python_challenges()
12+
self.assertEqual(len(challenges), 3)
13+
14+
def test_default_sql_challenges_count(self):
15+
challenges = game.default_sql_challenges()
16+
self.assertEqual(len(challenges), 3)
17+
18+
def test_sql_database_seeded(self):
19+
conn = game.setup_sql_db()
20+
rows = conn.execute("SELECT COUNT(*) FROM learners").fetchone()
21+
conn.close()
22+
self.assertEqual(rows[0], 4)
23+
24+
def test_progress_save_and_load(self):
25+
with tempfile.TemporaryDirectory() as temp_dir:
26+
original = game.PROGRESS_FILE
27+
try:
28+
game.PROGRESS_FILE = Path(temp_dir) / "progress.json"
29+
payload = {"python_done": 2, "sql_done": 1, "score": 35}
30+
game.save_progress(payload)
31+
loaded = game.load_progress()
32+
self.assertEqual(loaded, payload)
33+
finally:
34+
game.PROGRESS_FILE = original
35+
36+
def test_progress_invalid_json_fallback(self):
37+
with tempfile.TemporaryDirectory() as temp_dir:
38+
original = game.PROGRESS_FILE
39+
try:
40+
game.PROGRESS_FILE = Path(temp_dir) / "progress.json"
41+
game.PROGRESS_FILE.write_text("{not-json", encoding="utf-8")
42+
loaded = game.load_progress()
43+
self.assertEqual(loaded, {"python_done": 0, "sql_done": 0, "score": 0})
44+
finally:
45+
game.PROGRESS_FILE = original
46+
47+
def test_progress_type_fallback(self):
48+
with tempfile.TemporaryDirectory() as temp_dir:
49+
original = game.PROGRESS_FILE
50+
try:
51+
game.PROGRESS_FILE = Path(temp_dir) / "progress.json"
52+
game.PROGRESS_FILE.write_text(
53+
json.dumps({"python_done": "x", "sql_done": 2, "score": 10}),
54+
encoding="utf-8",
55+
)
56+
loaded = game.load_progress()
57+
self.assertEqual(loaded, {"python_done": 0, "sql_done": 0, "score": 0})
58+
finally:
59+
game.PROGRESS_FILE = original
60+
61+
62+
if __name__ == "__main__":
63+
unittest.main()

0 commit comments

Comments
 (0)