|
| 1 | +# Contributing |
| 2 | + |
| 3 | +Thank you for thinking of making a contribution! |
| 4 | + |
| 5 | +## Pull Request Process |
| 6 | + |
| 7 | +### 0. Before you begin |
| 8 | + |
| 9 | +If this is your first time contributing to an open source project, [start by reading this guide](https://opensource.guide/how-to-contribute/#how-to-submit-a-contribution). |
| 10 | + |
| 11 | +Please note that any contribution you make will be licensed under [the project's license](https://github.com/jxmorris12/language_tool_python/blob/master/LICENSE). |
| 12 | + |
| 13 | +### 1. Find something to work on |
| 14 | + |
| 15 | +The best contributions are those that try to resolve the [issues](https://github.com/jxmorris12/language_tool_python/issues). |
| 16 | + |
| 17 | +### 2. Fork the repository and make your changes |
| 18 | + |
| 19 | +If you want to contribute, you first need to fork the repo (and preferably create a branch with a name that says something about the changes you're going to make). |
| 20 | + |
| 21 | +To start developing, you can install all the necessary packages in your python environment with this command (optional dependencies will be installed): |
| 22 | +```shell |
| 23 | +pip install -e .[dev] |
| 24 | +``` |
| 25 | + |
| 26 | +When pushing commits, please use the project naming conventions, which are available in [this guide](https://www.conventionalcommits.org/en/v1.0.0/). |
| 27 | +If you haven't respected these conventions, do a rebase before making the pull request. |
| 28 | + |
| 29 | +The documentation style used in the project is **ReStructuredText**. Please, if you add or modify documentation, use this style. If you need more information or examples, look in the code, or in [this PEP](https://peps.python.org/pep-0287/) and [this guide](https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html). |
| 30 | + |
| 31 | +Before creating your pull request, when you have made all your commits, you need to run this: |
| 32 | +```shell |
| 33 | +# Run linters (maybe you will have to fix some issues) |
| 34 | +ruff check language_tool_python tests |
| 35 | + |
| 36 | +# Format code |
| 37 | +black language_tool_python tests |
| 38 | + |
| 39 | +# Tests |
| 40 | +pytest |
| 41 | +``` |
| 42 | + |
| 43 | +Please do not manually bump the version number in [pyproject.toml](./pyproject.toml), this will be handled by the maintainers during release. |
| 44 | + |
| 45 | +### 3. Checklist |
| 46 | + |
| 47 | +Before pushing and creating your pull request, you should make sure you've done the following: |
| 48 | + |
| 49 | +- Updated any relevant tests. |
| 50 | +- Updated any relevant documentation. This includes docstrings and [README](./README.md) file. |
| 51 | +- Added comments to your code where necessary (especially if the code is not self-explanatory). |
| 52 | +- Formatted your code, run the linters and tests. |
| 53 | + |
| 54 | +### 4. Create your pull request |
| 55 | + |
| 56 | +When you create your pull request, make sure you give it a name that clearly indicates what you have modified in the library. |
| 57 | + |
| 58 | +- Why the pull request was made |
| 59 | +- Summary of changes |
| 60 | +- If it resolves one or more issues, name them |
| 61 | +- If you have used external resources, mention them |
| 62 | + |
| 63 | +The best way to do this is to use the provided template when creating the pull request. |
| 64 | + |
| 65 | +### 5. Code review |
| 66 | + |
| 67 | +Your code will be reviewed by a maintainer. |
| 68 | + |
| 69 | +If you're not familiar with code review start by reading [this guide](https://google.github.io/eng-practices/review/). |
| 70 | + |
| 71 | +## Contacting the Maintainers |
| 72 | + |
| 73 | +As far as possible, communicate on github, in discussions on issues or pull requests. |
| 74 | + |
| 75 | +--- |
| 76 | + |
| 77 | +Thank you for helping make **language_tool_python** better for everyone! |
0 commit comments