Joey Armstrong | 924f3cb | 2023-06-05 15:21:51 -0400 | [diff] [blame] | 1 | Quickstart Guide: Editing |
| 2 | ========================= |
| 3 | |
| 4 | Intent |
| 5 | ------ |
| 6 | |
| 7 | This quickstart guide decribes how to modify and commit changes that will |
| 8 | be visible on http://docs.voltha.org. |
| 9 | |
| 10 | Clone repo:voltha-docs |
| 11 | ---------------------- |
| 12 | |
| 13 | .. code:: bash |
| 14 | |
| 15 | # Clone repo:voltha-docs |
| 16 | git clone ssh://gerrit.opencord.org:29418/voltha-docs.git |
| 17 | |
| 18 | # Create a developer branch |
| 19 | git checkout -b dev-joey |
| 20 | |
| 21 | .. code-block: shell-session |
| 22 | :linenos: 2 |
| 23 | |
| 24 | # Clone repo:voltha-docs |
| 25 | git clone ssh://gerrit.opencord.org:29418/voltha-docs.git |
| 26 | |
| 27 | # Create a developer branch |
| 28 | git checkout -b dev-joey |
| 29 | |
| 30 | Repositories: |
| 31 | `gerrit <https://gerrit.opencord.org/plugins/gitiles/voltha-docs>`_ |
| 32 | `github <https://github.com/opencord/voltha-docs>`_ |
| 33 | |
| 34 | .. code-block: shell-session |
| 35 | :linenos: 2,5 |
| 36 | |
| 37 | # Clone repo:voltha-docs |
| 38 | git clone ssh://gerrit.opencord.org:29418/voltha-docs.git |
| 39 | |
| 40 | # Create a developer branch |
| 41 | git checkout -b dev-joey |
| 42 | |
| 43 | Interactive development |
| 44 | ----------------------- |
| 45 | |
| 46 | .. code-block: shell-session |
| 47 | :caption: Launch a browser for viewing local edits |
| 48 | :linenos: 4 |
| 49 | |
| 50 | cd voltha-docs |
| 51 | make reload |
| 52 | |
| 53 | - source edit: modify reStructuredText (RST) sources |
| 54 | - Modify content to taste |
| 55 | |
| 56 | Invoke checkin tests locally |
| 57 | ---------------------------- |
| 58 | |
| 59 | .. code-block: shell-session |
| 60 | :linenos: 3 |
| 61 | |
| 62 | cd voltha-docs |
| 63 | make sterile |
| 64 | make test |
| 65 | |
| 66 | .. list-table:: makefile targets for testing |
| 67 | :widths: 30,50 |
| 68 | :header-rows: 2 |
| 69 | |
| 70 | * - make target |
| 71 | - Description |
| 72 | * - |
| 73 | - |
| 74 | * - make test |
| 75 | - Kitchen sink target: invokes all checkin tests (make lint linkcheck) |
| 76 | * - make lint |
| 77 | - Syntax check by source: rst, python |
| 78 | * - make linkcheck |
| 79 | - Verify URLs inlined within rst files are valid |
| 80 | |
| 81 | Document and commit changes for ``git log`` |
| 82 | ------------------------------------------- |
| 83 | |
| 84 | .. code-block: shell-session |
| 85 | :linenos: |
| 86 | |
| 87 | # Commit message: Line 1 symmarize changes with jira ticket linkage. |
| 88 | echo '[VOL-XXXX] update voltha.docs' > commit_message |
| 89 | |
| 90 | # Commit message: Capture list of modified files |
| 91 | git status >> commit_message |
| 92 | |
| 93 | # Commit message: Capture source diffs |
| 94 | git diff >> commit_message |
| 95 | |
| 96 | # Summarize changes for git log |
| 97 | $EDIT commit_message |
| 98 | |
| 99 | # git add <modified files> |
| 100 | |
| 101 | # Commit changes to revision control |
| 102 | git commit -F commit_message |
| 103 | |
| 104 | # Rebase your sandbox, merge branch=master into branch=dev-joey |
| 105 | ... git rebase documentation URL needed here ... |
| 106 | |
| 107 | # Create a patch and request a code review |
| 108 | git review --reviewers email1 email2 email3 |
| 109 | |
| 110 | Extra credit |
| 111 | ------------------------------------------- |
| 112 | |
| 113 | .. code-block: shell-session |
| 114 | |
| 115 | make sterile |
| 116 | make html 2>&1 | sed -e 's/WARNING/\nWARNING/g' | less --ignore-case --hilite-search '/WARNING' |