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.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.23.0
What's Changed
ProxyObjectand the convenience methodDevice.proxyfor 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.0
What's Changed
- Introduce
trustedkeyword 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.1
Bug Fixes
- Fix bug in
device.syncthat 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 selectfixes:- 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=Falseparameter 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.Deviceis now optional. If not provided will attempt to deserialize environment variableBELAY_DEVICEinto aUsbSpecifier. - Also now accepts a json-string representation of a
UsbSpecifier.
- The first argument (port-specifier) to
- New interactive CLI command
belay selectto 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-Porton 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=Trueif a version didn't exist in the cached.belay/dependenciesfolder 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 identifyhas been removed in favor ofbelay select list_devicesnow returns a list ofUsbSpecifiers instead ofList[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.setupdecorated 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
Deviceclass now has a methodterminal()that will start a blocking interactive terminal. - New command:
belay terminal [port]to open up an interactive terminal with the device.
- The
- Improvements to
belay install:- If
--main my_script.pyis 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. Pressctrl-cto exit.
- If
Bug Fixes
belay install [PORT] --main script.pynow correctly renames the specified script tomain.pyon-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.1
Bug Fixes
- Fixes a bug where relative path dependencies specified in
pyproject.tomlwere resolved relative to current working directory. Fixed to always be relative to project root. belay run micropythonnow respectsdevelop=truesources.
- Python
Published by BrianPugh over 3 years ago
belay - v0.17.0 - Big package manager improvements
New Features
Device
- New method
Device.sync_dependenciesto 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 viaself.syncorself.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_pathinpyproject.toml - Support for multi-file dependencies. Can now efficiently handle git folders via a cache.
- New command
belay cachefor managing Belay's cache. belay installnew option--withto include an optional dependency group.- Optional groups are now fully supported.
belay --versionnow 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
ConfigErrorhas been removed in favor of pydantic'sValidationError.
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()withatexitso 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
belaycommands in subdirectories of a Belay project.
New Features
- Additional functionality to:
belay run. If the specified port is actually anexecutable, executes it after settingMICROPYPATHto cached project dependencies. Intended to be used asbelay 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
autoinitto@Device.setup(autoinit=True). Will cause setup function to automatically execute on object creation. Defaults toFalse(backwards compatible). - Added
@device.teardownand@Device.teardownto 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.1 - Change default PM folder to "main"
Breaking Change
- Change the default dependency folder from
.belay/dependencies/defaultin 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.setupdecorator for executing the function body in a global context. Seeexamples/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.pyinto 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.Devicecan now be subclassed, and methods can be marked with the decorator@belay.Device.task.belay.Devicenow inherits fromautoregistry.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.1
Misc Changes
- For CLI command
belay install, iftool.belay.nameis not defined inpyproject.toml, then the project's package folder will not be synced. - CLI commands will now iteratively search parenting folders until a
pyproject.tomlis found. - Added optional kwarg
recordtotaskandthreaddecorators 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
keepargument insync. The/libfolder is added to the default keep list.
- Python
Published by BrianPugh over 3 years ago
belay - v0.12.0 - Generator Send
Features
- Implements the
sendmethod for generators.
Misc Changes
- Default
followstimeout 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
cleanto the belay CLI.belay cleanwill delete any python files not referenced intools.belay.dependenciesinpyproject.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 updateand 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.
- Dependencies are specified by URLs to py files in
- Python
Published by BrianPugh over 3 years ago
belay - v0.9.3 - Fix CircuitPython Compatibility
Features
- Adds attribute
device.implementation.emittersfor detecting available emitters (nativeandviper).
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
loxfrom dependency list.
- Python
Published by BrianPugh over 3 years ago
belay - v0.9.0 - New commands; better and faster sync.
Features
- New command
belay runto run a file on-device. - New command
belay execto execute a python string on-device. syncimprovements:- 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
nativeandviperdecorators for a large speed boost - Parallelized pre-processing operations for faster syncs.
- Misc bug fixes; a lot more unit testing.
- New argument
- Python
Published by BrianPugh over 3 years ago
belay - v0.8.0 "identify" command.
Features
- Added the
identifycommand to the cli. This executesinfo, 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
attemptskeyword argument when creating thebelay.Device. See docs for details and limitations. - Added
sys.platforminformation to theImplementationdata structure. - Add
infocli command to see deviceImplementationinformation. 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
hashlibto 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.
- Since CircuitPython doesn't guarentee
- New attribute
device.implementationcontains the name (micropythonorcircuitpython) 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
taskorthreaddecorators 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. Runbelay --helpfor more information.- Currently only one supported action,
sync, to sync a folder to the device's root.
- Currently only one supported action,
- Added the public method
Device.close()to gracefully close device connection (Partially addresses #14). - Support decorating generator functions with the
taskdecorator (Addresses #15). printcalls from device are now forwarded to host'sstdout. 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.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.pyandboot.pyin the sync folder. They don't actually impact Belay's ability to operate. RemovedSpecialFilenameErrorthat would have been previously raised if either of these were present. - Added optional keyword argument
keepto 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
ValueErrorraised byDevice.sync
Internal
- Moved on-device code snippets into their own folder for easier maintenance.
- Python
Published by BrianPugh almost 4 years ago
belay - v0.2.0
Features
- Support for multiple device
taskandthreaddecorators. - Allow access of decorated functions from
taskandthread.
Misc Changes and Improvements
- Improve decorator stripping logic.
- Change belay prefix from
__belay_to_belay_. - Change
json_decoratorto__belay_jsonto reduce chance of name collision. - Reduce whitespace in returned json data.
- Rename
hash_remote_fileto__belay_hash_fileto reduce chance of name collision. Don't invoke viataskto 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