Documentation Contribution Guide¶
- There are 2 types of documentations in DI-engine:
- Any users are welcomed to help make the Docs more comprehensive, specific Doc’s implementation guide are as follows:
All substantial updates (adding new modules, editing the content immensely, etc) should be made by
Merge Requestssubmissions. Developers can update at a new branch, and other users, when contributing to Doc, should fork the project to create a new branch and work on this corresponding branch for implementations. Merge Requests need to be submitted with template and include both clear descriptions on the updated contents and specify a review-assignee;Developers submitting minor updates (e.g. correct minor typos/errors) can work directly on the corresponding branch(es);
When creating new pages, please update upper-level indices to prevent faulty navigation jumps;
Before submitting a new commit, please preview the documentation on a local repository to ensure both navigation correctness and format correctness. (Corresponding python packages (sphinx etc.) required for preview, the specific dependency list is in
ding/setup.py) Procedure as follows:Inside the
docdirectory, runmake htmlto generate corresponding files; keep in mind that Sphinx builds only updated files. For comprehensive preview, touch each file, deletebuild, or you can runmake cleanbefore runningmake html;Inside
doc/build, use browser to open fileindex.html(or runopen build/html/index.html, note that the path might vary by sphinx action) to enter the main page.
The project requries rst language for the Doc’s implementation. And the contributor can also access Online rst editor to test the related syntax.
Implementation of the Docs can be in Chinese or English. In the premise of clear articulation, use English as much as possible. When choosing to implement in English, please note the following rules:
Proper capitalization at the beginning of a sentence;
Avoid incorrect usage of
,as if using Chinese and use;or.instead when separating sentences;Please keep in mind the full-width and half-width symbols (especially
()and()); use corresponding symbols for the language used.
When implementing the part of the Docs that is difficult to articulate clearly, we recommend pinning code snippets, graphs, as well as tables to help make comprehensive illustrations (including but not limited to UML graphs, flow-chart, etc.).