Skip to content

Latest commit

 

History

History
75 lines (52 loc) · 2.04 KB

DEVELOPMENT.md

File metadata and controls

75 lines (52 loc) · 2.04 KB

Development Guidelines

Code Quality

  • Use type hints for all function parameters and return values
  • Follow PEP 8 style guidelines
  • Use descriptive variable and function names
  • Add docstrings to all public functions and classes

Testing

  • Write unit tests for all business logic
  • Aim for >80% code coverage
  • Use descriptive test names
  • Test both success and failure cases

Pytest Automation Baseline

Use these commands as the repository baseline for local and CI-ready test automation:

uv run pytest
uv run pytest tests/test_pytest_automation_baseline.py -q

Expected behavior:

  • uv run pytest executes the default suite configured in pyproject.toml.
  • uv run pytest tests/test_pytest_automation_baseline.py -q verifies automation expectations:
    • passing tests return exit code 0
    • failing tests return non-zero exit code

Git Workflow

  • Use descriptive commit messages
  • Keep commits focused on single changes
  • Use feature branches for new work
  • Rebase before merging to main

Agent Workflow

  • Agents must stay within their defined scope
  • Document all changes in commit messages
  • Update task status in TASKS.md
  • Request supervisor review for scope changes

Desktop Setup and Run

Use these commands for local desktop development with Kivy:

uv sync --dev
uv run python -c "import kivy; print(kivy.__version__)"
uv run python -c "from app.state import GameState; from app.ui.main_screen import MainGameScreen; screen = MainGameScreen(GameState()); print(screen.turning_point_label.text)"
uv run python -m app.main

Expected smoke output before full app run:

  • kivy version prints successfully.
  • Turning point smoke check prints Turning Point 1.

If running on a headless environment, use only the smoke commands and skip uv run python -m app.main.

Performance

  • Profile code before optimizing
  • Prefer readable code over micro-optimizations
  • Test on target platforms (Android/desktop)

Security

  • Never commit secrets or API keys
  • Validate all user inputs
  • Use secure defaults for file permissions