33Development Guides
44==================
55
6- Here are a set of detailed guides depending on if you are a public user,
7- Stanford NAV Lab member, or a project maintainer.
6+ Here are a set of detailed guides depending on if you are a :ref: `public user<standard_dev> `,
7+ :ref: `Stanford NAV Lab member<navlab_dev> `, or a project maintainer
8+ :ref: `reviewing pull requests<pr_review> ` or
9+ :ref: `creating new release branches<release_workflow> `.
810
11+ .. _standard_dev :
912
1013Standard GitHub Workflow
1114------------------------
1215
13161. Fork `gnss_lib_py <https://github.com/Stanford-NavLab/gnss_lib_py >`__
14- (look for the "Fork" button).
15-
16- 2. Clone your fork locally:
17+ (look for the "Fork" button), then clone your fork locally:
1718
1819 .. code-block :: bash
1920
2021 git clone https://github.com/< your username> /gnss_lib_py
2122
22- 3 . If using poetry, follow the :ref: `developer install instructions<developer install> `
23+ 2 . If using poetry, follow the :ref: `developer install instructions<developer install> `
2324 to install pyenv, poetry, and the python dependencies. If using
2425 :code: `pip ` or :code: `conda ` for package management instead, use
2526 :code: `pip install -r requirements.txt ` to install dependencies.
2627
27- 4 . Create a local branch:
28+ 3 . Create a local branch:
2829
2930 .. code-block :: bash
3031
3132 git checkout -b your-name/name-of-your-bugfix-or-feature
3233
33- 5 . Make changes locally and document them appropriately. See the
34+ 4 . Make changes locally and document them appropriately. See the
3435 :ref: `Documentation<documentation> ` section for more details.
3536
3637 If the feature branch includes new functionality, you must also:
@@ -41,20 +42,18 @@ Standard GitHub Workflow
4142 * add a section in the appropriate tutorial notebook located in
4243 :code: `notebooks/tutorials/* `
4344
44- 6 . Add tests for the newly added code and ensure the new code is covered.
45+ 5 . Add tests for the newly added code and ensure the new code is covered.
4546 See the :ref: `Testing<testing> ` section for more details.
4647
47- 7. Add your name to the `contributors list <https://github.com/Stanford-NavLab/gnss_lib_py/blob/main/CONTRIBUTORS.sh >`__.
48-
49- 8. When you're done making changes run all the tests with:
48+ 6. When you're done making changes run all the tests with:
5049
5150 .. code-block :: bash
5251
5352 poetry run pytest
5453
5554 Make sure that all tests are passing.
5655
57- 9 . Verify that testing coverage has not decreased:
56+ 7 . Verify that testing coverage has not decreased:
5857
5958 .. code-block :: bash
6059
@@ -63,19 +62,51 @@ Standard GitHub Workflow
6362
6463 See the :ref: `Coverage Report<coverage> ` section for more details.
6564
66- 10. Ensure that system and IDE dependent files, like those in :code: `.idea `
67- folders for PyCharm and :code: `.vscode ` folders for VS Code are not
68- committed by updating the :code: `.gitignore ` file.
65+ 8. Improve code readability by linting it. Run :code: `pylint ` to preview
66+ issues with the code:
67+
68+ .. code-block :: bash
69+
70+ poetry run python -m pylint path-to-file-to-lint
71+
72+ Resolve issues that do not impact how you have implemented your functionality,
73+ such as conforming to snake case naming, removing TODOs and using suggested
74+ defaults.
75+
76+ 9. Ensure that system and IDE dependent files, like those in :code: `.idea `
77+ folders for PyCharm and :code: `.vscode ` folders for VS Code are not
78+ committed by updating the :code: `.gitignore ` file.
79+
80+ 10. Improve code readability by linting it. Run :code: `pylint ` to preview
81+ issues with the code:
82+
83+ .. code-block :: bash
84+
85+ poetry run python -m pylint path-to-file-to-lint
86+
87+ Resolve issues that do not impact how you have implemented your functionality,
88+ such as conforming to snake case naming, removing TODOs and using suggested
89+ defaults.
90+
91+ 11. Add your name to the `contributors list <https://github.com/Stanford-NavLab/gnss_lib_py/blob/main/CONTRIBUTORS.md >`__.
6992
70- 11 . Commit your changes and publish your branch to GitHub:
93+ 12 . Commit your changes and publish your branch to GitHub:
7194
7295 .. code-block :: bash
7396
7497 git add -A
7598 git commit -m " <describe changes in this commit>"
7699 git push origin your-name/name-of-your-bugfix-or-feature
77100
78- 12. Submit a pull request through GitHub.
101+ 13. Submit a pull request through GitHub. For the base branch
102+ in the pull request, select the latest version release branch :code: `vx.Y.Z `
103+ (with the highest number of all such branches). *Do not target the *
104+ :code: `main ` *branch in your pull request. * In the pull request,
105+ add a code review request for a current maintainer of the repository.
106+ The reviewers might add comments to ensure compliance with the rest
107+ of the code.
108+
109+ .. _navlab_dev :
79110
80111NAVLab GitHub Workflow
81112----------------------
@@ -103,15 +134,16 @@ NAVLab GitHub Workflow
103134 * add a section in the appropriate tutorial notebook located in
104135 :code: `notebooks/tutorials/* `
105136
106- 5. Add your name to the `contributors list <https://github.com/Stanford-NavLab/gnss_lib_py/blob/main/CONTRIBUTORS.sh >`__.
137+ 5. Add tests for the newly added code and ensure the new code is covered.
138+ See the :ref: `Testing<testing> ` section for more details.
107139
1081406. When you're done making changes run all the tests with:
109141
110142 .. code-block :: bash
111143
112144 poetry run pytest
113145
114- See the :ref: ` Testing<testing> ` section for more details .
146+ Make sure that all tests are passing .
115147
1161487. Verify that testing coverage has not decreased:
117149
@@ -122,15 +154,39 @@ NAVLab GitHub Workflow
122154
123155 See the :ref: `Coverage Report<coverage> ` section for more details.
124156
125- 8. Ensure that system and IDE dependent files, like those in :code: `.idea `
157+ 8. Improve code readability by linting it. Run :code: `pylint ` to preview
158+ issues with the code:
159+
160+ .. code-block :: bash
161+
162+ poetry run python -m pylint path-to-file-to-lint
163+
164+ Resolve issues that do not impact how you have implemented your functionality,
165+ such as conforming to snake case naming, removing TODOs and using suggested
166+ defaults.
167+
168+ 9. Ensure that system and IDE dependent files, like those in :code: `.idea `
126169 folders for PyCharm and :code: `.vscode ` folders for VS Code are not
127170 committed by updating the :code: `.gitignore ` file.
128171
129- 9. When you're ready to commit changes follow the steps below to
130- minimize unnecessary merging. This is especially important if
131- multiple people are working on the same branch. If you pull new
132- changes, then repeat the tests above to double check that everything
133- is still working as expected.
172+ 10. Improve code readability by linting it. Run :code: `pylint ` to preview
173+ issues with the code:
174+
175+ .. code-block :: bash
176+
177+ poetry run python -m pylint path-to-file-to-lint
178+
179+ Resolve issues that do not impact how you have implemented your functionality,
180+ such as conforming to snake case naming, removing TODOs and using suggested
181+ defaults.
182+
183+ 11. Add your name to the `contributors list <https://github.com/Stanford-NavLab/gnss_lib_py/blob/main/CONTRIBUTORS.md >`__.
184+
185+ 12. When you're ready to commit changes follow the steps below to
186+ minimize unnecessary merging. This is especially important if
187+ multiple people are working on the same branch. If you pull new
188+ changes, then repeat the tests above to double check that everything
189+ is still working as expected.
134190
135191 .. code-block :: bash
136192
@@ -141,10 +197,15 @@ NAVLab GitHub Workflow
141197 git commit -m " <describe changes in this commit>"
142198 git push origin your-name/name-of-your-bugfix-or-feature
143199
144- 10. Submit a pull request through the GitHub website. In the pull request,
145- add a code review request for the current maintainers of the repository,
146- Ashwin Kanhere, Derek Knowles or Sriramya Bhamidipati. The reviewers
147- might add comments to ensure compliance with the rest of the code.
200+ 13. Submit a pull request through GitHub. For the base branch
201+ in the pull request, select the latest version release branch :code: `vx.Y.Z `
202+ (with the highest number of all such branches). *Do not target the *
203+ :code: `main ` *branch in your pull request. * In the pull request,
204+ add a code review request for a current maintainer of the repository.
205+ The reviewers might add comments to ensure compliance with the rest
206+ of the code.
207+
208+ .. _pr_review :
148209
149210Pull Request Review Workflow
150211----------------------------
@@ -203,16 +264,24 @@ Pull Request Review Workflow
203264
204265 See the :ref: `Coverage Report<coverage> ` section for more details.
205266
206- 7. Submit your approval or any comments on GitHub.
267+ 7. Verify that the Pull Request targets the latest version release branch,
268+ called :code: `vX.Y.Z `. If it doesn't target this branch, change the base
269+ branch to the latest version release branch. If this branch
270+ doesn't exist, create the latest version release branch from :code: `main `
271+ before changing the base.
272+
273+ 8. Submit your approval or any comments on GitHub.
274+
275+ .. _release_workflow :
207276
208277New Package Release Workflow
209278----------------------------
210279
211- 1. Create new branch for the release :
280+ 1. Switch to the latest version release branch (with the highest number) :
212281
213282 .. code-block :: bash
214283
215- git checkout -b your-name/release-X .Y.Z
284+ git checkout -b vX .Y.Z
216285
217286 2. Open the ``pyproject.toml `` file and under the ``[tool.poetry] ``
218287 group change the ``version = X.Y.Z `` variable to match the new
0 commit comments