Thank you for your interest in contributing to CosmoRisk! This document provides guidelines for contributing.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/CosmoRisk.git
- Create a branch for your changes:
git checkout -b feature/your-feature-name
- Node.js v18+
- Rust 1.70+
- Tauri CLI
npm install
npm run tauri dev# Rust tests
cd src-tauri && cargo test
# TypeScript type check
npm run build- Follow Rust conventions (
rustfmt,clippy) - Document public functions with
///comments - Use SI units internally (meters, seconds, kilograms)
- Add unit tests for physics calculations
- Use TypeScript strict mode
- Follow existing code style
- Document complex functions
When adding new physics effects:
- Reference Literature: Cite academic sources
- Document Formulas: Add LaTeX comments
- Add Unit Tests: Validate against known solutions
- Update README: Add to Scientific Methodology section
When reporting bugs, include:
- Operating system and version
- Steps to reproduce
- Expected vs actual behavior
- Console error messages
Before suggesting new features:
- Check existing issues
- Explain the use case
- Consider if it fits the project scope
- Update documentation if needed
- Add/update tests
- Ensure all tests pass
- Update CHANGELOG if applicable
- Request review from maintainers
- Be respectful and inclusive
- Provide constructive feedback
- Focus on the code, not the person
- Follow GitHub community guidelines
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for helping make CosmoRisk better! 🌟