|
| 1 | +# Contributing to LogicalPy |
| 2 | + |
| 3 | +The project welcomes any type of contribution. |
| 4 | +This document provides guidelines concerning how to contribute to LogicalPy. |
| 5 | + |
| 6 | +## How to make contributions |
| 7 | + |
| 8 | +### 1. Fork the project |
| 9 | + |
| 10 | +First, fork the project in GitHub. |
| 11 | +Then, you can clone your forked repository to your local computer: |
| 12 | + |
| 13 | +``` |
| 14 | +git clone https://github.com/<your-username>/logicalpy.git |
| 15 | +cd logicalpy |
| 16 | +``` |
| 17 | + |
| 18 | +### 2. Set up your development environment |
| 19 | + |
| 20 | +In order to contribute to the project, you will need to install it locally. |
| 21 | + |
| 22 | + - You can first optionally create a virtual environment |
| 23 | + - Then, locally install the project in editable mode with: |
| 24 | + ``` |
| 25 | + pip install -e . |
| 26 | + ``` |
| 27 | +
|
| 28 | +### 3. Make and commit your changes |
| 29 | +
|
| 30 | +Once your are ready, create a new branch, make your changes and commit them with |
| 31 | +descriptive messages (preferably use the past tence). |
| 32 | +
|
| 33 | +### 4. Create a pull request |
| 34 | +
|
| 35 | +After pushing your changes to your forked repository, create a pull request to the |
| 36 | +`master` branch of the original repository. Provide a clear explanation of what you have done, |
| 37 | +as well as any relevant context. |
| 38 | +
|
| 39 | +### 5. Review and merge |
| 40 | +
|
| 41 | +Your pull request will then be reviewed, and once it has been approved, it will be |
| 42 | +merged to the main project 🎉. |
| 43 | +
|
| 44 | +## Code style and testing guidelines |
| 45 | +
|
| 46 | +To meet the project's code style, please format the code with `black` using the command |
| 47 | +`black <path-to-the-code>`. (The maximum line length used is the default one, i.e. 88 |
| 48 | +characters). |
| 49 | +
|
| 50 | +If you implement any new feature or change an existing one, please update the tests in |
| 51 | +consequence. |
| 52 | +
|
| 53 | +For any modification you make, ensure the tests still pass by running (from the main folder |
| 54 | +or from the `tests` folder): |
| 55 | +
|
| 56 | +``` |
| 57 | +python -m unittest |
| 58 | +``` |
| 59 | +
|
| 60 | +## Opening an issue |
| 61 | +
|
| 62 | +If you find a bug or issue in the project, please [open an issue](https://github.com/Cubix1729/logicalpy/issues/new) |
| 63 | +to report it. Be sure to include: |
| 64 | +
|
| 65 | + - A clear description of the bug |
| 66 | + - How to reproduce it |
| 67 | + - Expected and actual behaviour |
| 68 | + - The error message if there is one |
| 69 | + - The LogicalPy version used and your environment setup |
| 70 | +
|
| 71 | +You can also open an issue if you want to suggest a feature or if you have a question. |
| 72 | +
|
| 73 | +## Thank you |
| 74 | +
|
| 75 | +Thank you for your interest in contributing to LogicalPy! |
| 76 | +
|
| 77 | +Happy propositional logic and programming! 🤓👨💻 |
0 commit comments