Thank you for your interest in contributing to RealtimeGym!
# Clone the repository
git clone https://github.com/wenyl22/RealtimeGym.git
cd RealtimeGym
# Install with development dependencies
pip install -e ".[dev]"We use pre-commit hooks to maintain code quality:
# Install the pre-commit hooks
pre-commit install
# (Optional) Run on all files to test
pre-commit run --all-filesAll code must pass the following checks before being merged:
- ruff - Python linting and formatting
- ty - Python type checking
- pre-commit - Additional code quality checks
# Run ruff linter
uv run ruff check
# Run ruff formatter
uv run ruff format
# Run type checker
uv run ty check
# Run all checks together
uv run ruff check && uv run ruff format && uv run ty checkThe pre-commit hooks will automatically run when you commit code. They include:
- ruff - Lints and formats Python code
- ty - Type checks Python code
- trailing-whitespace - Removes trailing whitespace
- end-of-file-fixer - Ensures files end with a newline
- check-yaml - Validates YAML files
- check-toml - Validates TOML files
- check-merge-conflict - Checks for merge conflict markers
- check-added-large-files - Prevents accidentally committing large files
All pull requests automatically run the following checks via GitHub Actions:
- Ruff linting
- Ruff formatting check
- ty type checking
- Tests (when available)
You can see the workflow configuration in .github/workflows/pr-checks.yml.
- Fork the repository
- Create a new branch for your feature (
git checkout -b feature/amazing-feature) - Make your changes
- Ensure all checks pass locally
- Commit your changes (pre-commit hooks will run automatically)
- Push to your branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Ensure your code passes all automated checks
- Add tests for new features (when test infrastructure is available)
- Update documentation as needed
- Follow the existing code style
- Write clear commit messages
We use ruff for both linting and formatting. The configuration is in pyproject.toml:
[tool.ruff]
exclude = [
"src/realtimegym/environments/overcooked_new", # Third-party code
]We use ty for type checking. The configuration is in pyproject.toml:
[tool.ty.src]
exclude = [
"src/realtimegym/environments/overcooked_new/**", # Third-party code
]The src/realtimegym/environments/overcooked_new/ directory contains vendored code from Overcooked-AI. This code is excluded from our linting and type checking standards. See src/realtimegym/environments/overcooked_new/THIRD_PARTY_NOTICE.md for details.
If you have questions about contributing, please open an issue on GitHub.