Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 1 | .. This work is licensed under a Creative Commons Attribution 4.0 |
| 2 | .. International License. http://creativecommons.org/licenses/by/4.0 |
| 3 | .. Copyright 2017 AT&T Intellectual Property. All rights reserved. |
MatthewHarffy | 30b6487 | 2017-08-17 16:59:26 +0100 | [diff] [blame] | 4 | |
| 5 | Style guide |
| 6 | =========== |
| 7 | |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 8 | This style guide is for ONAP documentation contributors, reviewers and |
| 9 | committers. |
MatthewHarffy | 30b6487 | 2017-08-17 16:59:26 +0100 | [diff] [blame] | 10 | |
| 11 | Getting started |
Rich Bennett | 1da3046 | 2017-08-24 12:11:36 -0400 | [diff] [blame] | 12 | --------------- |
MatthewHarffy | 30b6487 | 2017-08-17 16:59:26 +0100 | [diff] [blame] | 13 | |
| 14 | When is documentation required? |
Rich Bennett | 1da3046 | 2017-08-24 12:11:36 -0400 | [diff] [blame] | 15 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 16 | All ONAP project contributions should have corresponding documentation. |
| 17 | This includes all new features and changes to features that impact users. |
MatthewHarffy | 30b6487 | 2017-08-17 16:59:26 +0100 | [diff] [blame] | 18 | |
| 19 | How do I create ONAP documentation? |
Rich Bennett | 1da3046 | 2017-08-24 12:11:36 -0400 | [diff] [blame] | 20 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 21 | ONAP documentation is written in ReStructuredText_ (an easy-to-read, |
| 22 | what-you-see-is-what-you-get, plain text markup syntax). The process for |
| 23 | creating ONAP documentation and what documents are required are |
| 24 | described in later sections of this Developer Documentation Guide. |
MatthewHarffy | 30b6487 | 2017-08-17 16:59:26 +0100 | [diff] [blame] | 25 | |
| 26 | .. _ReStructuredText: http://docutils.sourceforge.net/rst.html |
| 27 | |
| 28 | ReStructuredText markup conventions |
Rich Bennett | 1da3046 | 2017-08-24 12:11:36 -0400 | [diff] [blame] | 29 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
MatthewHarffy | 30b6487 | 2017-08-17 16:59:26 +0100 | [diff] [blame] | 30 | For detailed information ReStructuredText and how to best use the format, see: |
| 31 | |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 32 | - `ReStructured Text Primer <http://docutils.sourceforge.net/docs/user/rst/quickstart.html>`_ |
| 33 | - `ReStructured Text Quick Reference <http://docutils.sourceforge.net/docs/user/rst/quickref.html>`_ |
MatthewHarffy | 30b6487 | 2017-08-17 16:59:26 +0100 | [diff] [blame] | 34 | |
| 35 | Writing guidelines |
Rich Bennett | 1da3046 | 2017-08-24 12:11:36 -0400 | [diff] [blame] | 36 | ------------------ |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 37 | Following these writing guidelines will keep ONAP documentation |
| 38 | consistent and readable. Only a few areas are covered below, as |
| 39 | we don't want to make it too complex. Try to keep things simple |
| 40 | and clear, and you can't go far wrong. |
MatthewHarffy | 30b6487 | 2017-08-17 16:59:26 +0100 | [diff] [blame] | 41 | |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 42 | Don’t get too hung up on using correct style. We’d rather have you |
| 43 | submit good information that does not conform to this guide than no |
| 44 | information at all. ONAP’s Documentation project team will be happy |
| 45 | to help you with the prose. |
MatthewHarffy | 30b6487 | 2017-08-17 16:59:26 +0100 | [diff] [blame] | 46 | |
| 47 | General guidelines for all documents |
Rich Bennett | 1da3046 | 2017-08-24 12:11:36 -0400 | [diff] [blame] | 48 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
MatthewHarffy | 30b6487 | 2017-08-17 16:59:26 +0100 | [diff] [blame] | 49 | - Use standard American English and spelling |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 50 | - Use consistent terminology |
MatthewHarffy | 30b6487 | 2017-08-17 16:59:26 +0100 | [diff] [blame] | 51 | - Write in the active voice, using present simple tense when possible |
| 52 | - Write objective, professional content |
| 53 | - Keep sentences and paragraphs short and clear |
| 54 | - Use a spell checker |
| 55 | |
| 56 | Abbreviations and acronyms |
Rich Bennett | 1da3046 | 2017-08-24 12:11:36 -0400 | [diff] [blame] | 57 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 58 | - Write out the term the first time it appears in the document, |
| 59 | immediately followed by the acronym or abbreviation in parenthesis. |
| 60 | Then use the acronym in the rest of the document. In diagrams, if |
| 61 | space allows, write out the full term. |
| 62 | |
| 63 | - Use “an” before an acronym that begins with a vowel sound when spoken |
| 64 | aloud; use "a" before an acronym that begins with a consonant |
| 65 | sound when spoken aloud. |
| 66 | |
Rich Bennett | 1da3046 | 2017-08-24 12:11:36 -0400 | [diff] [blame] | 67 | + Examples: an MSO component, a LAN, an L3-VPN |
| 68 | |
MatthewHarffy | 30b6487 | 2017-08-17 16:59:26 +0100 | [diff] [blame] | 69 | |
| 70 | ONAP terms |
Rich Bennett | 1da3046 | 2017-08-24 12:11:36 -0400 | [diff] [blame] | 71 | ^^^^^^^^^^ |
MatthewHarffy | 30b6487 | 2017-08-17 16:59:26 +0100 | [diff] [blame] | 72 | - AA&I vs AAI: AAI should be used. |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 73 | |
| 74 | - APP-C vs APPC: APPC should be used. |
| 75 | |
MatthewHarffy | 30b6487 | 2017-08-17 16:59:26 +0100 | [diff] [blame] | 76 | - SDN-C vs SDNC: SDNC should be used. |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 77 | |
MatthewHarffy | 30b6487 | 2017-08-17 16:59:26 +0100 | [diff] [blame] | 78 | - Heat vs HEAT: Both are in use. The official website uses "Heat". |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 79 | |
MatthewHarffy | 30b6487 | 2017-08-17 16:59:26 +0100 | [diff] [blame] | 80 | - life cycle vs lifecycle or life-cycle: "life cycle" is preferred. |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 81 | |
| 82 | - open source (adjective): capitalize only in titles; avoid |
| 83 | "open-source". (Based on prevalence on the web.) |
| 84 | |
| 85 | - run-time vs. execution-time (adjective): prefer run-time. |
| 86 | Example: "run-time logging of events" |
| 87 | |
MatthewHarffy | 30b6487 | 2017-08-17 16:59:26 +0100 | [diff] [blame] | 88 | - run time (noun). Example: "logging of events at run time". |
| 89 | |
| 90 | GUI elements |
Rich Bennett | 1da3046 | 2017-08-24 12:11:36 -0400 | [diff] [blame] | 91 | ^^^^^^^^^^^^ |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 92 | - In general, write menu names as they appear in the UI. |
| 93 | For example, if a menu or item name is all caps, then write |
| 94 | it all caps in the document. |
MatthewHarffy | 30b6487 | 2017-08-17 16:59:26 +0100 | [diff] [blame] | 95 | |
| 96 | Headings (Titles) |
Rich Bennett | 1da3046 | 2017-08-24 12:11:36 -0400 | [diff] [blame] | 97 | ^^^^^^^^^^^^^^^^^ |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 98 | - Use brief, but specific, informative titles. Titles should give |
| 99 | context when possible. |
| 100 | |
MatthewHarffy | 30b6487 | 2017-08-17 16:59:26 +0100 | [diff] [blame] | 101 | - Use sentence-style capitalization; do not end with a period or colon. |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 102 | |
| 103 | - Use a gerund to begin section titles. Examples: Configuring, |
| 104 | Managing, Starting. |
| 105 | |
| 106 | - Use descriptive titles for tables and figures titles. Do not |
| 107 | number tables or figures. Do not (in general) add titles for screen shots. |
MatthewHarffy | 30b6487 | 2017-08-17 16:59:26 +0100 | [diff] [blame] | 108 | |
| 109 | Tasks |
Rich Bennett | 1da3046 | 2017-08-24 12:11:36 -0400 | [diff] [blame] | 110 | ^^^^^ |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 111 | - Start task titles with an action word. Examples: Create, Add, |
| 112 | Validate, Update. |
| 113 | |
MatthewHarffy | 30b6487 | 2017-08-17 16:59:26 +0100 | [diff] [blame] | 114 | - Use [Optional] at the beginning of an optional step. |
Rich Bennett | d504dc8 | 2018-05-31 08:40:36 -0400 | [diff] [blame] | 115 | |
| 116 | - Provide information on the expected outcome of a step, especially |
| 117 | when it is not obvious. |
| 118 | |
MatthewHarffy | 30b6487 | 2017-08-17 16:59:26 +0100 | [diff] [blame] | 119 | - Break down end-to-end tasks into manageable chunks. |
Rich Bennett | 1da3046 | 2017-08-24 12:11:36 -0400 | [diff] [blame] | 120 | |
Rich Bennett | 0ec5a75 | 2018-07-12 16:23:19 -0400 | [diff] [blame] | 121 | |
| 122 | ONAP Conventions for the Use of Sphinx Directives |
| 123 | ------------------------------------------------- |
| 124 | |
| 125 | Needs Directive |
| 126 | ^^^^^^^^^^^^^^^ |
| 127 | |
| 128 | * Needs IDs must match the regular expression "^[A-Z0-9]+-[A-Z0-9]+" |
| 129 | |
| 130 | * The prefix (string before the dash) must be described in the following table |
| 131 | |
| 132 | .. list-table:: Needs Prefix Use |
| 133 | :align: center |
| 134 | :widths: 8 40 40 |
| 135 | :header-rows: 1 |
| 136 | |
| 137 | * - Prefix |
| 138 | - Description |
| 139 | - Use |
| 140 | |
| 141 | * - R |
| 142 | - Represents a requirement that must be met by a VNF provider |
| 143 | - Defined only in the vnfrqts project repositories, may be referenced in any project repository source |
| 144 | |