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

Rc 1.1.4 #94

Merged
merged 12 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/checkpr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, "3.10", "3.11", "3.12", "3.13.0-rc.3"]
python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, "3.10", "3.11", "3.12", "3.13.0-rc.3"]
python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4
Expand Down
5 changes: 2 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
"python.testing.pytestEnabled": true,
"python.testing.unittestEnabled": false,
"editor.formatOnSave": true,
"python3.8InterpreterPath": "/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8",
"python.defaultInterpreterPath": "python3",
"modulename": "${workspaceFolderBasename}",
"distname": "${workspaceFolderBasename}",
"moduleversion": "1.1.3",
"python.defaultInterpreterPath": "python3"
"moduleversion": "1.1.4"
}
10 changes: 0 additions & 10 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,6 @@
],
"problemMatcher": []
},
{
"label": "Test3.8",
"type": "process",
"command": "${config:python3.8InterpreterPath}",
"args": [
"-m",
"pytest",
],
"problemMatcher": []
},
{
"label": "Sphinx",
"type": "process",
Expand Down
10 changes: 10 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# pygnssutils Release Notes

### RELEASE 1.1.4

ENHANCEMENTS:

1. Fix UnicodeDecodeError in gnssntripclient - Fixes [#93](https://github.com/semuconsulting/pygnssutils/issues/93).
1. Fix occasional `ubxload` 'lockups' - Fixes [#48](https://github.com/semuconsulting/pygnssutils/issues/48).
1. Update `ubx...` utilities to use common logging provisions.
1. Drop active support for Python 3.8 - End of Life as at October 2024.
1. Update min pyubx2 version to 1.2.47.

### RELEASE 1.1.3

ENHANCEMENTS:
Expand Down
15 changes: 14 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,20 @@
# html_static_path = ["_static"]
html_last_updated_fmt = "%b %d %Y"
html_theme_options = {
"display_version": True,
"logo_only": False,
"prev_next_buttons_location": "bottom",
"style_external_links": False,
"vcs_pageview_mode": "",
"style_nav_header_background": "white",
"flyout_display": "hidden",
"version_selector": True,
"language_selector": True,
# Toc options
"collapse_navigation": True,
"sticky_navigation": True,
"navigation_depth": 4,
"includehidden": True,
"titles_only": False,
}

autodoc_default_options = {
Expand Down
6 changes: 3 additions & 3 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 = "[email protected]" }]
maintainers = [{ name = "semuadmin", email = "[email protected]" }]
description = "GNSS Command Line Utilities"
version = "1.1.3"
version = "1.1.4"
license = { file = "LICENSE" }
readme = "README.md"
requires-python = ">=3.9"
Expand Down Expand Up @@ -37,8 +37,8 @@ dependencies = [
"certifi>=2024.0.0",
"paho-mqtt>=1.6.0", # waiting for >=2.0.0 in Conda
"pyserial>=3.5",
"pyspartn>=1.0.3",
"pyubx2>=1.2.46",
"pyspartn>=1.0.4",
"pyubx2>=1.2.47",
]

[project.scripts]
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.1.3"
__version__ = "1.1.4"
2 changes: 1 addition & 1 deletion src/pygnssutils/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
ALLNMEA_CLS = [b"\xF0", b"\xF1"]
MINMMEA_ID = [b"\xF0\x00", b"\xF0\x02", b"\xF0\x03", b"\xF0\x04", b"\xF0\x05"]
ALLUBX_CLS = [b"\x01"]
MINUBX_ID = [b"\x01\x07", b"\x01\x35"]
MINUBX_ID = [b"\x01\x04", b"\x01\x07", b"\x01\x35"]

TOPIC_KEY = "/pp/ubx/0236/{}"
TOPIC_ASSIST = "/pp/ubx/mga"
Expand Down
3 changes: 2 additions & 1 deletion src/pygnssutils/gnssntripclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,8 @@ def _parse_response_header(self, data: bytes) -> bytes:
hdr, bdy = hdrbdy[0], b""
else: # has body content
hdr, bdy = hdrbdy
hdr = hdr.decode().split("\r\n")
# some legacy casters use cp1250 rather than utf-8
hdr = hdr.decode(errors="backslashreplace").split("\r\n")
status = hdr[0].split(" ", 3)
self._response_status = {
"protocol": status[0],
Expand Down
4 changes: 2 additions & 2 deletions src/pygnssutils/gnssntripclient_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def main():
"--datatype",
required=False,
help="Data type (RTCM or SPARTN)",
choices=[RTCM, "rtcm", SPARTN, "spartn"],
choices=[RTCM, RTCM.upper(), SPARTN, SPARTN.upper()],
default=RTCM,
)
ap.add_argument(
Expand Down Expand Up @@ -186,7 +186,7 @@ def main():
ap.add_argument(
"--spartnkey",
required=False,
help="Decryption key for encrypted SPARTN payloads",
help="Hexadecimal decryption key for encrypted SPARTN payloads",
default=getenv(ENV_MQTT_KEY, default=None),
)
ap.add_argument(
Expand Down
2 changes: 1 addition & 1 deletion src/pygnssutils/gnssstreamer.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from logging import getLogger
from queue import Empty, Queue
from threading import Event, Thread
from time import sleep, time
from time import time

from pynmeagps import NMEAMessage, NMEAParseError
from pyrtcm import RTCMMessage, RTCMParseError
Expand Down
22 changes: 13 additions & 9 deletions src/pygnssutils/ubxcompare.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"""

from argparse import ArgumentDefaultsHelpFormatter, ArgumentParser
from logging import getLogger

from pyubx2 import (
POLL_LAYER_BBR,
Expand All @@ -38,7 +39,8 @@
)

from pygnssutils._version import __version__ as VERSION
from pygnssutils.globals import EPILOG
from pygnssutils.globals import EPILOG, VERBOSITY_HIGH
from pygnssutils.helpers import set_common_args

CFG = b"\x06"
VALGET = b"\x8b"
Expand All @@ -59,6 +61,7 @@ def __init__(self, infiles: str, form: int = FORMAT_TXT, diffsonly: bool = True)
:param bool diffsonly: True = show diffs only, False = show entire config (True)
"""

self.logger = getLogger(__name__)
if infiles in ("", None):
raise ValueError("--infiles parameter must not be blank")

Expand All @@ -72,9 +75,9 @@ def __init__(self, infiles: str, form: int = FORMAT_TXT, diffsonly: bool = True)
fcount += 1
self.parse_file(cfgdict, file.strip(), fcount, form)

print(
f"\n{fcount} files processed, list of {'differences in' if diffsonly else 'all'}",
"config keys and their values follows:\n",
self.logger.info(
f"{fcount} files processed, list of {'differences in' if diffsonly else 'all'}"
" config keys and their values follows: ",
)

for key, vals in dict(sorted(cfgdict.items())).items():
Expand All @@ -87,7 +90,7 @@ def __init__(self, infiles: str, form: int = FORMAT_TXT, diffsonly: bool = True)
if (diffsonly and diff) or not diffsonly:
print(f"{key} ({'DIFFS!' if diff else None}); {str(vals).strip('{}')}")

print(f"\nTotal config keys: {kcount}. Total differences: {dcount}.")
self.logger.info(f"Total config keys: {kcount}. Total differences: {dcount}.")

def parse_line(self, line: str) -> UBXMessage:
"""
Expand Down Expand Up @@ -174,9 +177,9 @@ def parse_file(self, cfgdict: dict, filename: str, fileno: int, form: int):
self.get_attrs(cfgdict, str(parsed), fileno)
i += 1
except Exception as err:
print(f"\nERROR parsing {filename}! \n{err}")
self.logger.error(f"ERROR parsing {filename}! \n{err}")

print(f"\n{i} configuration commands processed in {filename}")
self.logger.info(f"\n{i} configuration commands processed in {filename}")


def main():
Expand Down Expand Up @@ -214,8 +217,9 @@ def main():
default=1,
)

args = ap.parse_args()
UBXCompare(args.infiles, args.format, args.diffsonly)
kwargs = set_common_args("ubxcompare", ap, logdefault=VERBOSITY_HIGH)

UBXCompare(kwargs.pop("infiles"), kwargs.pop("format"), kwargs.pop("diffsonly"))


if __name__ == "__main__":
Expand Down
Loading