Thank you for your interest in contributing to CortexAI! This document provides guidelines and information for contributors.
Please read our Code of Conduct before contributing.
- Check if the bug has already been reported in GitHub Issues.
- If not, create a new issue with:
- A clear, descriptive title
- Steps to reproduce the issue
- Expected behavior vs actual behavior
- Your environment (OS, Rust version, Python version)
- Check existing issues and discussions.
- Create a new issue with the
enhancementlabel. - Describe the feature, its use case, and potential implementation.
- Fork the repository.
- Create a feature branch from
main:git checkout -b feature/your-feature-name
- Make your changes.
- Add or update tests as needed.
- Ensure all tests pass:
cargo test - Submit a pull request with:
- A clear description of changes
- Reference to related issues
- Any breaking changes noted
- Rust 1.75+
- Python 3.10+
maturin(for building Python bindings)
# Build the core library
cd core
cargo build
# Run tests
cargo test
# Build Python bindings
cd ../bindings/python
pip install maturin
maturin develop- Follow standard Rust conventions.
- Use
cargo fmtandcargo clippy. - Document public APIs with
///comments. - Include unit tests for new functionality.
- Follow PEP 8.
- Use type hints.
- Document with docstrings.
To add a new equation module:
- Create a new file in
core/src/(e.g.,new_equation.rs). - Implement the
EquationModuletrait:pub struct NewEquation { params: NewEquationParams, } impl EquationModule for NewEquation { fn step(&mut self, input: &State, params: &Params, dt: f64) -> State { // Implementation } fn explain(&self) -> Contribution { // Return contribution metadata } fn name(&self) -> &str { "new_equation" } fn variable_names(&self) -> Vec<String> { vec!["var1".to_string(), "var2".to_string()] } }
- Add unit tests.
- Register in
lib.rs. - Update documentation.
Run benchmarks with:
cargo benchNew benchmarks should be added to the benches/ directory.
- Update README.md for user-facing changes.
- Update inline documentation for API changes.
- For mathematical details, reference original papers.
Open a Discussion for questions.
Thank you for contributing to CortexAI!