Skip to content

Commit

Permalink
Merge pull request #157 from Stanford-NavLab/v1.0.2
Browse files Browse the repository at this point in the history
v1.0.2 is ready as a new release.
  • Loading branch information
danineamati authored Feb 14, 2024
2 parents 93492dd + fdf5a81 commit f778d6e
Show file tree
Hide file tree
Showing 56 changed files with 1,997 additions and 1,334 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
- name: Test with pytest
run: |
source $VENV
pytest --cov=gnss_lib_py/algorithms --cov=gnss_lib_py/parsers --cov=gnss_lib_py/utils --cov-report=xml
poetry run pytest --cov=gnss_lib_py/algorithms --cov=gnss_lib_py/navdata --cov=gnss_lib_py/parsers --cov=gnss_lib_py/utils --cov=gnss_lib_py/visualizations --cov-report=xml
- name: Upload coverage report to code-cov
uses: codecov/codecov-action@v3
with:
Expand Down
8 changes: 8 additions & 0 deletions build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,24 @@ cd docs
echo "Rebuilding References"
rm -r ./source/reference/algorithms/*
poetry run sphinx-apidoc -f -M -q -o ./source/reference/algorithms/ ./../gnss_lib_py/algorithms/
rm -r ./source/reference/navdata/*
poetry run sphinx-apidoc -f -M -q -o ./source/reference/navdata/ ./../gnss_lib_py/navdata/
rm -r ./source/reference/parsers/*
poetry run sphinx-apidoc -f -M -q -o ./source/reference/parsers/ ./../gnss_lib_py/parsers/
rm -r ./source/reference/utils/*
poetry run sphinx-apidoc -f -M -q -o ./source/reference/utils/ ./../gnss_lib_py/utils/
rm -r ./source/reference/visualizations/*
poetry run sphinx-apidoc -f -M -q -o ./source/reference/visualizations/ ./../gnss_lib_py/visualizations/
rm -r ./source/reference/test_algorithms/*
poetry run sphinx-apidoc -f -M -q -o ./source/reference/test_algorithms/ ./../tests/algorithms/
rm -r ./source/reference/test_navdata/*
poetry run sphinx-apidoc -f -M -q -o ./source/reference/test_navdata/ ./../tests/navdata/
rm -r ./source/reference/test_parsers/*
poetry run sphinx-apidoc -f -M -q -o ./source/reference/test_parsers/ ./../tests/parsers/
rm -r ./source/reference/test_utils/*
poetry run sphinx-apidoc -f -M -q -o ./source/reference/test_utils/ ./../tests/utils/
rm -r ./source/reference/test_visualizations/*
poetry run sphinx-apidoc -f -M -q -o ./source/reference/test_visualizations/ ./../tests/visualizations/

# remove previously downloaded .csv files if they exist
rm ./source/*/*.csv
Expand Down
4 changes: 4 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@
sys.path.insert(0, os.path.abspath('../../'))
sys.path.insert(0, os.path.abspath('../../gnss_lib_py/'))
sys.path.insert(0, os.path.abspath('../../gnss_lib_py/algorithms/'))
sys.path.insert(0, os.path.abspath('../../gnss_lib_py/navdata/'))
sys.path.insert(0, os.path.abspath('../../gnss_lib_py/parsers/'))
sys.path.insert(0, os.path.abspath('../../gnss_lib_py/utils/'))
sys.path.insert(0, os.path.abspath('../../gnss_lib_py/visualizations/'))
sys.path.insert(0, os.path.abspath('../../tests/'))
sys.path.insert(0, os.path.abspath('../../tests/algorithms'))
sys.path.insert(0, os.path.abspath('../../tests/navdata'))
sys.path.insert(0, os.path.abspath('../../tests/parsers'))
sys.path.insert(0, os.path.abspath('../../tests/utils'))
sys.path.insert(0, os.path.abspath('../../tests/visualizations'))


# -- Project information -----------------------------------------------------
Expand Down
38 changes: 8 additions & 30 deletions docs/source/contributing/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Standard GitHub Workflow

.. code-block:: bash
poetry run pytest --cov=gnss_lib_py/algorithms --cov=gnss_lib_py/parsers --cov=gnss_lib_py/utils --cov-report=xml
poetry run pytest --cov=gnss_lib_py/algorithms --cov=gnss_lib_py/navdata --cov=gnss_lib_py/parsers --cov=gnss_lib_py/utils --cov=gnss_lib_py/visualizations --cov-report=html
poetry run coverage report
See the :ref:`Coverage Report<coverage>` section for more details.
Expand All @@ -79,28 +79,17 @@ Standard GitHub Workflow
folders for PyCharm and :code:`.vscode` folders for VS Code are not
committed by updating the :code:`.gitignore` file.

10. Improve code readability by linting it. Run :code:`pylint` to preview
issues with the code:

.. code-block:: bash
poetry run python -m pylint path-to-file-to-lint
Resolve issues that do not impact how you have implemented your functionality,
such as conforming to snake case naming, removing TODOs and using suggested
defaults.

11. Add your name to the `contributors list <https://github.com/Stanford-NavLab/gnss_lib_py/blob/main/CONTRIBUTORS.md>`__.
10. Add your name to the `contributors list <https://github.com/Stanford-NavLab/gnss_lib_py/blob/main/CONTRIBUTORS.md>`__.

12. Commit your changes and publish your branch to GitHub:
11. Commit your changes and publish your branch to GitHub:

.. code-block:: bash
git add -A
git commit -m "<describe changes in this commit>"
git push origin your-name/name-of-your-bugfix-or-feature
13. Submit a pull request through GitHub. For the base branch
12. Submit a pull request through GitHub. For the base branch
in the pull request, select the latest version release branch :code:`vX.Y.Z`
(with the highest number of all such branches). *Do not target the*
:code:`main` *branch in your pull request.* In the pull request,
Expand Down Expand Up @@ -153,7 +142,7 @@ NAVLab GitHub Workflow

.. code-block:: bash
poetry run pytest --cov=gnss_lib_py/algorithms --cov=gnss_lib_py/parsers --cov=gnss_lib_py/utils --cov-report=xml
poetry run pytest --cov=gnss_lib_py/algorithms --cov=gnss_lib_py/navdata --cov=gnss_lib_py/parsers --cov=gnss_lib_py/utils --cov=gnss_lib_py/visualizations --cov-report=html
poetry run coverage report
See the :ref:`Coverage Report<coverage>` section for more details.
Expand All @@ -173,20 +162,9 @@ NAVLab GitHub Workflow
folders for PyCharm and :code:`.vscode` folders for VS Code are not
committed by updating the :code:`.gitignore` file.

10. Improve code readability by linting it. Run :code:`pylint` to preview
issues with the code:

.. code-block:: bash
poetry run python -m pylint path-to-file-to-lint
Resolve issues that do not impact how you have implemented your functionality,
such as conforming to snake case naming, removing TODOs and using suggested
defaults.

11. Add your name to the `contributors list <https://github.com/Stanford-NavLab/gnss_lib_py/blob/main/CONTRIBUTORS.md>`__.
10. Add your name to the `contributors list <https://github.com/Stanford-NavLab/gnss_lib_py/blob/main/CONTRIBUTORS.md>`__.

12. When you're ready to commit changes follow the steps below to
11. When you're ready to commit changes follow the steps below to
minimize unnecessary merging. This is especially important if
multiple people are working on the same branch. If you pull new
changes, then repeat the tests above to double check that everything
Expand All @@ -201,7 +179,7 @@ NAVLab GitHub Workflow
git commit -m "<describe changes in this commit>"
git push origin your-name/name-of-your-bugfix-or-feature
13. Submit a pull request through GitHub. For the base branch
12. Submit a pull request through GitHub. For the base branch
in the pull request, select the latest version release branch :code:`vX.Y.Z`
(with the highest number of all such branches). *Do not target the*
:code:`main` *branch in your pull request.* In the pull request,
Expand Down
8 changes: 8 additions & 0 deletions docs/source/reference/navdata/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
navdata
=======

.. toctree::
:maxdepth: 4

navdata
operations
7 changes: 7 additions & 0 deletions docs/source/reference/navdata/navdata.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
navdata module
==============

.. automodule:: navdata
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/reference/navdata/operations.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
operations module
=================

.. automodule:: operations
:members:
:undoc-members:
:show-inheritance:
4 changes: 4 additions & 0 deletions docs/source/reference/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,10 @@ documentation below.
:maxdepth: 2

algorithms/modules
navdata/modules
parsers/modules
utils/modules
visualizations/modules

Testing References
--------------------------------
Expand All @@ -302,8 +304,10 @@ documentation below.
:maxdepth: 2

test_algorithms/modules
test_navdata/modules
test_parsers/modules
test_utils/modules
test_visualizations/modules


Additional Indices
Expand Down
8 changes: 8 additions & 0 deletions docs/source/reference/test_navdata/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
navdata
=======

.. toctree::
:maxdepth: 4

test_navdata
test_operations
7 changes: 7 additions & 0 deletions docs/source/reference/test_navdata/test_navdata.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
test\_navdata module
====================

.. automodule:: test_navdata
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/reference/test_navdata/test_operations.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
test\_operations module
=======================

.. automodule:: test_operations
:members:
:undoc-members:
:show-inheritance:
7 changes: 0 additions & 7 deletions docs/source/reference/test_utils/conftest.rst

This file was deleted.

2 changes: 1 addition & 1 deletion docs/source/reference/test_utils/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ utils
.. toctree::
:maxdepth: 4

conftest
test_coordinates
test_dop
test_ephemeris_downloader
test_file_operations
test_filters
Expand Down
7 changes: 7 additions & 0 deletions docs/source/reference/test_utils/test_dop.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
test\_dop module
================

.. automodule:: test_dop
:members:
:undoc-members:
:show-inheritance:
10 changes: 10 additions & 0 deletions docs/source/reference/test_visualizations/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
visualizations
==============

.. toctree::
:maxdepth: 4

test_plot_map
test_plot_metric
test_plot_skyplot
test_style
7 changes: 7 additions & 0 deletions docs/source/reference/test_visualizations/test_plot_map.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
test\_plot\_map module
======================

.. automodule:: test_plot_map
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
test\_plot\_metric module
=========================

.. automodule:: test_plot_metric
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
test\_plot\_skyplot module
==========================

.. automodule:: test_plot_skyplot
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/reference/test_visualizations/test_style.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
test\_style module
==================

.. automodule:: test_style
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/reference/utils/dop.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
dop module
==========

.. automodule:: dop
:members:
:undoc-members:
:show-inheritance:
1 change: 1 addition & 0 deletions docs/source/reference/utils/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ utils

constants
coordinates
dop
ephemeris_downloader
file_operations
filters
Expand Down
10 changes: 10 additions & 0 deletions docs/source/reference/visualizations/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
visualizations
==============

.. toctree::
:maxdepth: 4

plot_map
plot_metric
plot_skyplot
style
7 changes: 7 additions & 0 deletions docs/source/reference/visualizations/plot_map.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
plot\_map module
================

.. automodule:: plot_map
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/reference/visualizations/plot_metric.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
plot\_metric module
===================

.. automodule:: plot_metric
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/reference/visualizations/plot_skyplot.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
plot\_skyplot module
====================

.. automodule:: plot_skyplot
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/reference/visualizations/style.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
style module
============

.. automodule:: style
:members:
:undoc-members:
:show-inheritance:
1 change: 1 addition & 0 deletions docs/source/tutorials/tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ available in the :code:`utils` directory.

utils/tutorials_constants_notebook
utils/tutorials_coordinates_notebook
utils/tutorials_dop_notebook
utils/tutorials_ephemeris_downloader_notebook
utils/tutorials_file_operations_notebook
utils/tutorials_filters_notebook
Expand Down
3 changes: 3 additions & 0 deletions docs/source/tutorials/utils/tutorials_dop_notebook.nblink
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"path": "../../../../notebooks/tutorials/utils/dop.ipynb"
}
1 change: 1 addition & 0 deletions gnss_lib_py/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

from gnss_lib_py.utils.constants import *
from gnss_lib_py.utils.coordinates import *
from gnss_lib_py.utils.dop import *
from gnss_lib_py.utils.ephemeris_downloader import *
from gnss_lib_py.utils.file_operations import *
from gnss_lib_py.utils.filters import *
Expand Down
2 changes: 1 addition & 1 deletion gnss_lib_py/algorithms/gnss_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def solve_gnss_ekf(measurements, init_dict = None,
corr_pr_m = measurement_subset["corr_pr_m"].reshape(-1,1)

# remove NaN indexes
not_nan_indexes = ~np.isnan(pos_sv_m).any(axis=1)
not_nan_indexes = ~np.isnan(pos_sv_m).any(axis=1) & ~np.isnan(corr_pr_m).any(axis=1)
pos_sv_m = pos_sv_m[not_nan_indexes]
corr_pr_m = corr_pr_m[not_nan_indexes]

Expand Down
4 changes: 2 additions & 2 deletions gnss_lib_py/parsers/rinex_nav.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,11 @@ def _get_ephemeris_dataframe(self, rinex_path, constellations=None):
else:
data = gr.load(rinex_path,
verbose=self.verbose).to_dataframe()
data.dropna(how='all', inplace=True)
data.reset_index(inplace=True)
data_header = gr.rinexheader(rinex_path)
leap_seconds = self.load_leapseconds(data_header)
data['leap_seconds'] = leap_seconds
data.dropna(how='all', inplace=True)
data.reset_index(inplace=True)
data['source'] = rinex_path
data['t_oc'] = pd.to_numeric(data['time'] - consts.GPS_EPOCH_0.replace(tzinfo=None))
data['t_oc'] = 1e-9 * data['t_oc'] - consts.WEEKSEC * np.floor(1e-9 * data['t_oc'] / consts.WEEKSEC)
Expand Down
Loading

0 comments on commit f778d6e

Please sign in to comment.