|
1 |
| -# How to contribute to UTBot Java |
| 1 | +# UnitTestBot contributing guide |
2 | 2 |
|
3 |
| -To begin with, we are very thankful for your time and willingness to read this and contribute! |
| 3 | +--- |
4 | 4 |
|
5 |
| -The following guideline should help you with suggesting changes to our project, so feel free to use it for your contribution. 😃 |
| 5 | +## Welcome! |
6 | 6 |
|
| 7 | +Hello and thanks for reading this! |
7 | 8 |
|
8 |
| -## I\`ve found a bug! How to report? |
| 9 | +As the UnitTestBot core team we develop tools for automated unit test generation to help programmers test their code |
| 10 | +in a more effective way with less effort. We believe that software development is great fun when you spend your time |
| 11 | +finding creative solutions and automate the things you already know. If you are curious about making test generation |
| 12 | +fast, smart and reliable, we are happy to invite you for contributing! |
9 | 13 |
|
10 |
| -First of all, please check our [Issues](https://github.com/UnitTestBot/UTBotJava/issues) — this bug may have already been reported, and you just don\`t need to spend your time on a new one. |
| 14 | +We welcome absolutely everyone. With one big and kind request: please follow these guidelines to make our communication smooth and to keep UnitTestBot improving. |
11 | 15 |
|
12 |
| -If you haven\`t found the relevant issue, don\`t hesitate to [create a new one](https://github.com/UnitTestBot/UTBotJava/issues/new?assignees=&labels=&template=bug_report.md&title=), including as much detail as possible — the pre-made template will assist you in it. |
| 16 | +## Contributions we are looking for |
13 | 17 |
|
14 |
| -In case you already have a PR with a solution, please remain so amazing and link it with the created issue. |
| 18 | +There are so many ways to contribute. Choose yours and find the relevant short guide below. |
15 | 19 |
|
| 20 | +|(1) Choose what you like and check the guideline:| (2) Contribute: | |
| 21 | +|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------| |
| 22 | +|Reporting a bug| Create a [bug reporting issue](https://github.com/UnitTestBot/UTBotJava/issues/new?assignees=&labels=&template=bug_report.md&title=) | |
| 23 | +|Suggesting a feature| Create a [feature suggestion issue](https://github.com/UnitTestBot/UTBotJava/issues/new?assignees=&labels=&template=feature_request.md&title=) | |
| 24 | +|Contributing the code (bug fix or feature implementation)| Create a pull request | |
| 25 | +|Reproducing a reported bug| Comment on the issue | |
| 26 | +|Testing a pull request| Comment on the pull request | |
| 27 | +|Improving documentation| Create an issue<br/>Create a pull request<br/>Comment on issues and PRs | |
| 28 | +|Sharing ideas| Start the [Discussion](https://github.com/UnitTestBot/UTBotJava/discussions) or join the existing one | |
16 | 29 |
|
17 |
| -## I have an improvement suggestion! |
18 |
| -Want a new feature or to change the existing one? We are very welcome your fresh ideas. 😃 |
| 30 | +# How to submit a contribution |
19 | 31 |
|
20 |
| -Please [create an issue](https://github.com/UnitTestBot/UTBotJava/issues/new?assignees=&labels=&template=feature_request.md&title=) with your proposal and describe your idea with full information about it. By adding some examples you also bring much happiness to our souls! |
| 32 | +## Reporting a bug |
21 | 33 |
|
22 |
| -Give us some time to review your proposal and provide you with our feedback. It will be decided who is preparing the pull request: we may need your help or we will take care of it all. 🙂 |
| 34 | +1. Check if the bug (a true bug!) has already been reported: search through [UnitTestBot issues](https://github.com/UnitTestBot/UTBotJava/issues). Please, don't duplicate. |
| 35 | +2. Check with the [Naming and labeling conventions](Conventions.md). |
| 36 | +3. Make sure you have all the necessary information as per [template](https://github.com/UnitTestBot/UTBotJava/issues/new?assignees=&labels=&template=bug_report.md&title=) and create the bug reporting issue. |
23 | 37 |
|
| 38 | +## Requesting a feature |
24 | 39 |
|
25 |
| -## Coding conventions |
26 |
| -Our team adheres to the defined requirements to coding style to optimize for readability. You can take a look on this [Coding style guide](https://github.com/saveourtool/diktat/blob/master/info/guide/diktat-coding-convention.md) to better understand what we expect to see in your code. |
| 40 | +1. Check if the feature has already been requested: search through [UnitTestBot issues](https://github.com/UnitTestBot/UTBotJava/issues). |
| 41 | +2. Check with our [Naming and labeling conventions](Conventions.md). |
| 42 | +3. Make sure you are able to provide all the necessary information as per [template](https://github.com/UnitTestBot/UTBotJava/issues/new?assignees=&labels=&template=feature_request.md&title=) and create the feature request issue. |
27 | 43 |
|
| 44 | +## Contributing the code (bug fix or feature implementation) |
28 | 45 |
|
29 |
| -## Naming conventions |
30 |
| -We have been using GitHub for a while, and now we have a couple of tips for naming issues, commits and pull requests (PRs). You are welcome to stick to them too 🙂 |
| 46 | +### "Good first issue" |
31 | 47 |
|
32 |
| -Our favorite recipes are: |
| 48 | +If you have little experience in contributing, try to resolve the issues labeled as the ["good first"](https://github.com/UnitTestBot/UTBotJava/contribute) ones. |
33 | 49 |
|
34 |
| - **issue title = feature request or bug description + issue ID** |
| 50 | +### Small or "obvious" fixes |
35 | 51 |
|
36 |
| - **commit message = PR title = fix description + issue ID + (PR number)** |
| 52 | +Do you need to create an issue if you want to fix a bug? |
37 | 53 |
|
38 |
| -How to insert the issue ID into the commit message and the PR title?<br> |
39 |
| -— Manually. |
| 54 | +* Quick fix → no issue → pull request. |
| 55 | +* Takes time to fix → detailed issue → pull request. |
40 | 56 |
|
41 |
| -How to append the PR number to the PR title?<br> |
42 |
| -— It appends automatically. |
| 57 | +### General flow for contributing code |
43 | 58 |
|
44 |
| -How to insert the PR number into the commit message?<br> |
45 |
| -— *Push* the feature branch + *Create pull request* on GitHub and then →<br> |
46 |
| -1) The preferred and the easiest flow: |
47 |
| -<br>*Squash and merge* on GitHub → the PR number automatically appends to the resulting commit message |
48 |
| -2) The flow for advanced users: |
49 |
| -<br>(a) squash the commits locally → insert the PR number in parentheses (!) manually into the resulting commit |
50 |
| - message + *Force Push* the resulting commit → *Rebase and merge* on GitHub |
51 |
| -<br>or |
52 |
| -<br>(b) change the commit message locally → insert the PR number in parentheses (!) manually + *Force Push* the |
53 |
| - commit → *Rebase and merge* on GitHub |
| 59 | +1. Make sure you've carefully read the [Legal notes](#Legal-notes)! |
| 60 | +2. Create your own fork of the code. |
| 61 | +3. Clone the forked repository to your local machine. |
| 62 | +4. Implement changes. Please refer to the [Developer guide](DEVNOTE.md) for **system requirements**, **code |
| 63 | + style** and |
| 64 | + **steps for building the project**. |
| 65 | +5. Test your code: |
| 66 | + * Before creating the pull request perform the tests you find necessary for your code changes. |
| 67 | + * When implementing something new, it's great to find real users and ask them to try out your feature — to prove |
| 68 | + the necessity and quality of your suggestion. |
| 69 | +6. Check with the [Naming and labeling conventions](Conventions.md). |
| 70 | +7. Create the pull request, and you'll see if the automated tests pass on GitHub. Your reviewer will possibly recommend |
| 71 | + you more tests. |
54 | 72 |
|
| 73 | +## Reproducing a reported bug |
55 | 74 |
|
56 |
| -## How to setup development environment? |
| 75 | +If you reproduce an existing issue and it helps to get some additional context on the problem, feel free to comment on the issue. |
57 | 76 |
|
58 |
| -Please refer [Developer guide](https://github.com/UnitTestBot/UTBotJava/blob/main/DEVNOTE.md) to setup developer environment, build and run UTBot. |
| 77 | +## Testing a pull request |
59 | 78 |
|
| 79 | +You can merge a pull request into your local copy of the project and test the changes. If you find something you'd like to share, add the outcome of your testing in a comment on the pull request. |
60 | 80 |
|
61 |
| -## How to test you PR? |
| 81 | +## Improving documentation |
62 | 82 |
|
63 |
| -Currently, not all checks are automized. It's required to do manual testing after PR. |
| 83 | +Here at UnitTestBot we regard documentation as code. It means that the general flow for writing and reviewing docs |
| 84 | +is the same as for the code. If you'd like to improve the existing docs or to add something new, please follow the flow: |
| 85 | + |
| 86 | +1. Make sure you've carefully read the [Legal notes](#Legal-notes)! |
| 87 | +2. Create your own fork of the code. |
| 88 | +3. Clone the forked repository to your local machine. |
| 89 | +4. Implement changes to docs (change the existing doc or create a new one). Usually, we create a new doc for a new feature, not for the small fixes. You are not obliged to write a detailed text about the feature you implement. You have to only describe it properly in both the related issue and the pull request, but it will be great if you still provide some docs. |
| 90 | +6. Check with the [Naming and labeling conventions](Conventions.md). |
| 91 | +7. Create the pull request, and we'll review it. |
| 92 | + |
| 93 | +* You can request a new doc — create an issue, using the [guide for a feature request](#Requesting-a-feature). |
| 94 | +* You can comment on the docs-related issues or PRs. |
| 95 | + |
| 96 | +## Sharing ideas |
| 97 | + |
| 98 | +We have a lot of new ideas, but we always need more! |
| 99 | + |
| 100 | +These are our main areas of interest: |
| 101 | + |
| 102 | +* technologies for code analysis, generating unit tests, e. g. symbolic execution, fuzzing, machine learning, etc.; |
| 103 | +* real-life examples of using UnitTestBot, as well as possible use cases, scenarios and user stories; |
| 104 | +* practices and problems or UX research related to unit testing with or without automated test generation tools. |
| 105 | + |
| 106 | +If you are keen on these things too, please share your ideas with us. Even if they are sketchy and not ready for being implemented or even requested right now, go ahead and join the existing [Discussions](https://github.com/UnitTestBot/UTBotJava/discussions) or [start](https://github.com/UnitTestBot/UTBotJava/discussions/new) the new one. |
| 107 | + |
| 108 | +# Code review process |
| 109 | +Please choose [denis-fokin](https://github.com/denis-fokin) as a reviewer. He will reassign your PR to someone else from the core team, if necessary. |
| 110 | + |
| 111 | +We do our best in reviewing, but we can hardly specify the exact timeout for it. Be sure that we'll certainly answer your pull request! |
| 112 | + |
| 113 | +# Legal notes |
| 114 | + |
| 115 | +By contributing, you agree that your contributions will be licensed under the [Apache License 2.0](https://github.com/UnitTestBot/UTBotJava/blob/main/LICENSE). |
| 116 | + |
| 117 | +Feel free to [contact us directly](https://www.utbot.org/contact/) if that's a concern. |
0 commit comments