From 657504f36cd6040f7151376ee1803ca8ec74742b Mon Sep 17 00:00:00 2001 From: Jared Coughlin <30010597+jcoughlin11@users.noreply.github.com> Date: Tue, 31 Oct 2023 15:01:36 -0400 Subject: [PATCH] [FX-431]-v12.0.0 (#123) * Catches exception if close fails. * Adds fxIsOpen, fxIsStreaming, and find_device_ports. * Bumps version to 12.0.0. * Adds motorStopOnDisconnect. * Adds pyserial as a dependency. * Fixes a bug in streaming. * Reverted stdout redirection in find_device_ports. * Lints. * Adds stop_motor to the demos. * Makes find_device_ports only work on linux. * find_device_ports no longer raises an exception if no devices are found. * Uses pyudev instead of pyserial to find ports. * Adds pyudev as a dependency. * Adds pyudev to pre-commit and lints. --------- Co-authored-by: Jared --- .pre-commit-config.yaml | 2 +- demos/demo1.py | 1 + demos/demo2.py | 1 + demos/demo3.py | 1 + demos/demo4.py | 1 + flexsea/__init__.py | 2 +- flexsea/device.py | 67 +++++++++++++------ flexsea/utilities/library.py | 6 ++ flexsea/utilities/system.py | 22 +++++- poetry.lock | 125 +++++++---------------------------- pyproject.toml | 3 +- 11 files changed, 105 insertions(+), 126 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 16000109..9aea4a96 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -47,7 +47,7 @@ repos: - --output-format=colorized additional_dependencies: - boto3 - - pyserial + - pyudev - semantic-version - seaborn - nox diff --git a/demos/demo1.py b/demos/demo1.py index a13193a5..07cc4aee 100644 --- a/demos/demo1.py +++ b/demos/demo1.py @@ -70,4 +70,5 @@ # Once we're done using the device, we should clean up by calling the # close method +device.stop_motor() device.close() diff --git a/demos/demo2.py b/demos/demo2.py index 1d7691c8..7d23e921 100644 --- a/demos/demo2.py +++ b/demos/demo2.py @@ -117,6 +117,7 @@ # complete the command sleep(commandDelay) +device.stop_motor() device.close() diff --git a/demos/demo3.py b/demos/demo3.py index 253d449d..55c297eb 100644 --- a/demos/demo3.py +++ b/demos/demo3.py @@ -108,4 +108,5 @@ def clear() -> None: device.stop_motor() sleep(commandDelay) +device.stop_motor() device.close() diff --git a/demos/demo4.py b/demos/demo4.py index a7c5d15b..c87eec78 100644 --- a/demos/demo4.py +++ b/demos/demo4.py @@ -97,6 +97,7 @@ sleep(commandDelay) +device.stop_motor() device.close() diff --git a/flexsea/__init__.py b/flexsea/__init__.py index d87ee3fc..0e21ac94 100644 --- a/flexsea/__init__.py +++ b/flexsea/__init__.py @@ -1 +1 @@ -__version__ = "11.0.9" +__version__ = "12.0.0" diff --git a/flexsea/device.py b/flexsea/device.py index 596728be..7bdddfde 100644 --- a/flexsea/device.py +++ b/flexsea/device.py @@ -88,6 +88,17 @@ class Device: Time, in seconds, spent trying to connect to S3 before an exception is raised. + stopMotorOnDisconnect : bool, optional + If ``True``, ``stop_motor`` is called by ``close`` (which, in + turn, is called by the desctructor). If ``False``, ``stop_motor`` + is **not** called by ``close`` or the destructor. The default + value is ``False``. This is useful for on-device controllers + (controllers that are baked into the device firmware), so + that, should the device become disconnected from the computer it + is streaming data to, the controller will not suddenly shut off + and cause the wearer to potentially fall. If this is ``True``, you + must call ``stop_motor`` manually. + Attributes ---------- @@ -165,19 +176,15 @@ def __init__( interactive: bool = True, debug: bool = False, s3Timeout: int = 60, + stopMotorOnDisconnect: bool = False, ) -> None: if not debug: sys.tracebacklimit = 0 fxc.dephyPath.mkdir(parents=True, exist_ok=True) - # These are first so the destructor won't complain about the - # class not having connected and streaming attributes if getting - # and loading the C library fails (since these attrs are - # referenced in the destructor) - self.connected: bool = False - self.streaming: bool = False self.port: str = port self.interactive = interactive + self._stopMotorOnDisconnect = stopMotorOnDisconnect self.firmwareVersion = validate_given_firmware_version( firmwareVersion, self.interactive, s3Timeout @@ -240,7 +247,13 @@ def __init__( # destructor # ----- def __del__(self) -> None: - self.close() + if self.connected: + try: + self.close() + except RuntimeError: + print("Failed to close connection. Is the device disconnected or off?") + else: + print("Closed connection to device.") # ----- # open @@ -257,7 +270,7 @@ def open(self, bootloading: bool = False) -> None: ---------- bootloading : bool (optional) This keyword is really onlymeant to be used by the - bootloader and a user of `flexsea` should not have to use + bootloader and a user of ``flexsea`` should not have to use it at all. Starting with v12.0.0, a development version number was introduced. We can only connect to the device if both the @@ -285,8 +298,6 @@ def open(self, bootloading: bool = False) -> None: if self.id in (self._INVALID_DEVICE.value, -1): raise RuntimeError("Failed to connect to device.") - self.connected = True - self._name = self.name self._side = self.side self._hasHabs = self._name not in fxc.noHabs @@ -352,17 +363,19 @@ def _get_fields(self) -> None: # ----- def close(self) -> None: """ - Severs connection with device. + Severs connection with device. Does not stop the motor by + default. To stop the motor on a call to ``close``, Will no longer be able to send commands or receive data. """ - if self.streaming: - self.stop_streaming() + if self.connected or self.streaming: + if self._stopMotorOnDisconnect: + self.stop_motor() + # fxClose calls fxStopStreaming for us + retCode = self._clib.fxClose(self.id) - if self.connected: - self.stop_motor() - self._clib.fxClose(self.id) - self.connected = False + if retCode != self._SUCCESS.value: + raise RuntimeError("Failed to close connection.") # ----- # start_streaming @@ -415,8 +428,6 @@ def start_streaming( else: self._stream_without_safety() - self.streaming = True - # ----- # _stream_with_safety # ----- @@ -453,8 +464,6 @@ def stop_streaming(self) -> None: if retCode != self._SUCCESS.value: raise RuntimeError("Failed to stop streaming.") - self.streaming = False - # ----- # set_gains # ----- @@ -1631,3 +1640,19 @@ def set_file_size(self, size) -> None: The desired name of the log file """ return self._clib.fxSetLoggerSize(size, self.id) + + # ----- + # connected + # ----- + @property + def connected(self) -> bool: + return self._clib.fxIsOpen(self.id) + + # ----- + # streaming + # ----- + @property + def streaming(self) -> bool: + if self.connected: + return self._clib.fxIsStreaming(self.id) + return False diff --git a/flexsea/utilities/library.py b/flexsea/utilities/library.py index 4004daf0..5e93d268 100644 --- a/flexsea/utilities/library.py +++ b/flexsea/utilities/library.py @@ -138,6 +138,9 @@ def _set_prototypes(clib: c.CDLL, firmwareVersion: Version) -> c.CDLL: clib.fxOpen.argtypes = [c.c_char_p, c.c_uint, c.c_uint] clib.fxOpen.restype = c.c_int + clib.fxIsOpen.argtypes = [c.c_uint] + clib.fxIsOpen.restype = c.c_bool + # Limited open if firmwareVersion >= Version("12.0.0"): try: @@ -160,6 +163,9 @@ def _set_prototypes(clib: c.CDLL, firmwareVersion: Version) -> c.CDLL: clib.fxStartStreaming.argtypes = [c.c_uint, c.c_uint, c.c_bool] clib.fxStartStreaming.restype = c.c_int + clib.fxIsStreaming.argtypes = [c.c_uint] + clib.fxIsStreaming.restype = c.c_bool + # Log file specification if firmwareVersion >= Version("12.0.0"): try: diff --git a/flexsea/utilities/system.py b/flexsea/utilities/system.py index b909e41e..d5937ab1 100644 --- a/flexsea/utilities/system.py +++ b/flexsea/utilities/system.py @@ -1,8 +1,12 @@ import platform +from typing import List -# ... +import pyudev +# ============================================ +# get_os +# ============================================ def get_os() -> str: """ Returns the operating system and "bitness" (64 or 32 bit). @@ -26,3 +30,19 @@ def get_os() -> str: system = "pi" return system + "_" + platform.architecture()[0] + + +# ============================================ +# find_stm_ports +# ============================================ +def find_stm_ports() -> List[str]: + if "windows" in get_os(): + raise OSError("This function only works on Linux.") + + context = pyudev.Context() + devicePorts = [] + + for device in context.list_devices(ID_VENDOR="STMicroelectronics", block="tty"): + devicePorts.append(device.device_node) + + return devicePorts diff --git a/poetry.lock b/poetry.lock index d71c6722..1858930b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,10 +1,9 @@ -# This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. [[package]] name = "accessible-pygments" version = "0.0.4" description = "A collection of accessible pygments styles" -category = "dev" optional = false python-versions = "*" files = [ @@ -19,7 +18,6 @@ pygments = ">=1.5" name = "alabaster" version = "0.7.13" description = "A configurable sidebar-enabled Sphinx theme" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -31,7 +29,6 @@ files = [ name = "appnope" version = "0.1.3" description = "Disable App Nap on macOS >= 10.9" -category = "dev" optional = false python-versions = "*" files = [ @@ -43,7 +40,6 @@ files = [ name = "argcomplete" version = "2.1.2" description = "Bash tab completion for argparse" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -59,7 +55,6 @@ test = ["coverage", "flake8", "mypy", "pexpect", "wheel"] name = "astroid" version = "2.15.2" description = "An abstract syntax tree for Python with inference support." -category = "dev" optional = false python-versions = ">=3.7.2" files = [ @@ -75,7 +70,6 @@ wrapt = {version = ">=1.14,<2", markers = "python_version >= \"3.11\""} name = "asttokens" version = "2.2.1" description = "Annotate AST trees with source code positions" -category = "dev" optional = false python-versions = "*" files = [ @@ -93,7 +87,6 @@ test = ["astroid", "pytest"] name = "babel" version = "2.12.1" description = "Internationalization utilities" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -105,7 +98,6 @@ files = [ name = "backcall" version = "0.2.0" description = "Specifications for callback functions passed in to an API" -category = "dev" optional = false python-versions = "*" files = [ @@ -117,7 +109,6 @@ files = [ name = "beautifulsoup4" version = "4.12.2" description = "Screen-scraping library" -category = "dev" optional = false python-versions = ">=3.6.0" files = [ @@ -136,7 +127,6 @@ lxml = ["lxml"] name = "black" version = "23.3.0" description = "The uncompromising code formatter." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -184,7 +174,6 @@ uvloop = ["uvloop (>=0.15.2)"] name = "boto3" version = "1.26.110" description = "The AWS SDK for Python" -category = "main" optional = false python-versions = ">= 3.7" files = [ @@ -204,7 +193,6 @@ crt = ["botocore[crt] (>=1.21.0,<2.0a0)"] name = "botocore" version = "1.29.110" description = "Low-level, data-driven core of boto 3." -category = "main" optional = false python-versions = ">= 3.7" files = [ @@ -224,7 +212,6 @@ crt = ["awscrt (==0.16.9)"] name = "certifi" version = "2023.7.22" description = "Python package for providing Mozilla's CA Bundle." -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -236,7 +223,6 @@ files = [ name = "cfgv" version = "3.3.1" description = "Validate configuration and produce human readable error messages." -category = "dev" optional = false python-versions = ">=3.6.1" files = [ @@ -248,7 +234,6 @@ files = [ name = "charset-normalizer" version = "3.2.0" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -category = "dev" optional = false python-versions = ">=3.7.0" files = [ @@ -333,7 +318,6 @@ files = [ name = "click" version = "8.1.3" description = "Composable command line interface toolkit" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -348,7 +332,6 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""} name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." -category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ @@ -360,7 +343,6 @@ files = [ name = "colorlog" version = "6.7.0" description = "Add colours to the output of Python's logging module." -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -378,7 +360,6 @@ development = ["black", "flake8", "mypy", "pytest", "types-colorama"] name = "contourpy" version = "1.0.7" description = "Python library for calculating contours of 2D quadrilateral grids" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -453,7 +434,6 @@ test-no-images = ["pytest"] name = "cycler" version = "0.11.0" description = "Composable style cycles" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -465,7 +445,6 @@ files = [ name = "decorator" version = "5.1.1" description = "Decorators for Humans" -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -477,7 +456,6 @@ files = [ name = "dill" version = "0.3.6" description = "serialize all of python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -492,7 +470,6 @@ graph = ["objgraph (>=1.7.2)"] name = "distlib" version = "0.3.6" description = "Distribution utilities" -category = "dev" optional = false python-versions = "*" files = [ @@ -504,7 +481,6 @@ files = [ name = "docutils" version = "0.20.1" description = "Docutils -- Python Documentation Utilities" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -516,7 +492,6 @@ files = [ name = "executing" version = "1.2.0" description = "Get the currently executing AST node of a frame, and other information" -category = "dev" optional = false python-versions = "*" files = [ @@ -531,7 +506,6 @@ tests = ["asttokens", "littleutils", "pytest", "rich"] name = "filelock" version = "3.11.0" description = "A platform independent file lock." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -547,7 +521,6 @@ testing = ["covdefaults (>=2.3)", "coverage (>=7.2.2)", "diff-cover (>=7.5)", "p name = "fonttools" version = "4.39.3" description = "Tools to manipulate font files" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -573,7 +546,6 @@ woff = ["brotli (>=1.0.1)", "brotlicffi (>=0.8.0)", "zopfli (>=0.1.4)"] name = "identify" version = "2.5.22" description = "File identification library for Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -588,7 +560,6 @@ license = ["ukkonen"] name = "idna" version = "3.4" description = "Internationalized Domain Names in Applications (IDNA)" -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -600,7 +571,6 @@ files = [ name = "imagesize" version = "1.4.1" description = "Getting image size from png/jpeg/jpeg2000/gif file" -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -612,7 +582,6 @@ files = [ name = "iniconfig" version = "2.0.0" description = "brain-dead simple config-ini parsing" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -624,7 +593,6 @@ files = [ name = "ipython" version = "8.12.0" description = "IPython: Productive Interactive Computing" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -663,7 +631,6 @@ test-extra = ["curio", "matplotlib (!=3.2.0)", "nbformat", "numpy (>=1.21)", "pa name = "isort" version = "5.12.0" description = "A Python utility / library to sort Python imports." -category = "dev" optional = false python-versions = ">=3.8.0" files = [ @@ -681,7 +648,6 @@ requirements-deprecated-finder = ["pip-api", "pipreqs"] name = "jedi" version = "0.18.2" description = "An autocompletion tool for Python that can be used for text editors." -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -701,7 +667,6 @@ testing = ["Django (<3.1)", "attrs", "colorama", "docopt", "pytest (<7.0.0)"] name = "jinja2" version = "3.1.2" description = "A very fast and expressive template engine." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -719,7 +684,6 @@ i18n = ["Babel (>=2.7)"] name = "jmespath" version = "1.0.1" description = "JSON Matching Expressions" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -731,7 +695,6 @@ files = [ name = "kiwisolver" version = "1.4.4" description = "A fast implementation of the Cassowary constraint solver" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -809,7 +772,6 @@ files = [ name = "lazy-object-proxy" version = "1.9.0" description = "A fast and thorough lazy object proxy." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -855,7 +817,6 @@ files = [ name = "markupsafe" version = "2.1.3" description = "Safely add untrusted strings to HTML/XML markup." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -879,6 +840,16 @@ files = [ {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac"}, {file = "MarkupSafe-2.1.3-cp311-cp311-win32.whl", hash = "sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb"}, {file = "MarkupSafe-2.1.3-cp311-cp311-win_amd64.whl", hash = "sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:f698de3fd0c4e6972b92290a45bd9b1536bffe8c6759c62471efaa8acb4c37bc"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:aa57bd9cf8ae831a362185ee444e15a93ecb2e344c8e52e4d721ea3ab6ef1823"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ffcc3f7c66b5f5b7931a5aa68fc9cecc51e685ef90282f4a82f0f5e9b704ad11"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:47d4f1c5f80fc62fdd7777d0d40a2e9dda0a05883ab11374334f6c4de38adffd"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1f67c7038d560d92149c060157d623c542173016c4babc0c1913cca0564b9939"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:9aad3c1755095ce347e26488214ef77e0485a3c34a50c5a5e2471dff60b9dd9c"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:14ff806850827afd6b07a5f32bd917fb7f45b046ba40c57abdb636674a8b559c"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8f9293864fe09b8149f0cc42ce56e3f0e54de883a9de90cd427f191c346eb2e1"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-win32.whl", hash = "sha256:715d3562f79d540f251b99ebd6d8baa547118974341db04f5ad06d5ea3eb8007"}, + {file = "MarkupSafe-2.1.3-cp312-cp312-win_amd64.whl", hash = "sha256:1b8dd8c3fd14349433c79fa8abeb573a55fc0fdd769133baac1f5e07abf54aeb"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b"}, {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707"}, @@ -915,7 +886,6 @@ files = [ name = "matplotlib" version = "3.7.1" description = "Python plotting package" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -977,7 +947,6 @@ python-dateutil = ">=2.7" name = "matplotlib-inline" version = "0.1.6" description = "Inline Matplotlib backend for Jupyter" -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -992,7 +961,6 @@ traitlets = "*" name = "mccabe" version = "0.7.0" description = "McCabe checker, plugin for flake8" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1004,7 +972,6 @@ files = [ name = "mypy" version = "1.2.0" description = "Optional static typing for Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1050,7 +1017,6 @@ reports = ["lxml"] name = "mypy-extensions" version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1062,7 +1028,6 @@ files = [ name = "nodeenv" version = "1.7.0" description = "Node.js virtual environment builder" -category = "dev" optional = false python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*" files = [ @@ -1077,7 +1042,6 @@ setuptools = "*" name = "nox" version = "2022.11.21" description = "Flexible test automation." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1098,7 +1062,6 @@ tox-to-nox = ["jinja2", "tox"] name = "numpy" version = "1.24.2" description = "Fundamental package for array computing in Python" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1136,7 +1099,6 @@ files = [ name = "packaging" version = "23.0" description = "Core utilities for Python packages" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1148,7 +1110,6 @@ files = [ name = "pandas" version = "2.0.0" description = "Powerful data structures for data analysis, time series, and statistics" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1180,10 +1141,7 @@ files = [ ] [package.dependencies] -numpy = [ - {version = ">=1.21.0", markers = "python_version >= \"3.10\""}, - {version = ">=1.23.2", markers = "python_version >= \"3.11\""}, -] +numpy = {version = ">=1.23.2", markers = "python_version >= \"3.11\""} python-dateutil = ">=2.8.2" pytz = ">=2020.1" tzdata = ">=2022.1" @@ -1215,7 +1173,6 @@ xml = ["lxml (>=4.6.3)"] name = "parso" version = "0.8.3" description = "A Python Parser" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1231,7 +1188,6 @@ testing = ["docopt", "pytest (<6.0.0)"] name = "pathspec" version = "0.11.1" description = "Utility library for gitignore style pattern matching of file paths." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1243,7 +1199,6 @@ files = [ name = "pendulum" version = "2.1.2" description = "Python datetimes made easy" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -1278,7 +1233,6 @@ pytzdata = ">=2020.1" name = "pexpect" version = "4.8.0" description = "Pexpect allows easy control of interactive console applications." -category = "dev" optional = false python-versions = "*" files = [ @@ -1293,7 +1247,6 @@ ptyprocess = ">=0.5" name = "pickleshare" version = "0.7.5" description = "Tiny 'shelve'-like database with concurrency support" -category = "dev" optional = false python-versions = "*" files = [ @@ -1305,7 +1258,6 @@ files = [ name = "pillow" version = "9.5.0" description = "Python Imaging Library (Fork)" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1385,7 +1337,6 @@ tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "pa name = "platformdirs" version = "3.2.0" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1401,7 +1352,6 @@ test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.2.2)", "pytest- name = "pluggy" version = "1.0.0" description = "plugin and hook calling mechanisms for python" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1417,7 +1367,6 @@ testing = ["pytest", "pytest-benchmark"] name = "pre-commit" version = "3.2.2" description = "A framework for managing and maintaining multi-language pre-commit hooks." -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1436,7 +1385,6 @@ virtualenv = ">=20.10.0" name = "prompt-toolkit" version = "3.0.38" description = "Library for building powerful interactive command lines in Python" -category = "dev" optional = false python-versions = ">=3.7.0" files = [ @@ -1451,7 +1399,6 @@ wcwidth = "*" name = "ptyprocess" version = "0.7.0" description = "Run a subprocess in a pseudo terminal" -category = "dev" optional = false python-versions = "*" files = [ @@ -1463,7 +1410,6 @@ files = [ name = "pure-eval" version = "0.2.2" description = "Safely evaluate AST nodes without side effects" -category = "dev" optional = false python-versions = "*" files = [ @@ -1478,7 +1424,6 @@ tests = ["pytest"] name = "pydata-sphinx-theme" version = "0.13.3" description = "Bootstrap-based Sphinx theme from the PyData community" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1505,7 +1450,6 @@ test = ["codecov", "pytest", "pytest-cov", "pytest-regressions"] name = "pygments" version = "2.15.1" description = "Pygments is a syntax highlighting package written in Python." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1520,7 +1464,6 @@ plugins = ["importlib-metadata"] name = "pylint" version = "2.17.2" description = "python code static checker" -category = "dev" optional = false python-versions = ">=3.7.2" files = [ @@ -1545,7 +1488,6 @@ testutils = ["gitpython (>3)"] name = "pyparsing" version = "3.0.9" description = "pyparsing module - Classes and methods to define and execute parsing grammars" -category = "dev" optional = false python-versions = ">=3.6.8" files = [ @@ -1560,7 +1502,6 @@ diagrams = ["jinja2", "railroad-diagrams"] name = "pytest" version = "7.3.0" description = "pytest: simple powerful testing with Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1581,7 +1522,6 @@ testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "no name = "python-dateutil" version = "2.8.2" description = "Extensions to the standard Python datetime module" -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ @@ -1596,7 +1536,6 @@ six = ">=1.5" name = "pytz" version = "2023.3" description = "World timezone definitions, modern and historical" -category = "dev" optional = false python-versions = "*" files = [ @@ -1608,7 +1547,6 @@ files = [ name = "pytzdata" version = "2020.1" description = "The Olson timezone database for Python." -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -1616,11 +1554,21 @@ files = [ {file = "pytzdata-2020.1.tar.gz", hash = "sha256:3efa13b335a00a8de1d345ae41ec78dd11c9f8807f522d39850f2dd828681540"}, ] +[[package]] +name = "pyudev" +version = "0.24.1" +description = "A libudev binding" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pyudev-0.24.1-py3-none-any.whl", hash = "sha256:da7e977be15fb5eccf8797b8e2176cd5b4f39288707cdcb39d1cabe7c8793e2b"}, + {file = "pyudev-0.24.1.tar.gz", hash = "sha256:75e54d37218f5ac45b0da1f0fd9cc5e526a3cac3ef1cfad410cf7ab338b01471"}, +] + [[package]] name = "pyyaml" version = "6.0" description = "YAML parser and emitter for Python" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1670,7 +1618,6 @@ files = [ name = "requests" version = "2.31.0" description = "Python HTTP for Humans." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1692,7 +1639,6 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] name = "s3transfer" version = "0.6.0" description = "An Amazon S3 Transfer Manager" -category = "main" optional = false python-versions = ">= 3.7" files = [ @@ -1710,7 +1656,6 @@ crt = ["botocore[crt] (>=1.20.29,<2.0a.0)"] name = "seaborn" version = "0.12.2" description = "Statistical data visualization" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1732,7 +1677,6 @@ stats = ["scipy (>=1.3)", "statsmodels (>=0.10)"] name = "semantic-version" version = "2.10.0" description = "A library implementing the 'SemVer' scheme." -category = "main" optional = false python-versions = ">=2.7" files = [ @@ -1748,7 +1692,6 @@ doc = ["Sphinx", "sphinx-rtd-theme"] name = "setuptools" version = "67.6.1" description = "Easily download, build, install, upgrade, and uninstall Python packages" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1765,7 +1708,6 @@ testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs ( name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -1777,7 +1719,6 @@ files = [ name = "snowballstemmer" version = "2.2.0" description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." -category = "dev" optional = false python-versions = "*" files = [ @@ -1789,7 +1730,6 @@ files = [ name = "soupsieve" version = "2.4.1" description = "A modern CSS selector implementation for Beautiful Soup." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1801,7 +1741,6 @@ files = [ name = "sphinx" version = "7.0.1" description = "Python documentation generator" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1836,7 +1775,6 @@ test = ["cython", "filelock", "html5lib", "pytest (>=4.6)"] name = "sphinx-copybutton" version = "0.5.2" description = "Add a copy button to each of your code cells." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1855,7 +1793,6 @@ rtd = ["ipython", "myst-nb", "sphinx", "sphinx-book-theme", "sphinx-examples"] name = "sphinxcontrib-applehelp" version = "1.0.4" description = "sphinxcontrib-applehelp is a Sphinx extension which outputs Apple help books" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1871,7 +1808,6 @@ test = ["pytest"] name = "sphinxcontrib-devhelp" version = "1.0.2" description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1887,7 +1823,6 @@ test = ["pytest"] name = "sphinxcontrib-htmlhelp" version = "2.0.1" description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -1903,7 +1838,6 @@ test = ["html5lib", "pytest"] name = "sphinxcontrib-jsmath" version = "1.0.1" description = "A sphinx extension which renders display math in HTML via JavaScript" -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1918,7 +1852,6 @@ test = ["flake8", "mypy", "pytest"] name = "sphinxcontrib-qthelp" version = "1.0.3" description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1934,7 +1867,6 @@ test = ["pytest"] name = "sphinxcontrib-serializinghtml" version = "1.1.5" description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1950,7 +1882,6 @@ test = ["pytest"] name = "stack-data" version = "0.6.2" description = "Extract data from python stack frames and tracebacks for informative displays" -category = "dev" optional = false python-versions = "*" files = [ @@ -1970,7 +1901,6 @@ tests = ["cython", "littleutils", "pygments", "pytest", "typeguard"] name = "tomlkit" version = "0.11.7" description = "Style preserving TOML library" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1982,7 +1912,6 @@ files = [ name = "traitlets" version = "5.9.0" description = "Traitlets Python configuration system" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1998,7 +1927,6 @@ test = ["argcomplete (>=2.0)", "pre-commit", "pytest", "pytest-mock"] name = "typing-extensions" version = "4.5.0" description = "Backported and Experimental Type Hints for Python 3.7+" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2010,7 +1938,6 @@ files = [ name = "tzdata" version = "2023.3" description = "Provider of IANA time zone data" -category = "dev" optional = false python-versions = ">=2" files = [ @@ -2022,7 +1949,6 @@ files = [ name = "urllib3" version = "1.26.15" description = "HTTP library with thread-safe connection pooling, file post, and more." -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" files = [ @@ -2039,7 +1965,6 @@ socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] name = "virtualenv" version = "20.21.0" description = "Virtual Python Environment builder" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2060,7 +1985,6 @@ test = ["covdefaults (>=2.2.2)", "coverage (>=7.1)", "coverage-enable-subprocess name = "wcwidth" version = "0.2.6" description = "Measures the displayed width of unicode strings in a terminal" -category = "dev" optional = false python-versions = "*" files = [ @@ -2072,7 +1996,6 @@ files = [ name = "wrapt" version = "1.15.0" description = "Module for decorators, wrappers and monkey patching." -category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" files = [ @@ -2156,4 +2079,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.11" -content-hash = "fc0d97ed82141016caaf8c167acf797700172e814252d63fc5e4900576627fa1" \ No newline at end of file +content-hash = "85816739694b164fc2377a22c7f04621489416e4a02f98ad469fbe11dab0795a" diff --git a/pyproject.toml b/pyproject.toml index 46b62014..cf98bb21 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "flexsea" -version = "11.0.9" +version = "12.0.0" description = "" authors = ["Jared "] readme = "README.md" @@ -12,6 +12,7 @@ semantic-version = "^2.10.0" boto3 = "^1.26.110" pyyaml = "^6.0" pendulum = "^2.1.2" +pyudev = "^0.24.1" [tool.poetry.group.dev.dependencies]