Contributing to StationBench
January 15, 2025 ยท View on GitHub
We love your input! We want to make contributing to StationBench as easy and transparent as possible.
Development Setup
-
Clone the repository:
git clone git@github.com:juaAI/stationbench.git cd stationbench -
Create a new branch for your changes:
git checkout -b branch-name -
Install Poetry if you haven't already by following the instructions at: https://python-poetry.org/docs/
-
Install dependencies:
poetry install --with dev -
Activate the virtual environment:
poetry shell
Development Workflow
Code Formatting and Linting
We use ruff for both formatting and linting. Format your code before committing:
poetry exec format
Running Tests
Run the test suite:
poetry run pytest
Pull Request Process
- Ensure your code follows our style guide (run
poetry run format) - Add tests for any new functionality
- Update documentation if you're changing functionality
- Create a Pull Request with a clear description:
- What changes were made
- Why the changes were made
- Any notable implementation details
Documentation
When adding new features, please:
-
Add docstrings to new functions/classes following this format:
def function_name(param1: type, param2: type) -> return_type: """Short description. Args: param1: Description of param1 param2: Description of param2 Returns: Description of return value """ -
Update relevant files in docs/
-
Update README.md if adding major features
Code Style Guide
- Use type hints for all function arguments and return values
- Follow PEP 8 guidelines (enforced by ruff)
- Use descriptive variable names
- Add comments for complex logic
Questions or Problems?
- Open an issue for bugs or feature requests
- Contact maintainers for security issues
License
By contributing, you agree that your contributions will be licensed under the MIT License.