Releases: ezmsg-org/ezmsg
V3.6.2
What's Changed
- Add link in docs/other to BCI Society 2025 ezmsg poster. by @cboulay in #184
- HOTFIX: Address Linux latency regression by @griffinmilsap in #196
Full Changelog: V3.6.1...v3.6.2
V3.6.1
What's Changed
- Move numpy dep from optional to required by @cboulay in #161
- Move numpy dep from required to extras - AxisArray and test by @cboulay in #163
- 165 deduplicate graph parsing code by @cboulay in #166
- Fix: Write buffering in MessageLogger by @griffinmilsap in #168
Full Changelog: v3.6.0...V3.6.1
v3.6.0
What's Changed
- Feature:
ezmsg.util.rate.Ratewith synchronous sleep by @griffinmilsap in #151 - Add
steparg tosliding_win_oneaxisby @cboulay in #152 - Feature: AxisArray with CoordinateAxes by @griffinmilsap in #153
- Create and use fast_replace by @cboulay in #155
- Add functionality to AxisArray to convert to XArray DataArray by @laurendiaz in #156
New Contributors
- @laurendiaz made their first contribution in #156
Full Changelog: v3.5.0...v3.6.0
v3.5.0
[3.5.0] - 2024-09-18
Added
- Introduced
.git-blame-ignore-revsto ignore formatting and code styling revisions. - Integrated pre-commit hooks:
- Added
rufffor linting and formatting. - Included codebase-wide formatting fixes using
blackanddos2unix.
- Added
- Updated CI workflow (
ci.yml) to run tests on Ubuntu, Windows, and macOS across Python versions 3.8 to 3.12:- Added caching and dependency management with
uv. - Automated test execution using
pytest.
- Added caching and dependency management with
- Added release workflow (
publish.yml) to automate package publishing to PyPI:- Utilized
uvandtwinefor building and publishing distributions.
- Utilized
- Configured pre-commit file (
.pre-commit-config.yaml) for automatic formatting and linting usingruff.
Changed
- Switched build backend from Poetry to Hatchling in
pyproject.toml:- Updated version to
3.5.0. - Revised dependencies and extras to align with new setup.
- Updated version to
- Merged previous GitHub Actions workflows (
python-publish-ezmsg.ymlandpython-tests.yml) into the newci.ymlandpublish.ymlworkflows. - Refined Sphinx configuration for improved readability in code block formatting.
- Various code formatting and style improvements:
- Refactored
SETTINGSandSTATEfor clearer structure. - Enhanced logging and error handling for better debugging.
- Streamlined axis handling in
AxisArrayand generator methods.
- Refactored
Fixed
- Resolved misaligned function definitions for
asyncandshutdownmethods. - Fixed issues with
AxisArrayconcatenation and key-based filtering to ensure correct behavior when modifying or dropping axes.
v3.4.0
What's Changed
- Add tests for slice_along_axis and sliding_win_oneaxis. by @cboulay in #104
- Bugfix:
ezmsg serveis now venv compatible by @griffinmilsap in #109 - Big docs update by @cboulay in #107
- Inspect tasks instead of assuming call signatures and return types by @griffinmilsap in #121
- Properly scope try/except block to not hide bad settings by @cboulay in #113
- Eliminate extensions; migrated to ezmsg-org. by @cboulay in #128
Functionally, this is a rather small change. Structurally, this is a big change because it moves the extensions out of this repo into their own respective repos, which makes maintenance a lot easier.
Full Changelog: v3.3.4...v3.4.0
v3.3.4
ezmsg 3.3.4 Changelog
Packaging changes
The src layout is a modern standard that isolates our source code from other project resources. This change minimizes the risk of accidental inclusion of unwanted files in the distribution, leads to cleaner packaging and install processes, and contributes to more reliable testing practices. For our developers and contributors, this translates to a more straightforward and error-resistant development workflow.
In conjunction with the migration to a src layout, ezmsg is also excited to convert to poetry for our packaging and dependency management needs. Poetry is a cutting-edge tool that offers several advantages over traditional packaging systems. Read about it here
Core Changes
- Bumped version to
3.3.4for minor fixes and improvements. - Improved debugging by adding log line for current log level in
__init__.py. - Enhanced logging for thread shutdown in
backendprocess.py. - Ensured
graph_serviceinitialization precedesshm_serviceingraphcontext.py. - Enhanced subscriber notifications to include interface information in
graphserver.py. - Broadened exception catching in
server.pyto handle genericOSError. - Added error handling for shared memory closure to
shmserver.py. - Simplified shared memory reattachment in
subclient.py. - Several refactors addressing graph context management, code readability, and
FIXMEcomments inbackend.py. - BACKWARD INCOMPATIBILITY: Changes to underlying message logger format breaks loading old message logs.
Extensions (ezmsg-zmq)
- Version of
ezmsg-zmqextension has been bumped to1.1.5. - Updated
ezmsg-zmqwith await_for_subsetting to control subscriber wait behavior inZMQSenderUnit. - Removed
pollerSTATE variable fromZMQSenderUnit
Extensions (ezmsg-sigproc)
- Version of
ezmsg-sigprocextension has been bumped to1.2.3. - Improvements to the
ButterworthFilterto enforce type checking for message processing. - Refactor of
ewmfilterto support scale array broadcasting and customizablezero_offset. - Enhancement of
SampleTriggerMessagehashability by settingunsafe_hashtoTrue. - Adjustment in
Spectrumclass to rename output axis based on settings. - Replaced
OscillatorwithCounterintest_downsample.pyto better align with test requirements and added new assertions. - Introduction of extensive unit tests for the
Countersynthesizer. - Introduction/reimplementation of almost every signal processing unit as a generator to allow for more comprehensive unit testing and better notebook experiences.
- Extensive unit testing (thank you @cboulay and Wyss!)
Utilities and Version Bumping
- Implemented message output rate limiting in
MessageQueuethroughoutput_hzparameter. - Fixed time jump handling in
Rateutility. - Added new transformation utility
gen_to_unitfor generator to asyncezmsgUnit conversion. - Additional generator utilities introduced into the
ezmsgutility module.
Documentation and Examples
- Enhanced the
README.mdwith installation instructions, a list of external extensions, and a new Publications section. - Introduced an example script
ezmsg_generator.pythat showcases how to encapsulate computational logic within a generator and integrate it withezmsg.
Acknowledgments
Thanks to the contributors who have played a role in enhancing the robustness and feature set of ezmsg.
New Contributors
- @hannahgooden made their first contribution in #32
Full Changelog: V3.3.3...v3.3.4
3.3.3: Minor enhancements and Bugfixes
ezmsg.core 3.3.3
asyncinitializeandshutdownfor unitsezmsg.util.messagequeuesupports publishing at a particular rate
ezmsg-sigproc 1.2.2
- Bugfix: SampleTriggerMessages are no-longer frozen
3.3.2: Minor Bugfixes
ezmsg.core 3.3.2
- Global topics supported by passing
EnumstoConnections - Clearing
MessageCacheafter unit shutdown. This fixesBufferErrorson exit caused by references contained with theCaches. - Removed local cache reference from
Publisher. - WIP: Remove proxy topics from
graphvizoutput.
ezmsg-zmq 1.1.3
- Closing monitor socket of
ZMQPoller/Senderprior to closing primary socket. This fixesResourceWarningon shutdown of the ZMQ units.
ezmsg-sigproc 1.2.1
- Creating
asyncio.Eventwith default factory for sigproc filter state. Fixes runtime loop error.
3.3.1: Bugfixes and MessageLogger/Replay Enhancements
ezmsg.core 3.3.1
This pull request primarily addresses a bug introduced in v3.3.0 where multiple components can be run using ez.run syntax. This new feature came with an unforeseen consequence where these components could possibly (and with startling frequency tended to) have duplicate names, resulting in multiple subscribers/publishers sharing the same topic names. This has been addressed with a change to the ez.run call signature, requiring unique names for every component to be run by ezmsg. Additionally, when run this way in v3.3.0, every component was run in its own process which could be circumvented by using force_single_process but ultimately did not give developers the flexibility they needed when running multiple components. To address this, we have added a process_components keyword argument to the ez.run call signature which specifies which components are to reside in dedicated processes. By default, all components passed to ez.run will now run in the same process (unless sub-components specify their own process_components).
Example v3.3.1 call signature for ez.run
ez.run(
# All components are specified as name: component pairs.
# This construction requires all components to have unique names at this level
# All caps are used for these names in this example just for convention.
REPLAY = replay,
PREPROC = preproc,
SEQ_COLL = sequence_collector,
FILT_COLL = filt_collector,
TERM = term,
# Use the root_name keyword argument to have all of these units reside under a designated root collection
root_name = "PROJECT",
# Connections between these components and streams can be specified just as before
connections = [
(replay.OUTPUT_MESSAGE, preproc.INPUT_SIGNAL),
(preproc.OUTPUT_SEQUENCE, sequence_collector.INPUT_MESSAGE),
(preproc.OUTPUT_FILTERED, filt_collector.INPUT_MESSAGE),
(sequence_collector.OUTPUT_MESSAGE, term.INPUT)
],
# Here, you can specify which of the components passed into ez.run should have a dedicated process.
process_components = [preproc]
)If you used to call ez.run with a single component, you should consider adapting your code from ez.run(system) to ez.run(SYSTEM = system). Although your code will still function when passing a single component, you should receive a little warning from your typechecker, and this usage is now considered deprecated, and you will receive a DeprecationWarning
Additional features introduced:
ezmsg.util.messagelogger.MessageLoggernow logs timestamps for every message in the text fileezmsg.util.messagereplay.MessageReplaycan be run dynamically by publishingPathobjects; message rate can be controlled to replay files as fast as possible, at specified message rates, or "as recorded" using these new timestamps- NOTE:
MessageLoggerhas a new message at the start of every log file that just indicates the start time of the log file. This is currently used byMessageReplaywhen replaying messages "as recorded". If you've been usingezmsg.util.messagecodec.MessageDecoderto directly decode json messages from these files, you may now notice aLogStartmessage in your file that you didn't put there. To address this,ezmsg.util.messagecodec.message_loghas been introduced as a generator that opens the log file, decodes the messages usingMessageDecoderand skips over thisLogStartmessage.
- NOTE:
Bugfixes
- Typing for
process_componentsonly requires atyping.Collection[Component]instead of atyping.Tuple[Component, ...] ezmsg.util.messages.axisarray.AxisArray:iselallows integers, slices, and index arrays- Users can specify
indexerskeyword argument, or just use kwargs to specify indexers, just likexarray
ezmsg.util.messagereplay.MessageLoderis gone. It was not a meaningful addition to the core.- Fixed
tests/test_perf.pymessage channels buffers testing. - Addressed #28
3.3.0: Quality of Life Enhancements
ezmsg.core v3.3.0
- Better extension packaging (with consistent naming for single-file extensions)
- Better flow control with
asyncio.sleep(0)after every publish. Note: this halves performance of the perf test, but maintains flow without constant backpressure warnings for systems that publish really fast - New message utilities in
ezmsg.utilezmsg.util.messages.axisarray--AxisArrayfully fleshed out- Includes
xarray-likeselandiselfunctionality for slices along dimensions
- Includes
- Finally removed
StampedMessage ezmsg.util.terminate--TerminateOnTotal(messages received) andTerminateOnTimeoutunits introducedezmsg.util.messagecodec-- RefactoredJSONEncoderandJSONDecoderforezmsg.util.messagelogger. This codec now properly serializes/deserializes message dataclasses just likepickle, but with a human-readable plaintext message log format! NB.MessageEncoderandMessageDecodermoved here fromezmsg.util.messageloggerand the json file format has changed ever-so-slightly (and backward compatibly) to support this.ezmsg.util.messagereplay-- Introduces aMessageReplayunit that can deserialize and publish messages from message files written byMessageLogger. Also introduces aMessageCollectorthat just saves all received messages to a list in theSTATE; can be accessed after execution completes from a notebook if run in the main process.ezmsg.util.messagequeue-- HUGE enhancement that allowsezmsgsystems to run with "squishiness" and "leakiness" -- allowing your system to accumulate a backlog of messages (that leaks if/when you want) to prevent a slow downstream unit from backing up your whole system.
ez.runforce_single_processkeyword argument which tries to run provided components all in one process -- particularly useful for notebook operation- Can now pass multiple components to run, and connect them directly
GraphServerandSHMServerEnhancements- Servers are now run in threads with dedicated event loops as opposed to separate processes. This dramatically speeds up startup on Windows
- Servers will check for
$EZMSG_GRAPHSERVER_ADDRand$EZMSG_SHMSERVER_ADDR(strings formatted ashostname:12345) environment variables -- and if defined,ezmsgwill force a connection to these addresses. - Reserved ports for
GraphServer,SHMServerare 25978 and 25979 respectively. If the environment variables are not defined,ezmsgwill first check these reserved ports on127.0.0.1and try to connect to servers running there. theezmsg startcommand starts servers on the default ports and is a handy way for multiple systems on the same PC to dynamically interact with each-other - If the environment variables are not defined and there are no servers running on the default ports,
ezmsgwill force-start new servers on unoccupied ports starting from 10000 (or$EZMSG_SERVER_PORT_START) -- but avoiding default ports for the services.
- Command Line Changes
ezmsg startnow reports forked PIDezmsg graphvizwrites a DOT-formatted graph specification to stdout; can be piped tographvizto visualize the current running graph.
- Fixed bugs
- Moved
__version__attribute toezmsg.versionfixpip install - "Single-process-mode" isn't special anymore; main process is always used for execution of one group of units
ezmsgwill always start a new threaded eventloop for tasks; because of@ez.maincode- Better
KeyboardInterrupthandling (especially on Windows) Unit.Initialize()and creation ofStateis now called from the task thread (andasynciosynchronization primitives will automatically be associated with the correct event loop- Significantly cleaned up code pertaining to connections to the
GraphServerandSHMServer; reduced redundant code between these services significantly as well. - No-longer forcing
WindowsSelectorEventLoopon Windows forasyncio. - All leaked
ResourceWarningsresolved; allasynciooperations now threadsafe-ly implemented. - Resolved
ConnectionResetErrorandBrokenPipeErroron shutdown. Settingsnow decorated with@dataclass_transformand type-checking should resolve settings fields appropriately.- This required introducing
ezmsg's FIRST non-stdlib dependency;typing_extensionswhich is required to backport this typing PEP to Python 3.8.typing_extensionshas no external deps and is pure-python; unlikely to break in the future.
- This required introducing
Settingsclasses no-longer automatically generateunsafe_hashfunctions. This behavior can be reintroduced by creating your owndataclassdefinition withunsafe_hash=True, frozen=Trueand inheriting fromSettings.- Tasks/Publishers/Subscribers/Threads, etc.. now have attributes that are less likely to collide with user-code
- Deprecated
ezmsg.testing
- Moved
Extensions
ezmsg.sigproc v1.2.0
- All signal processing modules rewritten to operate on
AxisArrays- All units allow you to specify named axis to operate on (usually time axis)
- New spectrum (FFT) unit in
ezmsg.sigproc.spectral - Window now allows
newaxisaccumulation for batching TimeseriesMessagedeletedTSMessageis now a function that returns a properly formattedAxisArray
ezmsg.websocket v1.1.1
__version__attribute- Moved units from
ezmsg.websockettoezmsg.websocket.units - Added a
pyproject.toml
ezmsg.zmq v1.1.1
__version__attribute- Moved units from
ezmsg.zmq.senderandezmsg.zmq.pollertoezmsg.zmq.units - Added a
pyproject.toml