-
Notifications
You must be signed in to change notification settings - Fork 1
/
contributing.html
executable file
·254 lines (217 loc) · 11.5 KB
/
contributing.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<!DOCTYPE html>
<html lang="en">
<head>
<base href=".">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>How to contribute</title>
<link rel="stylesheet" href="assets/css/dark-frontend.css" type="text/css" title="dark">
<link rel="alternate stylesheet" href="assets/css/light-frontend.css" type="text/css" title="light">
<link rel="stylesheet" href="assets/css/bootstrap-toc.min.css" type="text/css">
<link rel="stylesheet" href="assets/css/jquery.mCustomScrollbar.min.css">
<link rel="stylesheet" href="assets/js/search/enable_search.css" type="text/css">
<link rel="stylesheet" href="assets/css/extra_frontend.css" type="text/css">
<link rel="stylesheet" href="assets/css/prism-tomorrow.css" type="text/css" title="dark">
<link rel="alternate stylesheet" href="assets/css/prism.css" type="text/css" title="light">
<script src="assets/js/mustache.min.js"></script>
<script src="assets/js/jquery.js"></script>
<script src="assets/js/bootstrap.js"></script>
<script src="assets/js/scrollspy.js"></script>
<script src="assets/js/typeahead.jquery.min.js"></script>
<script src="assets/js/search.js"></script>
<script src="assets/js/compare-versions.js"></script>
<script src="assets/js/jquery.mCustomScrollbar.concat.min.js"></script>
<script src="assets/js/bootstrap-toc.min.js"></script>
<script src="assets/js/jquery.touchSwipe.min.js"></script>
<script src="assets/js/anchor.min.js"></script>
<script src="assets/js/tag_filtering.js"></script>
<script src="assets/js/language_switching.js"></script>
<script src="assets/js/styleswitcher.js"></script>
<script src="assets/js/lines_around_headings.js"></script>
<script src="assets/js/prism-core.js"></script>
<script src="assets/js/prism-autoloader.js"></script>
<script src="assets/js/prism_autoloader_path_override.js"></script>
<script src="assets/js/trie.js"></script>
<link rel="icon" type="image/png" href="assets/images/nnstreamer_logo.png">
</head>
<body class="no-script
">
<script>
$('body').removeClass('no-script');
</script>
<nav class="navbar navbar-fixed-top navbar-default" id="topnav">
<div class="container-fluid">
<div class="navbar-right">
<a id="toc-toggle">
<span class="glyphicon glyphicon-menu-right"></span>
<span class="glyphicon glyphicon-menu-left"></span>
</a>
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-wrapper" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span title="light mode switch" class="glyphicon glyphicon-sunglasses pull-right" id="lightmode-icon"></span>
<form class="navbar-form pull-right" id="navbar-search-form">
<div class="form-group has-feedback">
<input type="text" class="form-control input-sm" name="search" id="sidenav-lookup-field" placeholder="search" disabled>
<span class="glyphicon glyphicon-search form-control-feedback" id="search-mgn-glass"></span>
</div>
</form>
</div>
<div class="navbar-header">
<a id="sidenav-toggle">
<span class="glyphicon glyphicon-menu-right"></span>
<span class="glyphicon glyphicon-menu-left"></span>
</a>
<a id="home-link" href="index.html" class="hotdoc-navbar-brand">
<img src="assets/images/nnstreamer_logo.png" alt="Home">
</a>
</div>
<div class="navbar-collapse collapse" id="navbar-wrapper">
<ul class="nav navbar-nav" id="menu">
<li class="dropdown">
<a class="dropdown-toggle" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
API References<span class="caret"></span>
</a>
<ul class="dropdown-menu" id="modules-menu">
<li>
<a href="doc-index.html">NNStreamer doc</a>
</li>
<li>
<a href="gst/nnstreamer/README.html">NNStreamer Elements</a>
</li>
<li>
<a href="nnstreamer-example/index.html">NNStreamer Examples</a>
</li>
<li>
<a href="API-reference.html">API reference</a>
</li>
</ul>
</li>
<li>
<a href="doc-index.html">Documents</a>
</li>
<li>
<a href="gst/nnstreamer/README.html">Elements</a>
</li>
<li>
<a href="tutorials.html">Tutorials</a>
</li>
<li>
<a href="API-reference.html">API reference</a>
</li>
</ul>
<div class="hidden-xs hidden-sm navbar-text navbar-center">
</div>
</div>
</div>
</nav>
<main>
<div data-extension="core" data-hotdoc-in-toplevel="True" data-hotdoc-project="NNStreamer" data-hotdoc-ref="contributing.html" class="page_container" id="page-wrapper">
<script src="assets/js/utils.js"></script>
<div class="panel panel-collapse oc-collapsed" id="sidenav" data-hotdoc-role="navigation">
<script src="assets/js/full-width.js"></script>
<div id="sitenav-wrapper">
<iframe src="hotdoc-sitemap.html" id="sitenav-frame"></iframe>
</div>
</div>
<div id="body">
<div id="main">
<div id="page-description" data-hotdoc-role="main">
<h1 id="how-to-contribute">How to Contribute</h1>
<h2 id="coding-convention">Coding Convention</h2>
<p>Consistent code conventions are important for several reasons:</p>
<ul>
<li>
<em>Most importantly:</em> To make it easy to read and understand the code. Remember: you may be the only one writing the code initially, but many people will need to read, understand, modify, and fix the code over its lifetime. These conventions attempt to make this task much easier. If the code consistently follows these standards, it improves developer understanding across the entire source base.</li>
<li>To make it easy to debug the code, with both a system call tracer and GNU debuggers. It should be easy to set breakpoints, view locals, and display and view data structures.</li>
<li>To attempt to improve code quality through consistency, and requiring patterns that are less likely to result in bugs either initially, or after code modification.</li>
</ul>
<p>For more information, please refer to <a href="coding-convention.html">coding-convention.md</a>.</p>
<p>For C code, you may use <a href="https://github.com/nnstreamer/nnstreamer/blob/main/tools/development/gst-indent">gst-indent</a>.</p>
<p>For C++ code, you may apply clang-format with the given <a href="https://github.com/nnstreamer/nnstreamer/blob/main/.clang-format">.clang-format</a>.
For C/C++ header files, we do not require strict style rules, but it is recommended to apply such rules.</p>
<p>We do not have explicit and strict styling rules for other programming languages, yet.</p>
<h2 id="code-reviews-and-prs">Code Reviews and PRs</h2>
<p>You are encouraged to review incoming PRs; regardless whether you are a committer, a designated reviewer, or just a passer-by.</p>
<p>If you are a committer or a reviewer of the specific component, you are obligated to review incoming related PRs within some reasonable time frame.
However, even if you are not a reviewer (designated by committer or submitter), as long as you are in this project, you need to give feedback on PRs especially if you are working on similar topics/components.</p>
<p>The submitter has the first responsibility of keeping the created PR clean and neat (rebase whenever there are merge conflicts), following up the feedback, testing when needed.</p>
<h3 id="additional-requirements-for-codes">Additional requirements for codes</h3>
<ul>
<li>Each feature should come with a rich set of test cases that can be executed as unit tests during build. If the feature is more invasive or richer, you need more and richer test cases. Refer to other test cases in /tests directory, which use either GTest or SSAT.</li>
<li>When new test cases are introduced, the number of new negative test cases should be larger than or equal to the number of new positive test cases.</li>
<li>For C-code, try to stick with C89.</li>
<li>For C++-code, try to be compatible with C++11. C++ code should be able to be built optionally. In other words, by disabling C++ build option, we should be able to build the whole system without C++ compilers.</li>
<li>Avoid introducing additional dependencies of libraries. If you are going to use additional libraries, your codes may be located at /ext/* so that they can be "optional" features.</li>
<li>If your functions or structs/classes are going to be accessed by other modules or NNStreamer users, provide full descriptions of all entries with Doxygen.</li>
<li>Passing all the tests of TAOS-CI is a necessary condition, but not a satisfying condition.</li>
</ul>
<h3 id="merge-criteria">Merge Criteria</h3>
<p>A PR is required to meet the following criteria.</p>
<ul>
<li>It has passed all the tests defined for TAOS-CI.
<ul>
<li>This includes unit tests and integration tests in various platforms and different static analysis tools.</li>
<li>Note that one of the tests includes the "Signed-off-by" check, which means that the author has agreed with <a href="CODE_OF_CONDUCT.html">Code of Conduct</a>. You may need to refer to later section.</li>
</ul>
</li>
<li>At least TWO committers (reviewers with voting rights, elected by TSC or other committers) have approved the PR.
<ul>
<li>This is a necessary condition, not sufficient.</li>
<li>If the PR touches sensitive codes or may affect wide ranges of components, reviewers will wait for other reviewers to back them up.</li>
<li>If the PR is messy, you will need to wait indefinitely to get reviews.
<ul>
<li>Apply general rules of git commits and common senses.</li>
<li>Do not write a lengthy commit. Apply a single commit per PR if you are new to the community. Have a single topic per commit. Provide enough background information and references. And so on.</li>
</ul>
</li>
</ul>
</li>
<li>There is no rejections from any official reviewers.</li>
<li>There is no pending negative feedbacks (unresolved issues) from reviewers.</li>
<li>A committer with merging privilege will, then, be able to merge the given PR.</li>
</ul>
<h2 id="signing-off-commits">Signing off commits</h2>
<p>Each commit is required to be signed-off by the corresponding author.
With properly configured development environment, you can add sign-off for a commit with <code>-s</code> option: e.g., <code>git commit -s</code>.
<a href="https://stackoverflow.com/questions/1962094/what-is-the-sign-off-feature-in-git-for">Here is some stories on sign-off</a></p>
<ul>
<li>How to give the developers zero cost:</li>
</ul>
<pre><code class="language-bash">$ vi ~/.gitconfig
[user]
name = Gildong Hong
email = [email protected]
$ git commit -s <file-name>
// -s (--signoff) means automated signed-off-by statement
</code></pre>
<h3 id="what-does-it-mean-to-sign-off-commits-for-authors">What does it mean to sign off commits for authors?</h3>
<p>Including a "Signed-off-by:" tag in your commit means that you are making the Developer Certificate of Origin (DCO) certification for that commit. A copy of the DCO text can be found at https://developercertificate.org/</p>
<h2 id="how-to-contribute-to-gstreamer-community">How to contribute to GStreamer community</h2>
<ul>
<li>https://gstreamer.freedesktop.org/documentation/contribute/index.html</li>
</ul>
</div>
</div>
<div id="search_results">
<p>The results of the search are</p>
</div>
<div id="footer">
</div>
</div>
<div id="toc-column">
<div class="edit-button">
</div>
<div id="toc-wrapper">
<nav id="toc"></nav>
</div>
</div>
</div>
</main>
<script src="assets/js/navbar_offset_scroller.js"></script>
</body>
</html>