|
1 | | -How to contribute |
| 1 | +Contributing to PINA |
| 2 | +===================== |
| 3 | + |
| 4 | +First off, thanks for taking the time to contribute to **PINA**! 🎉 Your help makes the project better for everyone. This document outlines the process for contributing, reporting issues, suggesting features, and submitting pull requests. |
| 5 | + |
| 6 | +Table of Contents |
| 7 | +================= |
| 8 | + |
| 9 | +1. `How to Contribute`_ |
| 10 | +2. `Reporting Bugs`_ |
| 11 | +3. `Suggesting Enhancements`_ |
| 12 | +4. `Pull Request Process`_ |
| 13 | +5. `Code Style & Guidelines`_ |
| 14 | +6. `Community Standards`_ |
| 15 | + |
| 16 | +How to Contribute |
2 | 17 | ================= |
3 | 18 |
|
4 | | -We'd love to accept your patches and contributions to this project. There are just a few small guidelines you need to follow. |
| 19 | +You can contribute in several ways: |
| 20 | + |
| 21 | +- Reporting bugs |
| 22 | +- Suggesting features/enhancements |
| 23 | +- Submitting fixes or improvements via Pull Requests (PRs) |
| 24 | +- Improving documentation |
| 25 | + |
| 26 | +We encourage all contributions, big or small! |
| 27 | + |
| 28 | +Reporting Bugs |
| 29 | +============== |
| 30 | + |
| 31 | +If you find a bug, please open an `issue <https://github.com/mathLab/PINA/issues>`_ and include: |
| 32 | + |
| 33 | +- A clear and descriptive title |
| 34 | +- Steps to reproduce the problem |
| 35 | +- What you expected to happen |
| 36 | +- What actually happened |
| 37 | +- Any relevant logs, screenshots, or error messages |
| 38 | +- Environment info (OS, Python version, dependencies, etc.) |
| 39 | + |
| 40 | +Suggesting Enhancements |
| 41 | +======================= |
| 42 | + |
| 43 | +We welcome new ideas! If you have an idea to improve PINA: |
| 44 | + |
| 45 | +1. Check the `issue tracker <https://github.com/mathLab/PINA/issues>`_ or the `discussions <https://github.com/mathLab/PINA/discussions>`_ to see if someone has already suggested it. |
| 46 | +2. If not, open a new issue describing: |
| 47 | + - The enhancement you'd like |
| 48 | + - Why it would be useful |
| 49 | + - Any ideas on how to implement it (optional but helpful) |
| 50 | +3. If you are not sure about (something of) the enhancement, we suggest opening a discussion to collaborate on it with the PINA community. |
| 51 | + |
| 52 | +Pull Request Process |
| 53 | +==================== |
| 54 | + |
| 55 | +Before submitting a PR: |
| 56 | + |
| 57 | +1. Ensure there’s an open issue related to your contribution (or create one). |
| 58 | +2. `Fork <https://help.github.com/articles/fork-a-repo>`_ the repository and create a new branch from ``master``: |
| 59 | + |
| 60 | + .. code-block:: bash |
| 61 | +
|
| 62 | + git checkout -b feature/my-feature |
| 63 | +
|
| 64 | +3. Make your changes: |
| 65 | + - Write clear, concise, and well-documented code |
| 66 | + - Add or update tests where appropriate |
| 67 | + - Update documentation if necessary |
| 68 | +4. Verify your changes by running tests: |
| 69 | + |
| 70 | + .. code-block:: bash |
| 71 | +
|
| 72 | + pytest |
| 73 | +
|
| 74 | +5. Properly format your code. If you want to save time, simply run: |
| 75 | + |
| 76 | + .. code-block:: bash |
| 77 | +
|
| 78 | + bash code_formatter.sh |
5 | 79 |
|
6 | | -Submitting a patch |
7 | | ------------------- |
| 80 | +7. Submit a `pull request <https://help.github.com/articles/creating-a-pull-request>`_ with a clear explanation of your changes and reference the related issue if applicable. |
8 | 81 |
|
9 | | - 1. It's generally best to start by opening a new issue describing the bug or |
10 | | - feature you're intending to fix. Even if you think it's relatively minor, |
11 | | - it's helpful to know what people are working on. Mention in the initial |
12 | | - issue that you are planning to work on that bug or feature so that it can |
13 | | - be assigned to you. |
| 82 | +Pull Request Checklist |
14 | 83 |
|
15 | | - 2. Follow the normal process of forking the project, and setup a new |
16 | | - branch to work in. It's important that each group of changes be done in |
17 | | - separate branches in order to ensure that a pull request only includes the |
18 | | - commits related to that bug or feature. |
| 84 | +1. Code follows the project’s style guidelines |
| 85 | +2. Tests have been added or updated |
| 86 | +3. Documentation has been updated if necessary |
| 87 | +4. Pull request is linked to an open issue (if applicable) |
19 | 88 |
|
20 | | - 3. To ensure properly formatted code, please make sure to use 4 |
21 | | - spaces to indent the code. The easy way is to run on your bash the provided |
22 | | - script: ./code_formatter.sh. You should also run pylint over your code. |
23 | | - It's not strictly necessary that your code be completely "lint-free", |
24 | | - but this will help you find common style issues. |
| 89 | +Code Style & Guidelines |
| 90 | +======================= |
25 | 91 |
|
26 | | - 4. Any significant changes should almost always be accompanied by tests. The |
27 | | - project already has good test coverage, so look at some of the existing |
28 | | - tests if you're unsure how to go about it. We're using coveralls that |
29 | | - is an invaluable tools for seeing which parts of your code aren't being |
30 | | - exercised by your tests. |
| 92 | +- Follow PEP8 for Python code. |
| 93 | +- Use descriptive commit messages (e.g. ``Fix parser crash on empty input``). |
| 94 | +- Write clear docstrings for public classes, methods, and functions. |
| 95 | +- Keep functions small and focused; do one thing and do it well. |
31 | 96 |
|
32 | | - 5. Do your best to have well-formed commit messages for each change. |
33 | | - This provides consistency throughout the project, and ensures that commit |
34 | | - messages are able to be formatted properly by various git tools. |
| 97 | +Community Standards |
| 98 | +=================== |
35 | 99 |
|
36 | | - 6. Finally, push the commits to your fork and submit a pull request. Please, |
37 | | - remember to rebase properly in order to maintain a clean, linear git history. |
| 100 | +By participating in this project, you agree to abide by our Code of Conduct. We are committed to maintaining a welcoming and inclusive community. |
0 commit comments