|
1 | | -# Contribution and development guidelines |
2 | | -## Code guidelines |
| 1 | +# Coding guidelines |
3 | 2 |
|
4 | 3 | Your code should follow the [Python Coding Guidelines](https://leapp.readthedocs.io/en/latest/contributing.html#follow-python-coding-guidelines) used for the leapp project. On top of these rules follow instructions |
5 | 4 | below. |
@@ -84,53 +83,3 @@ guaranteed to exist and executable. |
84 | 83 | The use of the {py:mod}`subprocess` library is forbidden in leapp repositories. |
85 | 84 | Use of the library would require very good reasoning, why the |
86 | 85 | {py:func}`~leapp.libraries.stdlib.run` function cannot be used. |
87 | | - |
88 | | -## Commits and pull requests (PRs) |
89 | | -### PR description |
90 | | -The description should contain information about all introduced changes: |
91 | | -* What has been changed |
92 | | -* How it has been changed |
93 | | -* The reason for the change |
94 | | -* How could people try/test the PR |
95 | | -* Reference to a Jira ticket, Github issue, ... if applicable |
96 | | - |
97 | | -Good description provides all information for readers without the need to |
98 | | -read the code. Note that reviewers can decline to review the PR with a poor |
99 | | -description. |
100 | | - |
101 | | -### Commit messages |
102 | | -When your pull-request is ready to be reviewed, every commit needs to include |
103 | | -a title and a body continuing a description of the change --- what problem is |
104 | | -being solved and how. The end of the commit body should contain Jira issue |
105 | | -number (if applicable), GitHub issue that is being fixed, etc.: |
106 | | -``` |
107 | | - Commit title |
108 | | -
|
109 | | - Commit message body on multiple lines |
110 | | -
|
111 | | - Jira-ref: <ticket-number> |
112 | | -``` |
113 | | - |
114 | | -Note that good commit message should provide information in similar way like |
115 | | -the PR description. Poorly written commit messages can block the merge of PR |
116 | | -or proper review. |
117 | | - |
118 | | -### Granularity of commits |
119 | | -The granularity of commits depends strongly on the problem being solved. However, |
120 | | -a large number of small commits is typically undesired. If possible, aim a |
121 | | -Git history such that commits can be reverted individually, without requiring reverting |
122 | | -numerous other dependent commits in order to get the `main` branch into a working state. |
123 | | - |
124 | | -Note that commits fixing problems of other commits in the PR are expected to be |
125 | | -squashed before the final review and merge of the PR. Using of `git commit --fixup ...` |
126 | | -and `git commit --squash ...` commands can help you to prepare such commits |
127 | | -properly in advance and make the rebase later easier using `git rebase -i --autosquash`. |
128 | | -We suggest you to get familiar with these commands as it can make your work really |
129 | | -easier. Note that when you are starting to get higher number of such fixing commits |
130 | | -in your PR, it's good practice to use the rebase more often. High numbers of such |
131 | | -commits could make the final rebase more tricky in the end. So your PR should not |
132 | | -have more than 15 commits at any time. |
133 | | - |
134 | | -### Create a separate git branch for your changes |
135 | | -TBD |
136 | | - |
0 commit comments