Project

General

Profile

Contributing Code » History » Version 4

Davide Pesavento, 07/10/2018 01:14 PM

1 1 Alex Afanasyev
Contributing Code
2 4 Davide Pesavento
==============
3 1 Alex Afanasyev
4
NDN codebase is open-source and we welcome and encourage contributions from everybody.
5 4 Davide Pesavento
In order to ensure design and code quality, we have established a process that includes code review and continuous integration checks on a number of supported platforms. The following summarizes the process to contribute to NDN projects (NFD, ndn-cxx, ndn-tools, NFD-android, NLSR, ndnSIM, ChronoSync, repo-ng, and many others):
6 1 Alex Afanasyev
7 4 Davide Pesavento
- To inform NDN team about problems or to suggest new features, create an issue in the corresponding project on [NDN redmine](https://redmine.named-data.net)
8 1 Alex Afanasyev
9 4 Davide Pesavento
- All code submissions should go to our [code review system](https://gerrit.named-data.net)
10 1 Alex Afanasyev
11 4 Davide Pesavento
See also our [contributing guide](https://github.com/named-data/NFD/blob/master/CONTRIBUTING.md) for additional information.
12
13 1 Alex Afanasyev
### Code Review
14
15
The patches submitted for the code review are automatically checked for:
16
17
- successful compilation
18
- successful run of unit tests
19
- no errors produced while creating API (doxygen) documentation
20
21
### Recommended Checks Before Patch Submission
22
23
In order to facilitate code review process, please perform the following tests before submitting patches for code review:
24
25
#### Check that code and all unit tests compile.  For most of our project, the following is the recommended way to configure and build project
26
27
    ./waf configure --debug --with-tests
28
    ./waf
29
30
#### Check that unit tests do not fail.  Refer to project's documentation on how to run unit tests.
31
32 3 Davide Pesavento
NFD has 4 test suites:
33 1 Alex Afanasyev
34
     ./build/unit-tests-core
35
     ./build/unit-tests-daemon
36
     ./build/unit-tests-rib
37 3 Davide Pesavento
     ./build/unit-tests-tools
38 1 Alex Afanasyev
39 3 Davide Pesavento
ndn-cxx and most other projects have one test suite:
40 1 Alex Afanasyev
41
     ./build/unit-tests
42
43
#### Check that there are no errors in API (doxygen) documentation
44
45
To check for API documentation, doxygen needs to be installed.  To build documentation, run
46
47
    ./waf doxygen
48
49
All warnings produced by this command must be fixed in order for the automatic continuous integration checks to succeed.
50 2 Alex Afanasyev
51
**Note** that `./waf doxygen` will not rebuild documentation if there were no changes in source files.  To rebuild documentation without changing source files, run `./waf clean` before running `./waf doxygen`