Pyde1

Latest version: v2.0.0

Safety actively analyzes 685525 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 6

5.0.0

Add move-on by weight functionality, including parsing from JSON profile.

"Bump resist" to help prevent triggering SAW/MOW too early

Provide a utility to convert Tcl profile files to JSON, including directly
from a Visualizer URL. Author names can be corrected in the process.

Tested with Python 3.11.0 and more extensively with 3.11.0rc2

Changes to accommodate breaking changes in bleak v0.18.1

Significant refactoring of FlowSequencer

Improvements to logging


New
===

* Move-on by weight functionality -- ``75a52e3``, ``674f06c``

* "Bump resist" for SAW / MOW and config -- ``148cd44``

Active when mass-flow estimate exceeds FLOW_THRESHOLD or goes negative

Can also select to always use median-based estimation

::

config.de1.bump_resist.FLOW_THRESHOLD = 10.0 g/s
config.de1.bump_resist.FLOW_MULTIPLIER = 1.1
config.de1.bump_resist.SUB_MEDIAN_WEIGHT = True when excessive flow
config.de1.bump_resist.USE_MEDIAN_WEIGHT_ALWAYS = False
config.de1.bump_resist.USE_MEDIAN_FLOW_ALWAYS = False

* ``legacy_to_json.py`` converts profiles to JSON format -- ``40d8a86``

* DE1 supplies ``current_frame`` property -- ``cc2ae17``

* ScaleProcessor supplies ``current_weight`` property -- ``93ea42f``


Changed
=======

* Requires Python 3.9 or later, supports Python 3.11

* Logic for skip_to_next improved to limit to when it is available
in the firmware and sensible (during espresso only) -- ``62da713``

* Logging

* ``Scale.Period`` and ``Outbound.Counts`` loggers to assist in
filtering out "expected, periodic" log messages
-- ``09500d3``, ``3b8f87a``

* Scale: Add logging of exception to ``weight_update_handler()``
-- ``472eb90``

* Frame changes are now logged at the INFO level, including the previous
and current frames, as well as an estimate of the weight.

* Adjusted ``MMR0x80LowAddr.for_logging()`` to retain uppercase names.
Also can return hex if no name associated. MMR Read notifications now
logged similar to
``INFO [Controller] DE1.CUUID.ReadFromMMR.Notify.FLUSH_TIMEOUT: 3.0``
-- ``b013d7a``, ``b455744``

* Improved message on scale/DE1 disconnect to include previous address
-- ``6e9fe24``

* ``None`` is now permitted as a return value in the Scale class
from ``current_weight()`` coroutine. ``AtomaxSkaleII`` returns
``None`` rather than raising ``NotImplementedError``
*(It does not appear that the weight can be requested on demand,
just notifications.)* -- ``816e29c``

See also new ``ScaleProcessor.current_weight`` property -- ``93ea42f``

* The ``StopAtNotification`` has been updated to version 1.1.0 as it adds
the current frame, which may be None/null, as well as the action of
'move on by weight'.

* The mode-control objects within the FlowSequencer have been refactored.
Any code accessing these directly should examine both ``flow_sequencer.py``
and ``flow_sequencer_impl.py``.

* The signature of the ``stop_at_notify`` method of the FlowSequencer has been
changed to capture information at the time of the call, rather than when
the call is serviced. With ``skip_to_next`` being called, it is possible
that the time of service could be in a different frame of the profile.

* The FlowSequencer internal ``stop_at_weight`` routine has been renamed to
act_on_weight and handles both SAW and move-on by weight.

* Python 3.11 compatibility

* Event loop is now created explicitly based on DeprecationWarning
-- ``b939868``

* Changes in how enum.IntFlag are string-ified are accommodated
for 3.11 and later -- ``3e953cd``

* Bleak v0.18.1 compatibility

* Reworked deprecated ``BleakScanner.register_detection_callback()``
-- ``d21f1a6``

* Marked usages of deprecated ``BleakClient.set_disconnected_callback()``
-- ``d8c63fb``

* ``WrappedBleakClient()`` now passes ``*args, **kwargs``
to ``BleakClient()`` -- ``b5468b4``

* Added ``bleak_version_check.BLEAK_AFTER_0_17`` -- ``7082b8c``
(unused as changes in method signatures were reverted in bleak v0.18.1)


Fixed
=====

* Example pyde1.conf comments now properly refer to ``purge_deferred`` -- ``5e63756``

* Scan-initiation now properly accepts ``null`` to accept default timeout -- ``84308ec``


Removed
=======

* Python 3.8 support removed

* Deprecations in v1.2.0 (2022-03) removed

* Use of ``first_if_found`` to initiate scanning removed -- ``2c957fd``

* Use of a Boolean when setting Bluetooth scan timeout removed -- ``2c957fd``



------------------

4.0.1

-----------------

* MODULES_FOR_VERSIONS consistent with requirements - ``40c4ce0``

Fixed
=====

* utils: data_as_readable() now handles "undecodable" byte sequences - ``08aef05``
* packaging: Include schema and service files - ``4caf736``


------------------

4.0.0

-----------------

* Rewrites ``IsAt`` to use an enum, rather than the class to define
the target, simplifying package inclusion. - ``78cea85``

Fixed
=====

- Loop-level, exception-initiated shutdowns now terminate more cleanly.
- ``0b593d0``

- An error condition when no scale was present during a "shot" has been
resolved. ffae2f

- An error condition when a DE1 connected and the profile was not yet
known has been resolved - ``58bbfad``

- AutoTareNotification and StopAtNotification now populate sender.
- ``9f39d08``

- A very early termination of the program (before processes are
defined) now terminates more cleanly. - ``4f95c34``

- ScaleProcessor: Reset the history if a gap in reports is too long,
such as from a disconnect-reconnect sequence. - ``48a35ca``


Removed
=======

- Remove unused Config.set\_logging(). - ``2b104e6``

- Remove feature.py as previously incorporated into FeatureFlag.
- ``469ee96``

------------------

3.6.0

------------------

* Add ``NO_REQUEST`` mode to trigger a report from the DE1 - ``a52cd6f``
* Add ``END_STEAM`` mode to support steam-to-temperature - ``24d7b52``


Fixed
=====

* Double-counting of scale delay was removed, improving scale-to-DE1 time
alignment - ``886016a``


-------------------

3.1.0

-----------------

Add Resource.SCAN and Resource.SCAN\_RESULTS

See note above on return results, resulting in major version bump

Add ``first_if_found`` key to mapping for ``Resource.DE1_ID`` and
``Resource.SCALE_ID``. If True, then connects to the first found,
without initiating a scan. When using this feature, no other keys may be
provided.

3.0.0

------------------

- Changes previously unimplemented UPLOAD_TO_ID

::

DE1_PROFILE_ID
DE1_FIRMWARE_ID

Database Schema 2
-----------------

See ``upgrade.001.002.sql``

::

PRAGMA user_version = 2;

BEGIN TRANSACTION;

ALTER TABLE connectivity_change ADD COLUMN id TEXT;
ALTER TABLE connectivity_change ADD COLUMN name TEXT;

END TRANSACTION;

Fixed
=====

- Legacy "shot" files handle zero flow in "resistance" calculation
- Properly end recording of a sequence if it is interrupted
- FlowSequencer last-drops gate set during sequence
- Correct logic error in stopping recorder at end of sequence
- Correct reporting of not-connected conditions to HTTP API
- Correct scale-presence checking for PUT and PATCH requests
- Handle missing Content-Length header
- Incorrect error message around API request for Sleep removed
- ``pyDE1.scanner`` should now import properly into other code
- Steam-temperature setter now can set 140-160 deg. C
- Type errors in validation of API inputs properly report the expected
type



------------------

Page 1 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.