-
Notifications
You must be signed in to change notification settings - Fork 2
/
CONTRIBUTING
39 lines (23 loc) · 2.44 KB
/
CONTRIBUTING
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Contributing Guide
Thank you for considering contributing to our project! To ensure a smooth contribution process for everyone, we've outlined some guidelines that you should follow.
## Adding Test Coverage
High-quality test coverage is crucial for maintaining the reliability and stability of the codebase. Here's how you can add tests:
1. **Understand the Testing Framework**: Familiarize yourself with the testing framework used in the project. For Rust projects, this is typically `cargo test`.
2. **Write Meaningful Tests**: Your tests should cover a wide range of scenarios, including edge cases. Aim to test not just the "happy path" but also failure modes and error handling.
3. **Run Existing Tests**: Before adding new tests, run the existing test suite to ensure that your environment is correctly set up and that existing features work as expected.
4. **Add Your Tests**: Place your tests in the appropriate files or directories. If you're adding a new feature, consider creating a new test module for it.
5. **Document Your Tests**: Comment your tests well. Explain what each test does and why it's necessary. This helps others understand the purpose of your tests and can be especially helpful for complex test logic.
6. **Run Your Tests**: Run your tests to ensure they pass and adequately cover the new functionality or fixes. Check the test coverage if the project has specific tools or commands for that.
## Checklist Before Creating a Pull Request
Before submitting your pull request (PR), go through the following checklist to ensure your contribution is ready for review:
- [ ] **Tests**: Make sure you have added tests for your changes and that all tests (new and existing) pass successfully.
- [ ] **Documentation**: Update the README, docstrings, or any relevant documentation to reflect your changes or additions.
- [ ] **Build Passing**: Ensure that the project builds successfully with your changes. This includes passing all automated checks that the project has set up.
## Submitting Your Pull Request
Once you've gone through the checklist:
1. **Fork the Repository** (if you haven't already).
2. **Create a New Branch** for your changes.
3. **Commit Your Changes** with clear and detailed commit messages.
4. **Push Your Changes** to your fork.
5. **Open a Pull Request** against the original repository. Fill in the PR template (if any) with all the relevant details.
Thank you for contributing! We look forward to reviewing your contribution.