Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daniel/git actions py version #165

Merged
merged 46 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
c503792
Added "Open in Colab" buttons to tutorials
kanhereashwin Feb 1, 2024
1c81656
Updated coordinates tutorial
kanhereashwin Feb 1, 2024
c76ea4b
update algorithm tutorials
betaBison Feb 7, 2024
67187e0
Removed import of scipy.interpolate
kanhereashwin Feb 14, 2024
b23ed02
Updated NavData tutorials
kanhereashwin Feb 14, 2024
5b3485a
Added poetry-plugin-export
kanhereashwin Feb 14, 2024
8ea2272
Python 3.12 GitHub Actions workflow
danineamati Feb 14, 2024
fecd523
Allow python 3.12 in pyproject.toml
danineamati Feb 14, 2024
b683b4c
update packages for 3.12
betaBison Feb 14, 2024
24e5ab9
Merge branch 'main' into tutorial-enhancements
kanhereashwin Feb 14, 2024
2023df1
Updated index and readme.md
kanhereashwin Feb 14, 2024
319e325
Minor updates to documentation
kanhereashwin Feb 14, 2024
56549e6
Added constants tutorial
kanhereashwin Feb 15, 2024
b5167fc
Added tutorial for using local time zones
kanhereashwin Feb 15, 2024
f25baef
Minor tutorial updates
kanhereashwin Feb 15, 2024
a53d3e5
Fixed path to constants.py
kanhereashwin Feb 15, 2024
7f607dd
Updated main tutorials file
kanhereashwin Feb 15, 2024
f365a7c
remove unused scipy import
betaBison Apr 1, 2024
cf8c3d0
remove output
betaBison Apr 1, 2024
7b9efbf
fix tutorials page typo
betaBison Apr 1, 2024
84b5828
update package dependencies
betaBison Apr 1, 2024
753f1e7
add custom lazy_fixture for pytest 8.0 compatibility
betaBison Apr 1, 2024
369063c
Merge branch 'tutorial-enhancements' into daniel/git_actions_py_version
betaBison Apr 1, 2024
e39ce53
update workflow build name
betaBison Apr 1, 2024
1e685bd
deprecate python 3.8
betaBison Apr 1, 2024
bde61dc
default build html
betaBison Apr 1, 2024
2f7ec2a
update python 3.9, 3.12 dependencies
betaBison Aug 4, 2024
af8f994
Merge branch 'tutorial-enhancements' into daniel/git_actions_py_version
betaBison Aug 4, 2024
eab5de8
update dependencies in pyproject
betaBison Aug 4, 2024
e9f1e11
use latest action versions
betaBison Aug 4, 2024
24aa4f5
deprecate matplotlib, update poetry
betaBison Aug 4, 2024
845a559
update docs
betaBison Aug 5, 2024
f112a8e
update deprecated functions
betaBison Aug 5, 2024
ab6038d
remove duplicate workflow
betaBison Aug 5, 2024
38708b9
use datetime.timezone.utc rather than datetime.UTC
betaBison Aug 5, 2024
d4c6bcd
remove erroneous pylint init messages
betaBison Aug 5, 2024
ec4ceba
Merge branch 'v1.0.3' into daniel/git_actions_py_version
betaBison Aug 5, 2024
d585ee8
new main architecture image
betaBison Aug 5, 2024
47102b4
Merge branch 'daniel/git_actions_py_version' of github.com:Stanford-N…
betaBison Aug 5, 2024
713e731
change png to svg
betaBison Aug 5, 2024
109c4a6
change to string nan for pandas replace
betaBison Aug 14, 2024
c1a98f7
update python reqs
betaBison Aug 14, 2024
dd66e7f
revert python reqs
betaBison Aug 15, 2024
99dab10
Merge pull request #166 from Stanford-NavLab/danek/colab-py12
danineamati Aug 15, 2024
7f4d516
Addresses MAC OS numpy singularity handling
danineamati Aug 15, 2024
aad7449
Remove print statements
danineamati Aug 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.8", "3.11"]
python-version: ["3.9","3.10","3.11","3.12"]
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast : false
defaults:
run:
shell: bash

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
Expand All @@ -43,7 +43,7 @@ jobs:
# Load cached environment, if it exists
- name: Load cached poetry environment
id: cached-poetry-dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
Expand All @@ -68,7 +68,7 @@ jobs:
source $VENV
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
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
Expand All @@ -79,13 +79,13 @@ jobs:
runs-on: ubuntu-latest
name: Check if index.rst and README.md weren't changed together
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get changed files since last remote commit
id: changed-files
uses: tj-actions/changed-files@v34
uses: tj-actions/changed-files@v44

- name: Check if index.rst changed when README.md file changes
if: contains(steps.changed-files.outputs.modified_files, 'README.md') && !contains(steps.changed-files.outputs.modified_files, 'docs/source/index.rst')
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pip-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.8"]
python-version: ["3.9"]
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install using pip
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8"]
python-version: ["3.9"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
Expand All @@ -29,7 +29,7 @@ jobs:
installer-parallel: true # default option selected currently
- name: Load cached poetry environment
id: cached-poetry-dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"

Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,6 @@ target/
profile_default/
ipython_config.py

# pyenv
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.8.9
3.9.19
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version: 2
build:
os: ubuntu-20.04
tools:
python: "3.8"
python: "3.9"

# Build documentation in the docs/ directory with Sphinx
sphinx:
Expand Down
39 changes: 27 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,31 @@ gnss_lib_py
`gnss_lib_py` is a modular Python tool for parsing, analyzing, and
visualizing Global Navigation Satellite Systems (GNSS) data and state
estimates.
It also provides an intuitive and modular framework allowing users to
It also provides an intuitive and modular framework which allows users to
quickly prototype, implement, and visualize GNSS algorithms.
`gnss_lib_py` is modular in the sense that multiple types of
algorithms can be easily exchanged for each other and extendable in
facilitating user-specific extensions of existing implementations.
algorithms or datasets can be easily exchanged for each other.
It is extendable in facilitating user-specific extensions of existing
implementations.

<img src="https://raw.githubusercontent.com/Stanford-NavLab/gnss_lib_py/main/docs/source/img/skyplot.png" alt="satellite skyplot" width="600"/>
<img src="https://raw.githubusercontent.com/Stanford-NavLab/gnss_lib_py/main/docs/source/img/glp_architecture.svg" alt="Architecture of gnss-lib-py library" width="800"/>

`gnss_lib_py` contains parsers for common file types used for
storing GNSS measurements, benchmark algorithms for processing
measurements into state estimates and visualization tools for measurements
and state estimates.
The modularity of `gnss_lib_py` is made possibly by the unifying
`NavData` class, which contains methods to add, remove and modify
numeric and string data consistently.
We provide standard row names for `NavData` elements on the
`NavData` class, with accompanying standard nomenclature, which can be
found in the
[reference page](https://gnss-lib-py.readthedocs.io/en/latest/reference/reference.html).
These names ensure cross compatibility between different datasets and
algorithms.
The standard nomenclature ensures cross compatibility between different
datasets and algorithms.

`NavData` combines the readability of `pandas.DataFrame` with `numpy.ndarray`
allowing for easy and fast access of numbers or strings.
We also provide functionality to add, remove and modify numeric and
string data consistently along with commonly needed supporting
functionality.

Documentation
-------------
Expand All @@ -51,7 +57,7 @@ Code Organization
├── parsers/ # Data parsers
├── utils/ # GNSS and common utilities
├── visualizations/ # plotting functions
└── __init__.py
└── __init__.py # Initialize gnss_lib_py
├── notebooks/ # Interactive Jupyter notebooks
├── tutorials/ # Notebooks with tutorial code
├── results/ # Location for result images/files
Expand All @@ -61,7 +67,7 @@ Code Organization
├── parsers/ # Tests for files in parsers
├── utils/ # Tests for files in utils
├── visualizations/ # Tests for files in visualizations
└── test_gnss_lib_py.py # High level checks for repository
└── conftest.py # Common methods for tests
├── CONTRIBUTORS.md # List of contributors
├── build_docs.sh # Bash script to build docs
├── poetry.lock # Poetry specific Lock file
Expand All @@ -70,14 +76,19 @@ Code Organization
```
In the directory organization above:

* The `algorithms` directory contains localization algorithms that
* The `algorithms` directory contains algorithms that
work by passing in a `NavData` class. Currently, the following
algorithms are implemented in the `algorithms`:

* Weighted Least Squares
* Extended Kalman Filter
* Calculating pseudorange residuals
* Fault detection and exclusion

* The `navdata` directory defines the `NavData` class, its methods, and
functions that operate on `NavData` instances, like `sort`, `concat`,
and others.

* The data parsers in the `parsers` directory allow for either loading
GNSS data into `gnss_lib_py`'s unifying `NavData` class or parsing
precise ephemerides data.
Expand All @@ -96,6 +107,10 @@ In the directory organization above:
visualizations, calculating multi-GNSS satellite PVT information,
satellite simulation, file operations, etc.

* The `visualizations` directory contains methods for plotting quantities
in `NavData`. It includes methods to plot metrics, positions on maps,
and skyplots of satellites visible from the receiver position.

Installation
------------

Expand Down
1 change: 1 addition & 0 deletions build_docs.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
# export requirements.txt for buildings docs
poetry config warnings.export false
poetry export -f requirements.txt --output ./docs/source/requirements.txt --with dev --without-hashes
# export requirements.txt for Conda environment setup
poetry export -f requirements.txt --output ./requirements.txt --without-hashes
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
# -- Project information -----------------------------------------------------

project = 'gnss_lib_py'
copyright = '2022, Stanford NAV Lab'
copyright = '2024, Stanford NAV Lab'
author = 'Ashwin Kanhere, Derek Knowles'


Expand Down
12 changes: 8 additions & 4 deletions docs/source/contributing/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ In your issue, please include:
* Your operating system name and version.
* Any details about your local setup that might be helpful in
troubleshooting.
* A minimal working example to reproduce the bug.
* A minimal working example (MWE) to reproduce the bug. An MWE
helps us reproduce the bug and troubleshoot the problem.
For more details on how to create an MWE, see
`this Stack Overflow guide <https://stackoverflow.com/help/minimal-reproducible-example>`.

Feature requests and feedback
-----------------------------

The best way to send feedback is to file an issue on
The best way to any send feedback is to file an issue on
`GitHub <https://github.com/Stanford-NavLab/gnss_lib_py/issues>`__.

If you are proposing a feature:
Expand All @@ -31,8 +34,9 @@ If you are proposing a feature:
* Keep the scope as narrow as possible, which will make it easier to
implement.
* This is a volunteer driven project and most contributions are a
result of other research projects. If you implement your requested
feature and submit a pull request, we will incorporate it.
result of other research projects. We welcome outside implementations
of additional features. If you implement your requested feature
and submit a pull request, we will incorporate it.

Additional Contributing Pages
-----------------------------
Expand Down
51 changes: 34 additions & 17 deletions docs/source/contributing/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ Standard GitHub Workflow

2. If using poetry, follow the :ref:`developer install instructions<developer install>`
to install pyenv, poetry, and the python dependencies. If using
:code:`pip` or :code:`conda` for package management instead, use
:code:`pip install -r requirements.txt` to install dependencies.
:code:`pip` or :code:`conda` for package management instead, install
dependencies using

.. code-block:: bash

pip install -r requirements.txt

3. Create a local branch:

Expand All @@ -36,16 +40,21 @@ Standard GitHub Workflow

If the feature branch includes new functionality, you must also:

* update the "Code Organization" section of the :code:`README.md`
* update the "Code Organization" section of
:code:`docs/source/index.rst` to match the :code:`README.md`
* add a section in the appropriate tutorial notebook located in
:code:`notebooks/tutorials/*`
* if the feature is in a new file, import the file in the
`module's import block <https://github.com/Stanford-NavLab/gnss_lib_py/blob/main/gnss_lib_py/__init__.py>`__.

If directory level changes were made, you must also:

* update the "Code Organization" section of the :code:`README.md`
* update the "Code Organization" section of
:code:`docs/source/index.rst` to match the :code:`README.md`


5. Add tests for the newly added code and ensure the new code is covered.
See the :ref:`Testing<testing>` section for more details.
See the :ref:`Testing<testing>` and :ref:`Coverage<coverage>` pages
for more details.

6. When you're done making changes run all the tests with:

Expand Down Expand Up @@ -93,9 +102,10 @@ Standard GitHub Workflow
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,
add a code review request for a current maintainer of the repository.
The reviewers might add comments to ensure compliance with the rest
of the code.
add a code review request for a current maintainer of the repository
and provide a brief description of the implemented features.
The reviewers might add comments or suggest changes to ensure
compliance with the rest of the code.

.. _navlab_dev:

Expand All @@ -119,14 +129,18 @@ NAVLab GitHub Workflow

If the feature branch includes new functionality, you must also:

* update the "Code Organization" section of the :code:`README.md`
* update the "Code Organization" section of
:code:`docs/source/index.rst` to match the :code:`README.md`
* add a section in the appropriate tutorial notebook located in
:code:`notebooks/tutorials/*`
* if the feature is in a new file, import the file in the
`module's import block <https://github.com/Stanford-NavLab/gnss_lib_py/blob/main/gnss_lib_py/__init__.py>`__.

If directory level changes were made, you must also:

* update the "Code Organization" section of the :code:`README.md`
* update the "Code Organization" section of
:code:`docs/source/index.rst` to match the :code:`README.md`


5. Add tests for the newly added code and ensure the new code is covered.
See the :ref:`Testing<testing>` section for more details.

Expand Down Expand Up @@ -214,19 +228,22 @@ Pull Request Review Workflow
3. Verify that documentation is complete and updated if necessary. See
the :ref:`Documentation<documentation>` section for more details on
what is expected.

If the feature branch included new functionality, the following
should have also been updated:

* the "Code Organization" section of the :code:`README.md`
* the "Code Organization" section of
:code:`docs/source/index.rst` to match the :code:`README.md`
* the appropriate tutorial notebook located in
:code:`notebooks/tutorials/*` with a simple example of the new
functionality
* if a new file was created, it should likely be imported in the
`module's import block <https://github.com/Stanford-NavLab/gnss_lib_py/blob/main/gnss_lib_py/__init__.py>`__.

If the directory structure was modified, the following should also have
been updated:

* the "Code Organization" section of the :code:`README.md`
* the "Code Organization" section of
:code:`docs/source/index.rst` to match the :code:`README.md`

4. Verify that all tests run on your system:

.. code-block:: bash
Expand All @@ -243,7 +260,7 @@ Pull Request Review 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/parsers --cov=gnss_lib_py/utils --cov-report=html
poetry run coverage report

See the :ref:`Coverage Report<coverage>` section for more details.
Expand Down
Loading