Difference between revisions of "CSIT/Submitting Patches"

From fd.io
Jump to: navigation, search
(Add "Code style choices" section)
(Replaced content with "__TOC__")
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
__TOC__
 
__TOC__
 
== Submitting Patches ==
 
The VPP wiki has a nice set of instructions for [[VPP/Pulling,_Building,_Running,_Hacking_and_Pushing_VPP_Code#Pushing_Code_with_git_review | Pushing Code with git review]].  The same process is recommended for submitting patches to the CSIT git repository.
 
 
== Commit Message Headline Nomenclature ==
 
When committing code to the CSIT repository and pushing patches to gerrit, please add a prefix to the headline of the commit message that contains the Jira ticket id, "DO_NOT_MERGE" or both:
 
*<b><code>CSIT-<###>:</code></b> <i>Summary of patch</i>
 
*<b><code>DO_NOT_MERGE:</code></b> <i>Summary of patch</i>
 
* both ( <b><code>DO_NOT_MERGE CSIT-<###>:</code></b> <i>Summary of patch</i> )
 
Note: DO_NOT_MERGE should always be at the beginning of the line when present.
 
 
Here are some examples:
 
 
CSIT-60: Create l2-vlan-dot1ad libraries for perf testing
 
 
DO_NOT_MERGE: test VXLAN + VLAN on newer version of VPP.
 
 
DO_NOT_MERGE CSIT-156: DPDK support for Nested VM image
 
 
Using this nomenclature makes the [https://gerrit.fd.io/r/#/q/status:open+project:csit CSIT gerrit open patches list] easier to manage for CSIT committers and code reviewers.
 
 
== Verify documentation locally ==
 
Directory resources/tools/doc_gen/ contains run_doc.sh script, which can be run with your target branch as argument:
 
<code>$ ./run_doc.sh master</code>
 
 
This creates _build directory with rendered .html documentation, but look for any warnings printed during the script execution. Attempt to fix such warning before Publishing your Gerrit change.
 
 
== Code style choices ==
 
 
CSIT project has adopted a particular code style, and it is still improving slowly. Here are some quick rules.
 
 
TODO: Move to a separate wiki page?
 
 
=== String formatting in Python ===
 
 
[https://pyformat.info/#named_placeholders New style with named placeholders] is preferred due to increased readability.
 

Latest revision as of 10:50, 23 June 2023