Policies » Historie » Verze 27
Jan Pašek, 2021-03-29 08:10
1 | 27 | Jan Pašek | h1. Project guidelines |
---|---|---|---|
2 | 1 | Jan Pašek | |
3 | h2. Git |
||
4 | 6 | Jan Pašek | |
5 | 13 | Jan Pašek | *Commits* |
6 | |||
7 | 12 | Jan Pašek | Commit message shall have the following format: |
8 | <pre> |
||
9 | 24 | Jan Pašek | Re #<id> - <short description> <details> |
10 | 12 | Jan Pašek | </pre> |
11 | |||
12 | * *id* issue ID from the Redmine |
||
13 | * *short description* brief description of the change |
||
14 | * *details* detailed list of changes (added classes, changed interfaces, ...) |
||
15 | 13 | Jan Pašek | |
16 | Each commit shall have a reasonable size to make the reviews as simple as possible. |
||
17 | |||
18 | *Branches* |
||
19 | |||
20 | 20 | Jan Pašek | The name of the branch shall follow the following format: |
21 | |||
22 | <pre> |
||
23 | #<id>_<description> |
||
24 | </pre> |
||
25 | |||
26 | 21 | Jan Pašek | * *id* RedMine issue ID |
27 | * *description* short description of the change based issue name - without special characters, words separated by underscores |
||
28 | 20 | Jan Pašek | |
29 | # For each issue, a new branch shall be created. |
||
30 | 13 | Jan Pašek | # When the work on a branch is finished by the *issue owner*, the work is posted for a code review. |
31 | # After that, the code can be merged to master by the *reviewer*. |
||
32 | # After the merge, the *reviewer* is responsible for verifying software integrity. |
||
33 | 14 | Jan Pašek | # _In case the integrity of the software is seriously broken, the task can be returned to the *issue owner*._ |
34 | |||
35 | *Code review* |
||
36 | |||
37 | * Reviewer walks through the code and checks the coding convention, code readability, stability, etc... |
||
38 | * Reviewer is responsible for basic functionality testing |
||
39 | 17 | Jan Pašek | * Code review is tracked in GitLab via merge request |
40 | 11 | Jan Pašek | |
41 | 1 | Jan Pašek | h2. RedMine |
42 | 2 | Jan Pašek | |
43 | 16 | Jan Pašek | * Everyone can create an issue |
44 | 25 | Jan Pašek | * New issues must have the following fields filled in: Type, Title, Description, State = New |
45 | 19 | Jan Pašek | * Optionally one can set parent issue or watchers |
46 | * One has to update the spent time periodically |
||
47 | |||
48 | +Description:+ |
||
49 | * Administrative: What has to be done, possible Wiki page references, what are the work products (where to store them - eg. in DMS), what shall the work products contain |
||
50 | * Functional: Description of the change, possible references to the requirement |
||
51 | |||
52 | 22 | Jan Pašek | h3. Issue life cycle |
53 | 1 | Jan Pašek | |
54 | 23 | Jan Pašek | * When the issue is created it starts in the state @New@ |
55 | * During iteration planning the issue effort is estimated with the team, iteration reference is set and the issue is set to state @Accepted@ |
||
56 | * After effort planning is done for all issue, the issue is assigned to a team member and the issue moves to @Assigned@ |
||
57 | * After the assignee finishes his work, the issue is moved to @Resolved@ |
||
58 | * When work products are checked/reviewed, the issue is moved to @Verified@ |
||
59 | * During retrospective the issues are evaluated and moved to @Closed@ |
||
60 | 16 | Jan Pašek | |
61 | 26 | Jan Pašek | h3. Issue types |
62 | |||
63 | * *Bug* - fix of software error found during testing or review |
||
64 | * *Enhancement* - Improvement (that is not specified in requirement specification) of an already implemented feature based on feedback from the customer or a team. |
||
65 | * *Feature* - Implementation of a new functionality based on requirement specification document. |
||
66 | * *Task* - Any non-implementation/administrative task such as administrative or analysis. |
||
67 | |||
68 | 4 | Jan Pašek | h2. Code |
69 | 5 | Jan Pašek | |
70 | h3. General |
||
71 | |||
72 | * Code and all comments shall be written in English |
||
73 | 9 | Jan Pašek | * Code review is done for all code changes |
74 | * Unit tests are done for all business logic parts |
||
75 | 5 | Jan Pašek | * Python docstrings (bellow function header) shall be created for all functions describing the purpose, inputs and outputs |
76 | * Avoid using names that are too general or too wordy. Strike a good balance between the two |
||
77 | * When using CamelCase names, capitalize all letters of an abbreviation (e.g. HTTPServer) |
||
78 | |||
79 | h3. Packages |
||
80 | |||
81 | * Package names should be all lower case |
||
82 | * When multiple words are needed, an underscore should separate them |
||
83 | * It is usually preferable to stick to 1-word names |
||
84 | |||
85 | h3. Modules |
||
86 | |||
87 | * Module names should be all lower case |
||
88 | * When multiple words are needed, an underscore should separate them |
||
89 | * It is usually preferable to stick to 1 word names |
||
90 | |||
91 | h3. Classes |
||
92 | |||
93 | * Class names should follow the UpperCaseCamelCase convention |
||
94 | * Exception classes should end in “Error” |
||
95 | |||
96 | h3. Global Variables |
||
97 | |||
98 | * Global variables should be all lowercase |
||
99 | * Words in a global variable name should be separated by an underscore |
||
100 | |||
101 | h3. Instance Variables |
||
102 | |||
103 | * Instance variable names should be all lower case |
||
104 | * Words in an instance variable name should be separated by an underscore |
||
105 | 10 | Jan Pašek | * Non-public instance variables should begin with a double underscore |
106 | * If a protected attribute is necessary to be used, the variable name shall start with a single underscore |
||
107 | 5 | Jan Pašek | * If an instance name needs to be mangled (interpreter rewrites the name in order to avoid name conflicts in subclasses), two underscores may begin its name |
108 | |||
109 | h3. Methods |
||
110 | |||
111 | * Method names should be all lower case |
||
112 | * Words in a method name should be separated by an underscore |
||
113 | * Non-public method should begin with a single underscore |
||
114 | * If a method name needs to be mangled, two underscores may begin its name |
||
115 | |||
116 | h3. Method Arguments |
||
117 | |||
118 | * Instance methods should have their first argument named ‘self’. |
||
119 | * Class methods should have their first argument named ‘cls’ |
||
120 | |||
121 | h3. Functions |
||
122 | |||
123 | * Function names should be all lower case |
||
124 | * Words in a function name should be separated by an underscore |
||
125 | |||
126 | h3. Constants |
||
127 | |||
128 | * Constant names must be fully capitalized |
||
129 | * Words in a constant name should be separated by an underscore |