Thank you for your interest in contributing to RealWorldMapGen-BNG! This document provides guidelines and instructions for contributing.
If you find a bug, please open an issue with:
- Clear description of the problem
- Steps to reproduce
- Expected vs actual behavior
- System information (OS, Python version, Poetry version)
- Relevant logs or error messages
Feature suggestions are welcome! Please open an issue with:
- Clear description of the feature
- Use case and motivation
- Potential implementation approach (optional)
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature-name
- Make your changes
- Test your changes:
poetry run pytest poetry run black realworldmapgen/ poetry run ruff check realworldmapgen/
- Commit with clear messages:
git commit -m "Add: Brief description of changes" - Push to your fork:
git push origin feature/your-feature-name
- Open a Pull Request
- Follow PEP 8 style guide
- Use type hints where appropriate
- Write docstrings for functions and classes
- Keep functions focused and small
- Add comments for complex logic
We use:
- Black for code formatting (line length: 100)
- Ruff for linting
- MyPy for type checking
Run before committing:
poetry run black realworldmapgen/
poetry run ruff check realworldmapgen/ --fix
poetry run mypy realworldmapgen/- Write tests for new features
- Ensure existing tests pass
- Aim for good test coverage
Run tests:
poetry run pytest
poetry run pytest --cov=realworldmapgen- Update README.md for user-facing changes
- Add docstrings to new functions/classes
- Update API documentation if endpoints change
- Add examples for new features
-
Clone and install:
git clone <your-fork-url> cd RealWorldMapGen-BNG poetry install
-
Set up pre-commit hooks (optional):
poetry run pre-commit install
-
Run in development mode:
poetry run uvicorn realworldmapgen.api.main:app --reload
All submissions require review. We look for:
- Code quality and style
- Test coverage
- Documentation
- Performance implications
- Security considerations
Use clear, descriptive commit messages:
Add: New feature or functionalityFix: Bug fixUpdate: Improvements to existing featuresRefactor: Code restructuringDocs: Documentation changesTest: Test additions or changesStyle: Code style changes
Example:
Add: Support for custom road materials in BeamNG exporter
- Add material_map configuration option
- Update BeamNG exporter to use custom materials
- Add tests for material mapping
Current areas where contributions are especially welcome:
- Satellite imagery integration: Implement actual satellite image download and analysis
- Performance optimization: Improve processing speed for large areas
- Additional exporters: Support for other game engines (Unreal, Unity)
- Testing: Expand test coverage
- Documentation: Improve guides and examples
- UI/UX: Enhance web interface
- Check backend terminal output for errors
- Enable verbose logging in
.env:LOG_LEVEL=DEBUG - Use FastAPI docs:
http://localhost:8000/docs - Test Ollama separately:
curl http://localhost:11434/api/tags
- Open a discussion on GitHub
- Check existing issues and PRs
- Read the documentation
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to RealWorldMapGen-BNG! 🎉