Contributing
We welcome contributions to CosmoForge! This document explains how to contribute.
Development Setup
Fork the repository on GitHub
Clone your fork locally
Create a development environment
Install in development mode
git clone https://github.com/yourusername/CosmoForge.git
cd CosmoForge
pip install -e ".[dev]"
Code Style
We use the following tools for code quality:
ruff for linting and formatting
pytest for testing
pre-commit hooks for automated checks
Run quality checks:
# Linting
ruff check src/
# Formatting
ruff format src/
# Tests
pytest tests/
Documentation
Documentation is built with Sphinx. To build locally:
cd docs
make html
The built documentation will be in docs/build/html/.
Pull Requests
Create a feature branch from main
Make your changes
Add tests if applicable
Update documentation
Submit a pull request
Please ensure:
All tests pass
Code follows style guidelines
Documentation is updated
Commit messages are descriptive