Skip to content

Commit

Permalink
Merge pull request #5 from semuconsulting/RC-1.0.2
Browse files Browse the repository at this point in the history
RC 1.0.2
  • Loading branch information
semuadmin authored Dec 6, 2024
2 parents 3882ddd + 89d389e commit a81211a
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 10 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 @@
"python.defaultInterpreterPath": "python3",
"modulename": "${workspaceFolderBasename}",
"distname": "${workspaceFolderBasename}",
"moduleversion": "1.0.1"
"moduleversion": "1.0.2"
}
6 changes: 6 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# pyubxutils Release Notes

### RELEASE 1.0.2

FIXES:

1. Fix typo in ubxbase config.

### RELEASE 1.0.1

ENHANCEMENTS:
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 = "pyubxutils"
authors = [{ name = "semuadmin", email = "semuadmin@semuconsulting.com" }]
maintainers = [{ name = "semuadmin", email = "semuadmin@semuconsulting.com" }]
description = "UBX Protocol Command Line Utilities"
version = "1.0.1"
version = "1.0.2"
license = { file = "LICENSE" }
readme = "README.md"
requires-python = ">=3.9"
Expand Down
2 changes: 1 addition & 1 deletion src/pyubxutils/_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.1"
__version__ = "1.0.2"
8 changes: 6 additions & 2 deletions src/pyubxutils/ubxbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
from serial import Serial

from pyubxutils._version import __version__ as VERSION
from pyubxutils.exceptions import ParameterError
from pyubxutils.globals import EPILOG, VERBOSITY_HIGH
from pyubxutils.helpers import h2sphp, ll2sphp, progbar, set_common_args

Expand Down Expand Up @@ -391,7 +392,7 @@ def fixedpos_in_range(value):

ap = ArgumentParser(epilog=EPILOG, formatter_class=ArgumentDefaultsHelpFormatter)
ap.add_argument("-V", "--version", action="version", version="%(prog)s " + VERSION)
ap.add_argument("-P", "--port", required=True, help="Serial port")
ap.add_argument("-P", "--port", required=False, help="Serial port")
ap.add_argument(
"--baudrate",
required=False,
Expand Down Expand Up @@ -464,7 +465,10 @@ def fixedpos_in_range(value):
default=WAITTIME,
)

kwargs = set_common_args("ubxload", ap, logdefault=VERBOSITY_HIGH)
kwargs = set_common_args("ubxbase", ap, logdefault=VERBOSITY_HIGH)

if kwargs.get("port", None) is None:
raise ParameterError("Serial port must be specified")

with Serial(
kwargs.get("port"), kwargs.pop("baudrate"), timeout=kwargs.pop("timeout")
Expand Down
12 changes: 9 additions & 3 deletions src/pyubxutils/ubxload.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

# pylint: disable=invalid-name

from argparse import ArgumentDefaultsHelpFormatter, ArgumentParser
from argparse import ArgumentDefaultsHelpFormatter, ArgumentError, ArgumentParser
from datetime import datetime, timedelta
from logging import getLogger
from math import ceil
Expand All @@ -40,6 +40,7 @@
from serial import Serial

from pyubxutils._version import __version__ as VERSION
from pyubxutils.exceptions import ParameterError
from pyubxutils.globals import EPILOG, VERBOSITY_HIGH
from pyubxutils.helpers import progbar, set_common_args

Expand Down Expand Up @@ -218,8 +219,8 @@ def main():

ap = ArgumentParser(epilog=EPILOG, formatter_class=ArgumentDefaultsHelpFormatter)
ap.add_argument("-V", "--version", action="version", version="%(prog)s " + VERSION)
ap.add_argument("-I", "--infile", required=True, help="Input file")
ap.add_argument("-P", "--port", required=True, help="Serial port")
ap.add_argument("-I", "--infile", required=False, help="Input file")
ap.add_argument("-P", "--port", required=False, help="Serial port")
ap.add_argument(
"--baudrate",
required=False,
Expand All @@ -245,6 +246,11 @@ def main():

kwargs = set_common_args("ubxload", ap, logdefault=VERBOSITY_HIGH)

if kwargs.get("port", None) is None:
raise ParameterError("Serial port must be specified")
if kwargs.get("infile", None) is None:
raise ParameterError("Input file must be specified")

with Serial(
kwargs.pop("port"), kwargs.pop("baudrate"), timeout=kwargs.pop("timeout")
) as serial_stream:
Expand Down
6 changes: 5 additions & 1 deletion src/pyubxutils/ubxsave.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
from serial import Serial

from pyubxutils._version import __version__ as VERSION
from pyubxutils.exceptions import ParameterError
from pyubxutils.globals import EPILOG, VERBOSITY_HIGH
from pyubxutils.helpers import progbar, set_common_args

Expand Down Expand Up @@ -272,7 +273,7 @@ def main():

ap = ArgumentParser(epilog=EPILOG, formatter_class=ArgumentDefaultsHelpFormatter)
ap.add_argument("-V", "--version", action="version", version="%(prog)s " + VERSION)
ap.add_argument("-P", "--port", required=True, help="Serial port")
ap.add_argument("-P", "--port", required=False, help="Serial port")
ap.add_argument(
"-O",
"--outfile",
Expand Down Expand Up @@ -305,6 +306,9 @@ def main():

kwargs = set_common_args("ubxsave", ap, logdefault=VERBOSITY_HIGH)

if kwargs.get("port", None) is None:
raise ParameterError("Serial port must be specified")

with open(kwargs.pop("outfile"), "wb") as outfile:
with Serial(
kwargs.pop("port"), kwargs.pop("baudrate"), timeout=kwargs.pop("timeout")
Expand Down
5 changes: 4 additions & 1 deletion src/pyubxutils/ubxsetrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def main():

ap = ArgumentParser(epilog=EPILOG, formatter_class=ArgumentDefaultsHelpFormatter)
ap.add_argument("-V", "--version", action="version", version="%(prog)s " + VERSION)
ap.add_argument("-P", "--port", required=True, help="Serial port")
ap.add_argument("-P", "--port", required=False, help="Serial port")
ap.add_argument(
"--baudrate",
required=False,
Expand Down Expand Up @@ -216,6 +216,9 @@ def main():

kwargs = set_common_args("ubxsetrate", ap, logdefault=VERBOSITY_HIGH)

if kwargs.get("port", None) is None:
raise ParameterError("Serial port must be specified")

try:
usr = UBXSetRate(**kwargs)
usr.apply()
Expand Down

0 comments on commit a81211a

Please sign in to comment.