Skip to content

Commit

Permalink
Merge pull request #60 from semuconsulting/RC-1.1.2
Browse files Browse the repository at this point in the history
Rc 1.1.2
  • Loading branch information
semuadmin authored Oct 10, 2024
2 parents 032ff99 + 10d7ac8 commit 02a450f
Show file tree
Hide file tree
Showing 16 changed files with 98 additions and 25 deletions.
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.8, 3.9, "3.10", "3.11", "3.12", "3.13.0-beta.3"]
python-version: [3.9, "3.10", "3.11", "3.12", "3.13.0-rc.3"]

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.8, 3.9, "3.10", "3.11", "3.12", "3.13.0-beta.3"]
python-version: [3.9, "3.10", "3.11", "3.12", "3.13.0-rc.3"]

steps:
- uses: actions/checkout@v4
Expand Down
34 changes: 34 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"
# You can also specify other tool versions:
# nodejs: "20"
# rust: "1.70"
# golang: "1.20"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
# fail_on_warning: true
# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"editor.formatOnSave": true,
"modulename": "${workspaceFolderBasename}",
"distname": "${workspaceFolderBasename}",
"moduleversion": "1.1.1"
"moduleversion": "1.1.2"
}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ If you're adding or amending rtcm payload definitions or configuration database
## 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 code should be compatible with Python >=3.9.
* The core code should be as generic and reusable as possible. We endeavour to limit the amount of processing dedicated to specific rtcm 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.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ This is an independent project and we have no affiliation whatsoever with the Ra

Parses RTCM3 messages into their constituent data fields - `DF002`, `DF003`, etc. Refer to the `RTCM_MSGIDS` dictionary in [`rtcmtypes_core.py`](https://github.com/semuconsulting/pyrtcm/blob/main/src/pyrtcm/rtcmtypes_core.py#L695) for a list of message types currently implemented. Additional message types can be readily added - see [Extensibility](#extensibility).

Sphinx API Documentation in HTML format is available at [https://www.semuconsulting.com/pyrtcm](https://www.semuconsulting.com/pyrtcm).
Sphinx API Documentation in HTML format is available at [Read the Docs](https://pyrtcm.readthedocs.io/)

Contributions welcome - please refer to [CONTRIBUTING.MD](https://github.com/semuconsulting/pyrtcm/blob/master/CONTRIBUTING.md).

Expand All @@ -50,7 +50,7 @@ Contributions welcome - please refer to [CONTRIBUTING.MD](https://github.com/sem
[![PyPI version](https://img.shields.io/pypi/v/pyrtcm.svg?style=flat)](https://pypi.org/project/pyrtcm/)
![PyPI downloads](https://img.shields.io/pypi/dm/pyrtcm.svg?style=flat)

`pyrtcm` is compatible with Python 3.8 - 3.13 and has no third-party library dependencies.
`pyrtcm` is compatible with Python 3.9 - 3.13 and has no third-party library dependencies.

In the following, `python3` & `pip` refer to the Python 3 executables. You may need to substitute `python` for `python3`, depending on your particular environment (*on Windows it's generally `python`*).

Expand Down
8 changes: 8 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# pyrtcm Release Notes

### RELEASE 1.1.2

CHANGES:

1. Sphinx documentation and docstrings enhanced to include global constants and decodes.
1. `socket_stream.SocketStream` class renamed to `socket_wrapper.SocketWrapper` class for clarity.
1. Drop active support for Python 3.8 - now End of Life as at October 2024.

### RELEASE 1.1.1

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 docs/pyrtcm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ pyrtcm.rtcmtypes\_get\_msm module
:undoc-members:
:show-inheritance:

pyrtcm.socket\_stream module
----------------------------
pyrtcm.socket\_wrapper module
-----------------------------

.. automodule:: pyrtcm.socket_stream
.. automodule:: pyrtcm.socket_wrapper
:members:
:undoc-members:
:show-inheritance:
Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sphinx-rtd-theme
11 changes: 5 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ name = "pyrtcm"
authors = [{ name = "semuadmin", email = "[email protected]" }]
maintainers = [{ name = "semuadmin", email = "[email protected]" }]
description = "RTCM3 protocol parser"
version = "1.1.1"
version = "1.1.2"
license = { file = "LICENSE" }
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.9"
classifiers = [
"Operating System :: OS Independent",
"Development Status :: 5 - Production/Stable",
Expand All @@ -22,7 +22,6 @@ classifiers = [
"Intended Audience :: Science/Research",
"Intended Audience :: End Users/Desktop",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand Down Expand Up @@ -55,10 +54,10 @@ test = [
]

[tool.black]
target-version = ['py38']
target-version = ['py39']

[tool.isort]
py_version = 38
py_version = 39
profile = "black"

[tool.bandit]
Expand All @@ -69,7 +68,7 @@ skips = []
jobs = 0
reports = "y"
recursive = "y"
py-version = "3.8"
py-version = "3.9"
fail-under = "9.8"
fail-on = "E,F"
clear-cache-post-run = "y"
Expand Down
2 changes: 1 addition & 1 deletion src/pyrtcm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
from pyrtcm.rtcmtypes_get import *
from pyrtcm.rtcmtypes_get_igs import *
from pyrtcm.rtcmtypes_get_msm import *
from pyrtcm.socket_stream import SocketStream
from pyrtcm.socket_wrapper import SocketWrapper

version = __version__ # pylint: disable=invalid-name
2 changes: 1 addition & 1 deletion src/pyrtcm/_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.1"
__version__ = "1.1.2"
4 changes: 2 additions & 2 deletions src/pyrtcm/rtcmreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from pyrtcm.rtcmhelpers import calc_crc24q
from pyrtcm.rtcmmessage import RTCMMessage
from pyrtcm.rtcmtypes_core import ERR_LOG, ERR_RAISE, NMEA_HDR, UBX_HDR, VALCKSUM
from pyrtcm.socket_stream import SocketStream
from pyrtcm.socket_wrapper import SocketWrapper


class RTCMReader:
Expand Down Expand Up @@ -66,7 +66,7 @@ def __init__(
"""

if isinstance(datastream, socket):
self._stream = SocketStream(datastream, bufsize=bufsize)
self._stream = SocketWrapper(datastream, bufsize=bufsize)
else:
self._stream = datastream
self._quitonerror = quitonerror
Expand Down
24 changes: 21 additions & 3 deletions src/pyrtcm/rtcmtypes_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,34 @@
b"$W",
]
UBX_HDR = b"\xb5\x62"
"""UBX message header"""
RTCM_HDR = b"\xd3"
NMEA_PROTOCOL = 1
UBX_PROTOCOL = 2
RTCM3_PROTOCOL = 4
"""RTCM3 message header"""
GET = 0
"""GET (receive, response) message types"""
SET = 1
"""SET (command) message types"""
POLL = 2
"""POLL (query) message types"""
SETPOLL = 3
"""SETPOLL (SET or POLL) message types"""
VALNONE = 0
"""Do not validate checksum"""
VALCKSUM = 1
"""Validate checksum"""
NMEA_PROTOCOL = 1
"""NMEA Protocol"""
UBX_PROTOCOL = 2
"""UBX Protocol"""
RTCM3_PROTOCOL = 4
"""RTCM3 Protocol"""
ERR_RAISE = 2
"""Raise error and quit"""
ERR_LOG = 1
"""Log errors"""
ERR_IGNORE = 0
"""Ignore errors"""

NA = "N/A"

NSAT = "NSat"
Expand Down Expand Up @@ -892,9 +908,11 @@
"112": ("BEIDOU", "DF427"),
"113": ("NAVIC", "DF546"),
}
"""Map of MSM message identity prefix to GNSS name & epoch attribute name"""

# map of 4076_201 coefficients
COEFFS = {
0: ("IDF039", "Cosine Coefficients"),
1: ("IDF040", "Sine Coefficients"),
}
"""Map of 4076_01 message coefficient data attributes"""
4 changes: 2 additions & 2 deletions src/pyrtcm/socket_stream.py → src/pyrtcm/socket_wrapper.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
socket_stream class.
socket_wrapper class.
A skeleton socket wrapper which provides basic stream-like
read(bytes) and readline() methods.
Expand All @@ -19,7 +19,7 @@
from socket import socket


class SocketStream:
class SocketWrapper:
"""
socket stream class.
"""
Expand Down

0 comments on commit 02a450f

Please sign in to comment.