Skip to content

Commit

Permalink
update to v1.1.2, update docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
semuadmin committed Aug 25, 2024
1 parent 7445fe6 commit e1b1a9a
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 14 deletions.
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"
}
7 changes: 7 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# 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.

### RELEASE 1.1.1

ENHANCEMENTS:
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ 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"
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 e1b1a9a

Please sign in to comment.