Skip to content

Commit

Permalink
Merge pull request #66 from semuconsulting/RC-1.0.27
Browse files Browse the repository at this point in the history
Rc 1.0.27
  • Loading branch information
semuadmin committed May 16, 2024
2 parents 3303ba5 + 11b8653 commit f74eaa1
Show file tree
Hide file tree
Showing 9 changed files with 297 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"python3.8InterpreterPath": "/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8",
"modulename": "${workspaceFolderBasename}",
"distname": "${workspaceFolderBasename}",
"moduleversion": "1.0.26"
"moduleversion": "1.0.27"
}
25 changes: 12 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

**pygnssutils** is a volunteer project and we appreciate any contribution, from fixing a grammar mistake in a comment to extending device test coverage or implementing new functionality. Please read this section if you are contributing your work.

If you're intending to make significant changes, please raise them in the [Discussions Channel](https://github.com/semuconsulting/pygnssutils/discussions/categories/ideas) beforehand.

Being one of our contributors, you agree and confirm that:

* The work is all your own.
Expand All @@ -10,38 +12,35 @@ Being one of our contributors, you agree and confirm that:

Please help us keep our issue list small by adding fixes: #{$ISSUE_NO} to the commit message of pull requests that resolve open issues. GitHub will use this tag to auto close the issue when the PR is merged.

If you're adding or amending UBX payload definitions or configuration database keys, it would be helpful to quote/hyperlink the documentation source (e.g. specific u-blox Interface Specification).

## Coding conventions

* This is open source software. Code should be as simple and transparent as possible. Favour clarity over brevity.
* The code should be compatible with Python >= 3.8.
* The core code should be as generic and reusable as possible. We endeavour to limit the amount of processing dedicated to specific UBX message types, though this is sometimes unavoidable.
* Avoid external library dependencies unless there's a compelling reason not to.
* We use and recommend [Visual Studio Code](https://code.visualstudio.com/) with the [Python Extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python) for development and testing.
* Code should be documented in accordance with [Sphinx](https://www.sphinx-doc.org/en/master/) docstring conventions.
* Code should formatted using [black](https://pypi.org/project/black/) (>= 20.8).
* We use and recommend [pylint](https://pypi.org/project/pylint/) (>=2.6.0) for code analysis.
* We use and recommend [bandit](https://pypi.org/project/bandit/) (>=1.7) for security vulnerability analysis.
* Commits should be [signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits).
* Code should formatted using [black](https://pypi.org/project/black/) (>= 24.4).
* We use and recommend [pylint](https://pypi.org/project/pylint/) (>=3.0.1) for code analysis.
* We use and recommend [bandit](https://pypi.org/project/bandit/) (>=1.7.5) for security vulnerability analysis.
* Commits must be [signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits).

## Testing

While we endeavour to test on as wide a variety of u-blox devices as possible, as a volunteer project we only have a limited number of devices available. We particularly welcome testing contributions relating to specialised devices (e.g. high precision HP, real-time kinematics RTK, automotive dead-reckoning ADR, etc.).

We use python's native pytest framework for local unit testing, complemented by the GitHub Actions automated build and testing workflow. We endeavour to have 100% code coverage.
We use python's native pytest framework for local unit testing, complemented by the GitHub Actions automated build and testing workflow.

Please write pytest examples for new code you create and add them to the `/tests` folder following the naming convention `test_*.py`.

We test on the following platforms using a variety of u-blox devices including NEO-M7, NEO-M8, NEO-M9, NEO-M10s and ZED-F9P:
We test on the following platforms using a variety of u-blox devices from Generation 7 throught Generation 10:
* Windows 11
* MacOS (Ventura, Sonoma; Intel & Apple Silicon)
* Linux (Ubuntu Kinetic, Lunar)
* Raspberry Pi OS (Bullseye 32-bit & 64-bit)
* MacOS (Ventura & Sonoma, Intel & Apple Silicon)
* Linux (Ubuntu 22.04 LTS Jammy Jellyfish, 24.04 LTS Noble Numbat)
* Raspberry Pi OS (32-bit & 64-bit)

## Submitting changes

Please send a [GitHub Pull Request to pyubx2](https://github.com/semuconsulting/pyubx2/pulls) with a clear list of what you've done (read more about [pull requests](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/about-pull-requests)). Please follow our coding conventions (above) and make sure all of your commits are atomic (one feature per commit).
Please send a [GitHub Pull Request to pygnssutils](https://github.com/semuconsulting/pygnssutils/pulls) with a clear list of what you've done (read more about [pull requests](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/about-pull-requests)). Please follow our coding conventions (above) and make sure all of your commits are atomic (one feature per commit).

Please sign all commits - see [Signing GitHub Commits](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) for instructions.

Expand Down
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pygnssutils
[gnssmqttclient CLI](#gnssmqttclient) |
[ubxsimulator](#ubxsimulator) |
[ubxsetrate CLI](#ubxsetrate) |
[ubxcompare CLI](#ubxcompare) |
[Troubleshooting](#troubleshooting) |
[Graphical Client](#gui) |
[Author & License](#author)
Expand All @@ -34,6 +35,7 @@ designated output stream.
1. [`ubxsave`](#ubxsave) CLI utility. This saves a complete set of configuration data from any Generation 9+ u-blox device (e.g. NEO-M9N or ZED-F9P) to a file. The file can then be reloaded to any compatible device using the `ubxload` utility.
1. [`ubxload`](#ubxload) CLI utility. This reads a file containing binary configuration data and loads it into any compatible Generation 9+ u-blox device (e.g. NEO-M9N or ZED-F9P).
1. [`ubxsetrate`](#ubxsetrate) CLI utility. A simple utility which sets NMEA or UBX message rates on u-blox GNSS receivers.
1. [`ubxcompare`](#ubxcompare) CLI utility. Utility for comparing two or more u-blox config files in either text (\*.txt) or binary (\*.ubx) format. Output files from the `ubxsave` utility can be used as binary input files.

The pygnssutils homepage is located at [https://github.com/semuconsulting/pygnssutils](https://github.com/semuconsulting/pygnssutils).

Expand Down Expand Up @@ -422,6 +424,43 @@ For help and full list of optional arguments, type:
> ubxsetrate -h
```
---
## <a name="ubxcompare">ubxcompare CLI</a>
```
class pygnssutils.ubxcompare.UBXCompare(infiles, form, diffsonly)
```
A simple CLI utility for comparing the contents of two or more u-blox configuration files. Files can be in text (\*.txt) format (as used by u-center or ArduSimple) or binary (\*.ubx) format (as used by [PyGPSClient](https://github.com/semuconsulting/PyGPSClient) or [ubxsave](#ubxsave)).
e.g.
```
ubxcompare --infiles "simpleRTK2B_FW132_Rover_1Hz-00.txt, simpleRTK2B_FW132_Rover_10Hz-00.txt" --format 0 --diffsonly 1
```
```
24 configuration commands processed in simpleRTK2B_FW132_Rover_1Hz-00.txt
24 configuration commands processed in simpleRTK2B_FW132_Rover_10Hz-00.txt
2 files processed, list of differences in config keys and their values follows:
CFG_MSGOUT_NMEA_ID_GSA_UART1 (DIFFS!): {1: '1', 2: '0'}
CFG_MSGOUT_NMEA_ID_GSA_UART2 (DIFFS!): {1: '1', 2: '0'}
CFG_MSGOUT_NMEA_ID_GSV_UART1 (DIFFS!): {1: '1', 2: '0'}
CFG_MSGOUT_NMEA_ID_GSV_UART2 (DIFFS!): {1: '1', 2: '0'}
CFG_RATE_MEAS (DIFFS!): {1: '1000', 2: '100'}
Total config keys: 1475. Total differences: 5.
```
For help and full list of optional arguments, type:
```shell
> ubxcompare -h
```
---
## <a name="troubleshooting">Troubleshooting</a>
Expand Down
6 changes: 6 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# pygnssutils Release Notes

### RELEASE 1.0.27

ENHANCEMENTS:

1. Add `ubxcompare` CLI utility.

### RELEASE 1.0.26

FIXES:
Expand Down
8 changes: 8 additions & 0 deletions docs/pygnssutils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ pygnssutils.socket\_server module
:undoc-members:
:show-inheritance:

pygnssutils.ubxcompare module
-----------------------------

.. automodule:: pygnssutils.ubxcompare
:members:
:undoc-members:
:show-inheritance:

pygnssutils.ubxload module
--------------------------

Expand Down
11 changes: 6 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "pygnssutils"
authors = [{ name = "semuadmin", email = "semuadmin@semuconsulting.com" }]
maintainers = [{ name = "semuadmin", email = "semuadmin@semuconsulting.com" }]
description = "GNSS Command Line Utilities"
version = "1.0.26"
version = "1.0.27"
license = { file = "LICENSE" }
readme = "README.md"
requires-python = ">=3.8"
Expand Down Expand Up @@ -35,10 +35,10 @@ classifiers = [

dependencies = [
"certifi>=2024.0.0",
"paho-mqtt>=1.6.0",
"paho-mqtt>=2.0.0",
"pyserial>=3.5",
"pyspartn>=0.4.0",
"pyubx2>=1.2.39",
"pyspartn>=1.0.0",
"pyubx2>=1.2.40",
]

[project.scripts]
Expand All @@ -50,6 +50,7 @@ ubxsetrate = "pygnssutils.ubxsetrate:main"
ubxsave = "pygnssutils.ubxsave:main"
ubxload = "pygnssutils.ubxload:main"
ubxsimulator = "pygnssutils.ubxsimulator:main"
ubxcompare = "pygnssutils.ubxcompare:main"

[project.urls]
homepage = "https://github.com/semuconsulting/pygnssutils"
Expand Down Expand Up @@ -102,7 +103,7 @@ disable = """

[tool.pytest.ini_options]
minversion = "7.0"
addopts = "--cov --cov-report html --cov-fail-under 35"
addopts = "--cov --cov-report html --cov-fail-under 34"
pythonpath = ["src"]

[tool.coverage.run]
Expand Down
2 changes: 1 addition & 1 deletion src/pygnssutils/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
:license: BSD 3-Clause
"""

__version__ = "1.0.26"
__version__ = "1.0.27"
Loading

0 comments on commit f74eaa1

Please sign in to comment.