Contributing to LionWeb Python
Thank you for your interest in contributing to LionWeb Python! This document provides guidelines and instructions for contributing to the project.
Getting Started
- Fork the repository
- Clone your fork
- Ensure Python and Docker are installed (Docker is needed for running tests)
- Set up the development environment:
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
pip install -r requirements.txt
# Necessary before being able to run tests
sh prepare_for_tests.sh - Create a new branch for your changes
Development Workflow
- Create an Issue: Before starting work, create an issue describing the problem or feature
- Branch Naming: Use descriptive branch names (e.g.,
fix/issue-123
orfeature/new-feature
) - Code Style: Follow the project's code style guidelines
# Run these before committing
black src/ tests/
isort src/ tests/
ruff check src/ tests/
mypy src/
Making Changes
- Write Tests: Ensure your changes are covered by tests
- Update Documentation: Keep documentation up to date with your changes
- Commit Messages: Write clear, descriptive commit messages
- Pull Request: Create a pull request when ready for review
Testing
- Run all tests:
PYTHONPATH=src python -m unittest discover tests
- If running tests for the first time:
sh prepare_for_tests.sh
Pull Request Process
- Run all checks
- Ensure all tests pass
- Update documentation if needed
- Request review from maintainers
- Address any feedback
- Merging has to be performed by the proponent, if he has the necessary privileges, otherwise from the maintainers
Release Process
Run sh release.sh