Skip to content

Commit ea748b5

Browse files
docs(project): update documentation and project config
Update CLAUDE.md with new project structure, commands and git workflow guidelines. Update pyproject.toml with test configuration and better project metadata. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 753000f commit ea748b5

File tree

2 files changed

+89
-4
lines changed

2 files changed

+89
-4
lines changed

CLAUDE.md

Lines changed: 78 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,18 @@
55
# Install dependencies
66
poetry install
77

8-
# Run application
8+
# Run application (old monolithic structure)
99
poetry run python main.py
1010

11+
# Run application (new modular structure)
12+
poetry run python app.py
13+
14+
# Run tests
15+
poetry run pytest
16+
17+
# Run tests with coverage
18+
poetry run pytest --cov=src --cov-report=html
19+
1120
# Build Docker container
1221
docker build -t bingo .
1322

@@ -29,7 +38,73 @@ cd helm && ./package.sh && helm install bingo ./bingo
2938
- **Comments**: Use docstrings for functions and descriptive comments
3039

3140
## Project Structure
32-
- `main.py`: Core application with NiceGUI implementation
41+
- `app.py`: Main entry point for modular application
42+
- `src/`: Source code directory
43+
- `config/`: Configuration and constants
44+
- `core/`: Core game logic
45+
- `ui/`: User interface components
46+
- `utils/`: Utility functions
3347
- `phrases.txt`: Contains customizable bingo phrases
3448
- `static/`: Static assets for fonts and styles
35-
- `helm/`: Kubernetes deployment configuration
49+
- `tests/`: Unit and integration tests
50+
- `helm/`: Kubernetes deployment configuration
51+
52+
## Git Workflow
53+
54+
### Branch Naming
55+
- Use feature branches for each change: `feature/description-of-change`
56+
- Use bugfix branches for bug fixes: `fix/description-of-bug`
57+
- Use chore branches for maintenance: `chore/description-of-task`
58+
59+
### Commit Guidelines
60+
Follow conventional changelog format:
61+
62+
```
63+
<type>(<scope>): <subject>
64+
65+
<body>
66+
67+
<footer>
68+
```
69+
70+
1. **Types**:
71+
- `feat`: A new feature
72+
- `fix`: A bug fix
73+
- `docs`: Documentation only changes
74+
- `style`: Changes that do not affect meaning (white-space, formatting)
75+
- `refactor`: Code change that neither fixes a bug nor adds a feature
76+
- `perf`: Change that improves performance
77+
- `test`: Adding missing tests or correcting existing tests
78+
- `chore`: Changes to the build process or auxiliary tools
79+
80+
2. **Scope** (optional): The module/component affected, e.g., `core`, `ui`, `board`
81+
82+
3. **Subject**: Short description in imperative, present tense (not past tense)
83+
- Good: "add feature X" (not "added feature X")
84+
- Use lowercase
85+
- No period at the end
86+
87+
4. **Body** (optional): Detailed explanation of changes
88+
- Use present tense
89+
- Include motivation and context
90+
- Explain "what" and "why" (not "how")
91+
92+
5. **Footer** (optional): Reference issues, PRs, breaking changes
93+
94+
### Example Commits:
95+
```
96+
feat(board): add color theme selector
97+
98+
Add ability for users to choose color themes for the bingo board
99+
100+
Resolves #123
101+
```
102+
103+
```
104+
fix(ui): resolve client disconnection issues
105+
106+
Handle race conditions during client disconnects to prevent
107+
server exceptions and ensure smooth reconnection
108+
109+
Fixes #456
110+
```

pyproject.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tool.poetry]
22
name = "bingo"
33
version = "0.1.0"
4-
description = ""
4+
description = "A bingo board generator using NiceGUI"
55
authors = ["Offending Commit <offendingcommit@gmail.com>"]
66
license = "MIT"
77
readme = "README.md"
@@ -12,7 +12,17 @@ exclude = [".git", ".git/"]
1212
python = "^3.12"
1313
nicegui = "^2.11.0"
1414

15+
[tool.poetry.group.dev.dependencies]
16+
pytest = "^7.4.0"
17+
pytest-cov = "^4.1.0"
1518

1619
[build-system]
1720
requires = ["poetry-core>=1.8"]
1821
build-backend = "poetry.core.masonry.api"
22+
23+
[tool.pytest.ini_options]
24+
testpaths = ["tests"]
25+
python_files = "test_*.py"
26+
python_classes = "Test*"
27+
python_functions = "test_*"
28+
addopts = "--cov=src"

0 commit comments

Comments
 (0)