A pygame-based experiment that integrates GUI, egg headset, and data management components for an immersive experience.
This project combines three main components:
- GUI: Graphical user interface for interaction
- Egg Headset: EEG headset integration for brain-computer interface
- Data Manager: System for handling and processing data
- Python 3.13 or higher
- pip for package management
-
Clone the repository:
git clone <repository-url> cd hex-o-spell-experiment
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -U pip pip install -e .
For development:
pip install -e ".[dev]"-
Install pre-commit hooks:
pre-commit install
-
Run tests:
pytest
-
Run the application:
python src/main.py
hex-o-spell-experiment/
├── src/ # Source code
│ ├── gui/ # GUI components
│ ├── egg_headset/ # EEG headset integration
│ └── data_manager/ # Data management system
├── tests/ # Unit and integration tests
│ ├── unit/ # Unit tests
│ └── integration/ # Integration tests
├── pyproject.toml # Project configuration
└── README.md # This file
Unit tests are located in tests/unit/ and integration tests in tests/integration/.
Run all tests:
pytestRun specific test category:
pytest -m unit
pytest -m integrationFormat code:
black src/ tests/Check for linting issues:
flake8 src/ tests/Check for type issues:
mypy src/This project includes automated CI/CD pipelines that enforce code quality and ensure robust software delivery:
- Formatting: Checked with Black on every commit and PR
- Linting: Checked with Flake8 on every commit and PR
- Type Safety: Checked with MyPy on every commit and PR
- Testing: All tests must pass before merging (unit and integration tests)
- Security: Dependencies are scanned for vulnerabilities weekly
- Coverage: Test coverage reports are generated and uploaded to Codecov
The following GitHub Actions workflows are configured:
- Python CI (
python-ci.yml): Runs formatting, linting, type checking, testing and coverage reporting - Pre-commit Hooks (
pre-commit.yml): Runs all pre-commit hooks for consistency - Security Scanning (
security-scan.yml): Scans dependencies for known vulnerabilities
To run these checks automatically before each commit:
- Install pre-commit hooks:
pre-commit install
The hooks will automatically run formatting, linting, and type checking before each commit.
To enforce these quality checks, set up branch protection rules in GitHub:
- Navigate to your GitHub repository
- Go to the "Settings" tab
- Click on "Branches" in the left sidebar
- Under "Branch protection rules", click "Add rule"
- Enter "main" as the branch name pattern (or your primary branch)
- Select the following options:
- Require pull request reviews before merging
- Set "Required number of approvals" to at least 1 (or your preferred number)
- Require status checks to pass before merging
- Check "Require branches to be up to date before merging"
- In "Status checks that are required", ensure the following are selected:
test (3.13)- From python-ci.yml workflowpre-commit- From pre-commit.yml workflow
- Require conversation resolution before merging
- Require pull request reviews before merging
Once configured, these rules will prevent merging pull requests until all quality checks pass.