Thank you for your interest in contributing to Acton ERN! This document provides guidelines and instructions for contributing to the project.
- Development Setup
- Coding Standards
- Pull Request Process
- Testing Requirements
- Documentation
- Release Process
- Rust (stable, minimum 1.70.0)
- Cargo (comes with Rust)
- Git
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/your-username/acton-ern.git cd acton-ern -
Add the upstream repository as a remote:
git remote add upstream https://github.com/govcraft/acton-ern.git
-
Create a new branch for your changes:
git checkout -b feature/your-feature-name
-
Install development dependencies:
cargo build
-
Build the project:
cargo build
-
Run tests:
cargo test -
Run benchmarks:
cargo bench
-
Check code formatting:
cargo fmt --check
-
Run linting:
cargo clippy -- -D warnings
- Follow the Rust standard style guide.
- Use
cargo fmtto format your code before submitting. - Use
cargo clippyto catch common mistakes and improve your code.
- Use clear, descriptive commit messages.
- Follow the conventional commits format:
feat:for new featuresfix:for bug fixesdocs:for documentation changesstyle:for formatting changesrefactor:for code refactoringtest:for adding or modifying testschore:for maintenance tasks
- Document all public APIs.
- Include examples in documentation when appropriate.
- Update the README.md if necessary.
- Add entries to CHANGELOG.md for notable changes.
-
Before submitting a PR:
- Ensure your code builds without errors.
- Run all tests and make sure they pass.
- Update documentation if needed.
- Add tests for new functionality.
-
Creating a PR:
- Submit your PR against the
mainbranch. - Fill out the PR template completely.
- Reference any related issues.
- Provide a clear description of the changes.
- Submit your PR against the
-
PR Review Process:
- Address review comments promptly.
- Keep the PR focused on a single issue or feature.
- Be open to feedback and suggestions.
-
After PR Approval:
- Squash commits if requested.
- Ensure CI passes before merging.
- Write unit tests for all new functionality.
- Aim for high test coverage (at least 80%).
- Tests should be clear and focused on specific functionality.
- Add integration tests for features that interact with other components.
- Test edge cases and error conditions.
- Add benchmarks for performance-critical code.
- Ensure changes don't negatively impact performance.
- Place unit tests in the same file as the code they test, using Rust's
#[cfg(test)]module. - Place integration tests in the
tests/directory. - Place benchmarks in the
benches/directory.
- Document all public APIs using rustdoc.
- Include examples in documentation.
- Keep the README.md up to date.
- Update CHANGELOG.md for each release.
- Update version number in Cargo.toml.
- Update CHANGELOG.md with the new version and changes.
- Create a git tag for the new version.
- Push the tag to GitHub.
- Publish to crates.io:
cargo publish
By contributing to Acton ERN, you agree that your contributions will be licensed under the project's MIT OR Apache-2.0 license.