Recent Releases of belay

belay - v0.26.0

Features

  • Add micropython v1.26 fnv1a32 precompiled native modules. by @BrianPugh in https://github.com/BrianPugh/belay/pull/192
  • Fallback to viper/native/vanilla fnv1a32 hash function if we fail to import the nativemodule. by @BrianPugh in https://github.com/BrianPugh/belay/pull/193

Full Changelog: https://github.com/BrianPugh/belay/compare/v0.25.0...v0.26.0

- Python
Published by BrianPugh 11 months ago

belay - v0.25.0

Sync Performance Boosts

  • Parallelize host-side hashing and client-side hashing. by @BrianPugh in https://github.com/BrianPugh/belay/pull/169
  • Pre-compiled fnv1a32 hashing module. by @BrianPugh in https://github.com/BrianPugh/belay/pull/188

Full Changelog: https://github.com/BrianPugh/belay/compare/v0.24.3...v0.25.0

- Python
Published by BrianPugh 12 months ago

belay - v0.24.3

Bug Fixes

  • Explicitly read files using utf-8 encoding by @theo-lightworks in https://github.com/BrianPugh/belay/pull/187

New Contributors

  • @theo-lightworks made their first contribution in https://github.com/BrianPugh/belay/pull/187

Full Changelog: https://github.com/BrianPugh/belay/compare/v0.24.2...v0.24.3

- Python
Published by BrianPugh about 1 year ago

belay - v0.24.2

Bug Fixes

  • Fix removal of str if it begins an expression when minifying. by @BrianPugh in https://github.com/BrianPugh/belay/pull/186

Full Changelog: https://github.com/BrianPugh/belay/compare/v0.24.1...v0.24.2

- Python
Published by BrianPugh about 1 year ago

belay - v0.24.1

Bug Fixes

  • Use monotonic clock for timeouts. By @jsiverskog in https://github.com/BrianPugh/belay/pull/185

Examples

  • Add missing setup() call in circuitpython blink example by @Teslafly in https://github.com/BrianPugh/belay/pull/184

New Contributors

  • @Teslafly made their first contribution in https://github.com/BrianPugh/belay/pull/184
  • @jsiverskog made their first contribution in https://github.com/BrianPugh/belay/pull/185

Full Changelog: https://github.com/BrianPugh/belay/compare/v0.24.0...v0.24.1

- Python
Published by BrianPugh about 1 year ago

belay - v0.24.0

Features

  • dedent all cmds in Device.__call__ by @BrianPugh in https://github.com/BrianPugh/belay/pull/180

Full Changelog: https://github.com/BrianPugh/belay/compare/v0.23.0...v0.24.0

- Python
Published by BrianPugh over 1 year ago

belay - v0.23.0

What's Changed

  • ProxyObject and the convenience method Device.proxy for seamlessly interacting with remote objects. By @BrianPugh in https://github.com/BrianPugh/belay/pull/178

Full Changelog: https://github.com/BrianPugh/belay/compare/v0.22.6...v0.23.0

- Python
Published by BrianPugh over 1 year ago

belay - v0.22.6

What's Changed

  • Improved Telnet performance. Python3.13 compatibility by @BrianPugh in https://github.com/BrianPugh/belay/pull/173

Full Changelog: https://github.com/BrianPugh/belay/compare/v0.22.5...v0.22.6

- Python
Published by BrianPugh over 1 year ago

belay - v0.22.5

Bugfixes

  • skip telnet authentication if username is empty. Properly parse port number. By @BrianPugh in https://github.com/BrianPugh/belay/pull/172

Full Changelog: https://github.com/BrianPugh/belay/compare/v0.22.4...v0.22.5

- Python
Published by BrianPugh over 1 year ago

belay - v0.22.4

Bug Fixes

  • Fix minifying strings-in-containers as if they were docstrings. by @BrianPugh in https://github.com/BrianPugh/belay/pull/168

Full Changelog: https://github.com/BrianPugh/belay/compare/v0.22.3...v0.22.4

- Python
Published by BrianPugh almost 2 years ago

belay - v0.22.3

What's Changed

  • fix belay new CLI command by @BrianPugh in https://github.com/BrianPugh/belay/pull/164

Full Changelog: https://github.com/BrianPugh/belay/compare/v0.22.2...v0.22.3

- Python
Published by BrianPugh about 2 years ago

belay - v0.22.2

What's Changed

  • Fix bug where single ".mpy" dependencies were not renamed to __init__.mpy. by @BrianPugh in https://github.com/BrianPugh/belay/pull/158

Full Changelog: https://github.com/BrianPugh/belay/compare/v0.22.1...v0.22.2

- Python
Published by BrianPugh about 2 years ago

belay - v0.22.1

Bug Fixes

  • use pypi importlib_resources for <3.9 by @BrianPugh in https://github.com/BrianPugh/belay/pull/156

Full Changelog: https://github.com/BrianPugh/belay/compare/v0.22.0...v0.22.1

- Python
Published by BrianPugh over 2 years ago

belay - v0.22.0

What's Changed

  • Introduce trusted keyword to task decorator for allowing arbitrary response execution. by @BrianPugh in https://github.com/BrianPugh/belay/pull/152
  • temporarily fix all pydantic warnings by using v1 by @BrianPugh in https://github.com/BrianPugh/belay/pull/154

Full Changelog: https://github.com/BrianPugh/belay/compare/v0.21.3...v0.22.0

- Python
Published by BrianPugh almost 3 years ago

belay - v0.21.3

Just a dependency update release * Update questionary to v2.0.0 * Subsequently, can now loosen python dependency from ^3.8 to >=3.8

- Python
Published by BrianPugh almost 3 years ago

belay - v0.21.2

Bug Fixes

  • catch DeviceNotFoundError error on reconnect by @BrianPugh in https://github.com/BrianPugh/belay/pull/144

Full Changelog: https://github.com/BrianPugh/belay/compare/v0.21.1...v0.21.2

- Python
Published by BrianPugh almost 3 years ago

belay - v0.21.1

Bug Fixes

  • Fix bug in device.sync that prevented it from working on some drives by @TimAidley in https://github.com/BrianPugh/belay/pull/141

New Contributors

  • @TimAidley made their first contribution in https://github.com/BrianPugh/belay/pull/141

Full Changelog: https://github.com/BrianPugh/belay/compare/v0.21.0...v0.21.1

- Python
Published by BrianPugh about 3 years ago

belay - v0.21.0

Features

  • Add pyproject tool.belay.ignore functionality for belay install.

Bug Fixes

  • Fix sync ignores for directories. by @BrianPugh in https://github.com/BrianPugh/belay/pull/139

Full Changelog: https://github.com/BrianPugh/belay/compare/v0.20.1...v0.21.0

- Python
Published by BrianPugh about 3 years ago

belay - v0.20.1

Bug Fixes

  • remove dependency version caps by @BrianPugh in https://github.com/BrianPugh/belay/pull/134
  • belay select fixes:
    • handle case where no devices are found by @BrianPugh in https://github.com/BrianPugh/belay/pull/135
    • neopixel blinking on micropython firmware by @BrianPugh in https://github.com/BrianPugh/belay/pull/137
  • Correctly propagate belay run exitcode by @BrianPugh in https://github.com/BrianPugh/belay/pull/136

Full Changelog: https://github.com/BrianPugh/belay/compare/v0.20.0...v0.20.1

- Python
Published by BrianPugh about 3 years ago

belay - v0.20.0

Features

  • Implementation-specific executers by @BrianPugh in https://github.com/BrianPugh/belay/pull/125
  • Add ignore_errors=False parameter to global executers. by @BrianPugh in https://github.com/BrianPugh/belay/pull/126
  • UsbSpecifier for fine-grained device target selection. by @BrianPugh in https://github.com/BrianPugh/belay/pull/122
    • The first argument (port-specifier) to belay.Device is now optional. If not provided will attempt to deserialize environment variable BELAY_DEVICE into a UsbSpecifier.
    • Also now accepts a json-string representation of a UsbSpecifier.
  • New interactive CLI command belay select to assist in device selection. by @BrianPugh in https://github.com/BrianPugh/belay/pull/127
  • Cleanup CLI commands stack traces:
    • Remove belay-internal stacktrace for install/run/exec cli commands by @BrianPugh in https://github.com/BrianPugh/belay/pull/130
    • Remove belay-internal stacktrace for 'belay run executable' command. by @BrianPugh in https://github.com/BrianPugh/belay/pull/129
  • "Bad" devices are naively removed from list_devices (e.g. cu.Bluetooth-Incoming-Port on MacOS). by @BrianPugh in https://github.com/BrianPugh/belay/pull/127

Bug Fixes

  • loosen dependency versions by @BrianPugh in https://github.com/BrianPugh/belay/pull/128
  • Fixed develop=True if a version didn't exist in the cached .belay/dependencies folder by @BrianPugh in https://github.com/BrianPugh/belay/pull/121
  • Add the current directory to the MICROPYPATH in belay run micropython

Breaking Changes

  • CLI belay identify has been removed in favor of belay select
  • list_devices now returns a list of UsbSpecifiers instead of List[str].

Full Changelog: https://github.com/BrianPugh/belay/compare/v0.19.2...v0.20.0

- Python
Published by BrianPugh about 3 years ago

belay - v0.19.2

Bug Fixes

  • Fix reconnection issues https://github.com/BrianPugh/belay/pull/119 .

Misc Improvements

  • Higher performance serial reader; should result in lower host CPU usage.

Infrastructure Improvements

  • Greatly increased speed/reliability of integration tests.

Full Changelog: https://github.com/BrianPugh/belay/compare/v0.19.1...v0.19.2

- Python
Published by BrianPugh over 3 years ago

belay - v0.19.1 - setup with args bugfix

Bug Fixes

  • Fixed providing arguments to a @Device.setup decorated method (Addresses #113).

Full Changelog: https://github.com/BrianPugh/belay/compare/v0.19.0...v0.19.1

- Python
Published by BrianPugh over 3 years ago

belay - v0.19.0 - Terminal, Better Install, Better Typing

Features

  • Inclusion of an interactive terminal (wrapper for pyserial's miniterm):
    • The Device class now has a method terminal() that will start a blocking interactive terminal.
    • New command: belay terminal [port] to open up an interactive terminal with the device.
  • Improvements to belay install:
    • If --main my_script.py is specified, device will now restart after installation so that the script will automatically execute.
    • New flag --follow: after flashing, the output of the main script will be monitored and printed to stdout. Press ctrl-c to exit.

Bug Fixes

  • belay install [PORT] --main script.py now correctly renames the specified script to main.py on-device.
  • Improved Typing.

Full Changelog: https://github.com/BrianPugh/belay/compare/v0.18.4...v0.19.0

- Python
Published by BrianPugh over 3 years ago

belay - v0.18.4

Bug Fixes

  • Fix some git repo issues when switching a package manager dependency branch.

- Python
Published by BrianPugh over 3 years ago

belay - v0.18.3

Bug Fixes

  • On device close, we now issue 2 ctrl-c commands to make sure that any currently long-running command is canceled prior to issuing additional teardown commands.
  • Fix some typing issues.

- Python
Published by BrianPugh over 3 years ago

belay - v0.18.2

Bug Fixes

  • Fix broken @Device.teardown(). teardown was only broken when () was supplied. @Device.teardown worked fine.
  • Register device.close with atexit, so the teardown executers will be more robustly called.

- Python
Published by BrianPugh over 3 years ago

belay - v0.18.1

Bug Fixes

  • Fixes a bug where relative path dependencies specified in pyproject.toml were resolved relative to current working directory. Fixed to always be relative to project root.
  • belay run micropython now respects develop=true sources.

- Python
Published by BrianPugh over 3 years ago

belay - v0.18.0

Features

  • Support for develop (editable) dependencies.

Misc Changes

  • Convenience imports are now done prior to __pre_autoinit__.
  • belay update output is a bit prettier.

- Python
Published by BrianPugh over 3 years ago

belay - v0.17.0 - Big package manager improvements

New Features

Device

  • New method Device.sync_dependencies to conveniently sync micropython dependencies bundled in a python package.
  • Added new Device.__pre_autoinit__ method hook. Intended for subclasses to invoke additional device setup like installing dependencies via self.sync or self.sync_dependencies.
  • Added new Device.__post_init__ method hook. Intended for subclasses to perform additional host-side initialization.

Package Manager

  • Dependencies folder can now be configured via dependencies_path in pyproject.toml
  • Support for multi-file dependencies. Can now efficiently handle git folders via a cache.
  • New command belay cache for managing Belay's cache.
  • belay install new option --with to include an optional dependency group.
  • Optional groups are now fully supported.
  • belay --version now prints the installed Belay's semver.
  • Much improved docs.

Bug Fixes

  • Fixed Circuitpython 8.0.0 incompatibility (fixes #93).
  • Fixed broken convenience imports for boards with a reduced feature set (fixes #97).

Breaking Changes

  • Exception ConfigError has been removed in favor of pydantic's ValidationError.

New Contributors

  • @freemansoft made their first contribution in https://github.com/BrianPugh/belay/pull/89

Full Changelog: https://github.com/BrianPugh/belay/compare/v0.16.2...v0.17.0

- Python
Published by BrianPugh over 3 years ago

belay - v0.16.2 - Better cleanup

Bug Fixes

  • Exit Raw REPL on device exit. This returns the micropython device to a more "normal" state that will (typically) play nicer with external programs, such as rshell. Fixes auxiliary issue in #78.
  • Register device.close() with atexit so that device closes down properly even if not explicitly invoked.

Internal

  • Increased process startup delay for Windows.
  • Unregister process close after explicit close. Prevents (harmless) double process killing at end of integration tests.

- Python
Published by BrianPugh over 3 years ago

belay - v0.16.1 - Enhanced Windows Compatibility

Bug Fixes

  • When syncing, correctly use POSIX destination paths instead of matching host (Fixes #78)
  • Improved path resolving when executing belay commands in subdirectories of a Belay project.

New Features

  • Additional functionality to: belay run. If the specified port is actually an executable, executes it after setting MICROPYPATH to cached project dependencies. Intended to be used as belay run micropython my_script.py.

- Python
Published by BrianPugh over 3 years ago

belay - v0.16.0 - setup autoinit and device teardown

Features

  • Added keyword argument autoinit to @Device.setup(autoinit=True). Will cause setup function to automatically execute on object creation. Defaults to False (backwards compatible).
  • Added @device.teardown and @Device.teardown to register function(s) to execute right before connection to device is closed.

Full Changelog: https://github.com/BrianPugh/belay/compare/v0.15.2...v0.16.0

- Python
Published by BrianPugh over 3 years ago

belay - v0.15.2

Bug Fixes

  • Fix double responses from tasks by @BrianPugh in https://github.com/BrianPugh/belay/pull/64. Didn't impact end-use, just inefficient.

Behind The Scenes

  • Integration tests by @BrianPugh in https://github.com/BrianPugh/belay/pull/63

Full Changelog: https://github.com/BrianPugh/belay/compare/v0.15.1...v0.15.2

- Python
Published by BrianPugh over 3 years ago

belay - v0.15.1 - Fix Generators

Bug Fixes

  • Fix generators

- Python
Published by BrianPugh over 3 years ago

belay - v0.15.0 - belay.list_devices()

Features

  • New helper function belay.list_devices() that returns a list of strings of available serial devices by @roaldarbol in https://github.com/BrianPugh/belay/pull/61

New Contributors

  • @roaldarbol made their first contribution in https://github.com/BrianPugh/belay/pull/61

Full Changelog: https://github.com/BrianPugh/belay/compare/v0.14.2...v0.15.0

- Python
Published by BrianPugh over 3 years ago

belay - v0.14.2

Bug Fixes

  • Fixed #58

- Python
Published by BrianPugh over 3 years ago

belay - v0.14.1 - Change default PM folder to "main"

Breaking Change

  • Change the default dependency folder from .belay/dependencies/default in v0.14.0 to .belay/dependencies/main.

- Python
Published by BrianPugh over 3 years ago

belay - v0.14.0 - "setup" decorator

Features

  • Added the @device.setup decorator for executing the function body in a global context. See examples/01_blink.

Breaking Changes

  • Change the .belay-lib/ folder (for package managed dependencies) to .belay/dependencies/default.

Bug Fixes

  • Fixed on-device tasks not being able to be directly invoked.
  • Improve some typing.

Misc

  • Refactored device.py into multiple modules.
  • Updated some out-of-date documentation.

- Python
Published by BrianPugh over 3 years ago

belay - v0.13.0

Features

  • CLI belay new <project-name> generates a directory structure suitable for most micropython projects using Belay.
  • belay.Device can now be subclassed, and methods can be marked with the decorator @belay.Device.task.
  • belay.Device now inherits from autoregistry.Registry, so it gains the benefit of easily indexing its children.

Breaking Changes

  • Multiple device decoration for functions has been removed. Use the new class-based approach instead.

Bug Fixes

  • Device.__call__(expression) now properly returns the results of the expression.

- Python
Published by BrianPugh over 3 years ago

belay - v0.12.2

Bug Fixes

  • Remove stray print statement when dedenting code.

- Python
Published by BrianPugh over 3 years ago

belay - v0.12.1

Misc Changes

  • For CLI command belay install, if tool.belay.name is not defined in pyproject.toml, then the project's package folder will not be synced.
  • CLI commands will now iteratively search parenting folders until a pyproject.toml is found.
  • Added optional kwarg record to task and thread decorators to configure if execution calls are recorded.

Bug Fixes

  • More robust initialization (fixes timeouts sometimes observed on esp chips).
  • Fixed corruption of valid multi-line tasks that under-indent.
  • Folders are now supported for the keep argument in sync. The /lib folder is added to the default keep list.

- Python
Published by BrianPugh over 3 years ago

belay - v0.12.0 - Generator Send

Features

  • Implements the send method for generators.

Misc Changes

  • Default follows timeout removed to fix unexpected exceptions during long-running device processes. Does not impact ability to detect if board has disconnected.

- Python
Published by BrianPugh over 3 years ago

belay - v0.11.0 - Added "clean" command

Features

  • Added the command clean to the belay CLI.
    • belay clean will delete any python files not referenced in tools.belay.dependencies in pyproject.toml.
    • This cleaning action will automatically be ran at the end of belay update.

- Python
Published by BrianPugh over 3 years ago

belay - v0.10.1 - Immediate prints

Bug Fixes

  • Prints from device are now immediately forwarded to stdout after a newline is hit. Previously, output would only be printed after the invoked task finished executing.

- Python
Published by BrianPugh over 3 years ago

belay - v0.10.0 - Package Manager

Features

  • Belay now features a rudimentary package manager via the CLI interface. See the docs for details.
    • Dependencies are specified by URLs to py files in pyproject.toml.
    • Dependencies are downloaded/updated via belay update and cached to .belay-lib/. This directory should be committed to project git repos.
    • Dependencies and project are minified/compiled and synced to device via belay install.

- Python
Published by BrianPugh over 3 years ago

belay - v0.9.3 - Fix CircuitPython Compatibility

Features

  • Adds attribute device.implementation.emitters for detecting available emitters (native and viper).

Bug Fixes

  • Fixes sync on devices without native/viper emitters available.
  • Fixes sync on circuitpython devices.

- Python
Published by BrianPugh over 3 years ago

belay - v0.9.2 - Fix broken mpy-cross

Bug Fix

  • Fix broken mpy-cross.

- Python
Published by BrianPugh over 3 years ago

belay - v0.9.1 - Reduce dependencies

Changes

  • Remove lox from dependency list.

- Python
Published by BrianPugh over 3 years ago

belay - v0.9.0 - New commands; better and faster sync.

Features

  • New command belay run to run a file on-device.
  • New command belay exec to execute a python string on-device.
  • sync improvements:
    • New argument dst; folder to sync file into. Defaults to "/";
    • New argument ignore; uses gitignore pattern matching to ignore files during sync. Defaults to common undesired files.
    • New argument mpy_cross_binary; if provided, will compile .py files into .mpy prior to syncing.
    • Can now sync a single file. Other files will not be deleted when syncing a single file.
    • Can now keeps all untouched files if keep=True.
    • Changed file hashing function from FNV-1a-64bit to FNV-1a-32bit for speed. Optimized implementation with native and viper decorators for a large speed boost
    • Parallelized pre-processing operations for faster syncs.
    • Misc bug fixes; a lot more unit testing.

- Python
Published by BrianPugh over 3 years ago

belay - v0.8.0 "identify" command.

Features

  • Added the identify command to the cli. This executes info, but also blinks an LED (or neopixel) on the board. Works with both circuitpython and micropython. This is useful for identifying which board is which when using multiple devices.

- Python
Published by BrianPugh almost 4 years ago

belay - v0.7.0 Automatic Device Reconnect

Features

  • Added support to automatically reconnect to a device upon a temporary disconnect. To activate, provide a non-zero value to the attempts keyword argument when creating the belay.Device. See docs for details and limitations.
  • Added sys.platform information to the Implementation data structure.
  • Add info cli command to see device Implementation information. Useful for quickly checking what firmware is running on-device.

- Python
Published by BrianPugh almost 4 years ago

belay - v0.6.0 CircuitPython Support

Features

  • CircuitPython is now supported.
    • Since CircuitPython doesn't guarentee hashlib to be builtin, the file hashing function for syncing operations has been changed from sha256 to 64-bit FNV-1a. FNV-1a was selected for its incredibly terse implementation, and reasonable performance for simply detecting if a file has changed.
  • New attribute device.implementation contains the name (micropython or circuitpython) and version of firmware running on-device.

Bug Fixes

  • Fixed an off-by-one error for the final line reported in a stacktrace when an exception is raised on-device. This only occurred when the task or thread decorators were used.

- Python
Published by BrianPugh almost 4 years ago

belay - v0.5.0 Generators, Printing, and a CLI

Features

  • Added a new command line program, belay. Run belay --help for more information.
    • Currently only one supported action, sync, to sync a folder to the device's root.
  • Added the public method Device.close() to gracefully close device connection (Partially addresses #14).
  • Support decorating generator functions with the task decorator (Addresses #15).
  • print calls from device are now forwarded to host's stdout. User print statements must not begin with _BELAY, as these are reserved for internal use.

- Python
Published by BrianPugh almost 4 years ago

belay - v0.4.1

Features

  • Added belay.AuthenticationError for when password is incorrect for WebREPL.

Bug Fixes

  • Fixed folder creation during Device.sync

- Python
Published by BrianPugh almost 4 years ago

belay - v0.4.0

Features

  • Initial WebREPL support. See documentation and examples/09_webrepl. Performance is a bit lackluster, but should be acceptable for projects that don't need rapid response.
  • Optimized some command/responses for less communication round-trips (slightly improves WebREPL performance).
  • Allow main.py and boot.py in the sync folder. They don't actually impact Belay's ability to operate. Removed SpecialFilenameError that would have been previously raised if either of these were present.
  • Added optional keyword argument keep to specify files on-device that should not be deleted if a corresponding file doesn't exist in the sync folder. Defaults to ["boot.py", "webrepl_cfg.py"], since these files may contain device-specific information.

Bug Fixes

  • Fix sync hash-checking logic. Previously all files were always synced.
  • Fix and improved erroneous message in ValueError raised by Device.sync

Internal

  • Moved on-device code snippets into their own folder for easier maintenance.

- Python
Published by BrianPugh almost 4 years ago

belay - v0.3.0

Features

  • Support for bytes and set (all python literals now supported) arguments and return values.

- Python
Published by BrianPugh almost 4 years ago

belay - v0.2.0

Features

  • Support for multiple device task and thread decorators.
  • Allow access of decorated functions from task and thread.

Misc Changes and Improvements

  • Improve decorator stripping logic.
  • Change belay prefix from __belay_ to_belay_.
  • Change json_decorator to __belay_json to reduce chance of name collision.
  • Reduce whitespace in returned json data.
  • Rename hash_remote_file to __belay_hash_file to reduce chance of name collision. Don't invoke via task to circumvent double prefix.

- Python
Published by BrianPugh almost 4 years ago

belay - Initial Release

  • Initial release of Belay.

- Python
Published by BrianPugh almost 4 years ago