Skip to content

Commit b0c4db0

Browse files
Merge pull request #68 from Stanford-NavLab/derek/naming-conventions
derek/naming-conventions
2 parents 85b15ab + 01d62f4 commit b0c4db0

20 files changed

Lines changed: 770 additions & 194 deletions

.github/workflows/python-app.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,28 @@ jobs:
6666
- name: Test if docs are building
6767
run: |
6868
./build_docs.sh
69+
readme:
70+
runs-on: ubuntu-latest
71+
name: Check if index.rst and README.md weren't changed together
72+
steps:
73+
- uses: actions/checkout@v3
74+
with:
75+
fetch-depth: 0
76+
77+
- name: Get changed files since last remote commit
78+
id: changed-files
79+
uses: tj-actions/changed-files@v27
80+
with:
81+
since_last_remote_commit: "true"
82+
83+
- name: Check if index.rst changed when README.md file changes
84+
if: contains(steps.changed-files.outputs.modified_files, 'README.md') && !contains(steps.changed-files.outputs.modified_files, 'docs/source/index.rst')
85+
run: |
86+
echo "README.md has changed but index.rst has not!"
87+
exit 1
88+
89+
- name: Check if README.md changed when index.rst file changes
90+
if: contains(steps.changed-files.outputs.modified_files, 'docs/source/index.rst') && !contains(steps.changed-files.outputs.modified_files, 'README.md')
91+
run: |
92+
echo "index.rst has changed but README.md has not!"
93+
exit 1

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ results/*
1212
!results/.gitkeep
1313

1414
# ignore downloaded csv files in notebook tutorials
15-
notebooks/tutorials/Pixel4XL_derived.csv
16-
docs/source/tutorials/*.csv
15+
*.csv
16+
!data/unit_test/*/*.csv
17+
!notebooks/tutorials/myreceiver.csv
1718

1819
#Excluding VS Code files
1920
.vscode/*

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ Code Organization
6161
├── build_docs.sh # Bash script to build docs
6262
├── poetry.lock # Poetry specific Lock file
6363
├── pyproject.toml # List of package dependencies
64-
├── requirements.txt # List of packages for pip install
65-
└── setup.py # Setup file
64+
└── requirements.txt # List of packages for pip install
6665
```
6766
In the directory organization above:
6867

build_docs.sh

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,31 @@
11
#!/bin/bash
2+
# export requirements.txt for buildings docs
23
poetry export -f requirements.txt --output ./docs/source/requirements.txt --dev --without-hashes
34
cd docs
5+
46
echo "Rebuilding References"
5-
rm -rv ./source/reference/algorithms/*
6-
poetry run sphinx-apidoc -f -M -o ./source/reference/algorithms/ ./../gnss_lib_py/algorithms/
7-
rm -rv ./source/reference/parsers/*
8-
poetry run sphinx-apidoc -f -M -o ./source/reference/parsers/ ./../gnss_lib_py/parsers/
9-
rm -rv ./source/reference/utils/*
10-
poetry run sphinx-apidoc -f -M -o ./source/reference/utils/ ./../gnss_lib_py/utils/
11-
rm -rv ./source/reference/test_algorithms/*
12-
poetry run sphinx-apidoc -f -M -o ./source/reference/test_algorithms/ ./../tests/algorithms/
13-
rm -rv ./source/reference/test_parsers/*
14-
poetry run sphinx-apidoc -f -M -o ./source/reference/test_parsers/ ./../tests/parsers/
15-
rm -rv ./source/reference/test_utils/*
16-
poetry run sphinx-apidoc -f -M -o ./source/reference/test_utils/ ./../tests/utils/
17-
echo "Cleaning up existing make"
7+
rm -r ./source/reference/algorithms/*
8+
poetry run sphinx-apidoc -f -M -q -o ./source/reference/algorithms/ ./../gnss_lib_py/algorithms/
9+
rm -r ./source/reference/parsers/*
10+
poetry run sphinx-apidoc -f -M -q -o ./source/reference/parsers/ ./../gnss_lib_py/parsers/
11+
rm -r ./source/reference/utils/*
12+
poetry run sphinx-apidoc -f -M -q -o ./source/reference/utils/ ./../gnss_lib_py/utils/
13+
rm -r ./source/reference/test_algorithms/*
14+
poetry run sphinx-apidoc -f -M -q -o ./source/reference/test_algorithms/ ./../tests/algorithms/
15+
rm -r ./source/reference/test_parsers/*
16+
poetry run sphinx-apidoc -f -M -q -o ./source/reference/test_parsers/ ./../tests/parsers/
17+
rm -r ./source/reference/test_utils/*
18+
poetry run sphinx-apidoc -f -M -q -o ./source/reference/test_utils/ ./../tests/utils/
19+
20+
# remove previously downloaded .csv files if they exist
21+
rm ./source/*/*.csv
22+
23+
echo "Cleaning existing make"
1824
poetry run make clean
25+
1926
echo "Building docs in html"
2027
poetry run make html
28+
29+
# export requirements.txt for setup.py
2130
cd ..
2231
poetry export -f requirements.txt --output ./requirements.txt --without-hashes

docs/source/contributing/development.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ Standard GitHub Workflow
3333
5. Make changes locally and document them appropriately. See the
3434
:ref:`Documentation<documentation>` section for more details.
3535

36+
If the feature branch includes new functionality, you must also:
37+
38+
* update the "Code Organization" section of the :code:`README.md`
39+
* update the "Code Organization" section of
40+
:code:`docs/source/index.rst` to match the :code:`README.md`
41+
* add a section in the appropriate tutorial notebook located in
42+
:code:`notebooks/tutorials/*`
43+
3644
6. Add tests for the newly added code and ensure the new code is covered.
3745
See the :ref:`Testing<testing>` section for more details.
3846

@@ -87,6 +95,14 @@ NAVLab GitHub Workflow
8795
4. Make changes locally and document them appropriately. See the
8896
:ref:`Documentation<documentation>` section for more details.
8997

98+
If the feature branch includes new functionality, you must also:
99+
100+
* update the "Code Organization" section of the :code:`README.md`
101+
* update the "Code Organization" section of
102+
:code:`docs/source/index.rst` to match the :code:`README.md`
103+
* add a section in the appropriate tutorial notebook located in
104+
:code:`notebooks/tutorials/*`
105+
90106
5. Add your name to the `contributors list <https://github.com/Stanford-NavLab/gnss_lib_py/blob/main/CONTRIBUTORS.sh>`__.
91107

92108
6. When you're done making changes run all the tests with:
@@ -156,6 +172,16 @@ Pull Request Review Workflow
156172
the :ref:`Documentation<documentation>` section for more details on
157173
what is expected.
158174

175+
If the feature branch included new functionality, the following
176+
should have also been updated:
177+
178+
* the "Code Organization" section of the :code:`README.md`
179+
* the "Code Organization" section of
180+
:code:`docs/source/index.rst` to match the :code:`README.md`
181+
* the appropriate tutorial notebook located in
182+
:code:`notebooks/tutorials/*` with a simple example of the new
183+
functionality
184+
159185
4. Verify that all tests run on your system:
160186

161187
.. code-block:: bash

docs/source/index.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ Code Organization
6464
├── build_docs.sh # Bash script to build docs
6565
├── poetry.lock # Poetry specific Lock file
6666
├── pyproject.toml # List of package dependencies
67-
├── requirements.txt # List of packages for pip install
68-
└── setup.py # Setup file
67+
└── requirements.txt # List of packages for pip install
6968
7069
In the directory organization above:
7170

docs/source/install.rst

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,27 @@ Install
66
Prerequisites
77
-------------
88

9-
:code:`gnss_lib_py` is written in Python and requires basic familiarity
10-
with Python classes, functions and associated syntax.
9+
| **Python:** >=3.8, <3.11
10+
| **Operating System:** Linux, Windows, MacOS
1111
12-
:code:`gnss_lib_py` is developed in Python 3.8.9 in Ubuntu 20 and
13-
Ubuntu 20 for WSL2.
1412
All :code:`gnss_lib_py` classes and methods are tested in Python 3.8
1513
and 3.10 in the latest Ubuntu, MacOS and Windows versions.
14+
:code:`gnss_lib_py` is developed in Python 3.8.9 in Ubuntu 20/22 and
15+
Ubuntu 20 for WSL2.
1616

1717
Standard Installation
1818
---------------------
1919

20+
1. :code:`gnss_lib_py` is available through :code:`pip` installation
21+
with:
22+
23+
.. code-block:: bash
24+
25+
pip install gnss-lib-py
26+
27+
Editable Installation
28+
---------------------
29+
2030
1. Clone the GitHub repository:
2131

2232
.. code-block:: bash
@@ -31,7 +41,7 @@ Standard Installation
3141
3242
3. Update pip version.
3343

34-
a. For Linux:
44+
a. For Linux and MacOS:
3545

3646
.. code-block:: bash
3747
@@ -64,8 +74,8 @@ Developer Installation
6474
This project is being developed using :code:`pyenv` and :code:`poetry`
6575
for python version and environment control respectively.
6676

67-
Ubuntu/WSL2
68-
+++++++++++
77+
Linux/WSL2 and MacOS
78+
++++++++++++++++++++
6979

7080
1. Install :code:`pyenv` using the installation instructions
7181
`here <https://github.com/pyenv/pyenv#installation>`__. The steps are

0 commit comments

Comments
 (0)