Commit Graph

41 Commits

Author SHA1 Message Date
Felix Weiler-Detjen
6facd5e8a7 WIP: file sender. 2025-01-23 16:30:52 +00:00
Felix Weiler
cf0f8e73c2 Add registry for all senders, receivers and config files. (#188)
* Add registry for all senders, receivers and config files.

Minor tweaks to signatures of SerialReceiver and ConsoleSender to
maintain compability with ather Senders and Receivers.

* fixed failing console test

* fixed import order

---------

Co-authored-by: Aljoscha Sander <aljoscha@flucto.tech>
2025-01-23 14:24:37 +01:00
Felix Weiler
d2f4233c98 Fix #183, MqttSender now correctly raises PackerError. (#184) 2025-01-18 11:52:24 +01:00
Felix Weiler
98099f5b00 Refactor heisskleber core, remove synchronous implementations (#156)
* #129 AsyncTcpSource enhancements
- retry connection on startup (behavior is configurable)
- reconnect if data receiving fails (EOF received)
- add Python logging
- add unit tests

* remove syncronous implementations.

* WIP: Refactor packer/unpacker

* Refactor type hints and topic handling in console sink.

* Remove comma from tcp config enum definitions

* Remove references to deleted synchronous classes.

* Hopefully stable interface for Packer and Unpacker.

* WIP: Working with protocols and generics

* Finalized Sink, Source definition.

* Rename mqtt source and sink files

* Rename mqtt publisher and subscriber.

* Fix start function to async.

* Update documentation.

* Remove recursion from udp source.

* rename unpack to unpacker, stay consistent.

* Renaming in tests.

* Make MqttSource generic.

* Configure pyproject.toml to move to uv

* Add nox support.

* Update documentation with myst-parser and sphinx.

* Mess with autogeneration of __call__ signatures.

* Add dynamic versioning to hatch

* Asyncio wrapper for pyserial.

* Add docstrings for serial sink and source.

* Refactor config handling (#171)

* Removes deprecated "verbose" and "print_std" parameters

* Adds class methods for config generation from dictionary or file (yaml or json at this point)

* Run-time type checking via __post_init__() function

* Add serial dependency.

* WIP

* Move broker to bin/

* Update docs.

* WIP: Need to update docstrings to make ruff happy.

* Move source files to src/

* Fix tests for TcpSource.

* WIP: Remove old tests.

* Fix docstrings in mqtt classes.

* Make default tcp unpacker json_unpacker.

* No failed tests if there are no tests

* Update test pipeline

* Update ruff pre-commit

* Updated ruff formatting

* Format bin/

* Fix type hints

* No type checking

* Make stop() async

* Only test on ubuntu for now

* Don't be so strict about sphinx warnings.

* Rename TestConf for pytest naming compability.

* Install package in editable mode for ci tests.

* Update dependencies for docs generation.

* Add keepalive and will to mqtt, fixes #112.

* Update readme to reflect changes in usage.

* Requested fixes for console adapters.

* Raise correct errors in unpacker and packer.

* Correct logger name for mqtt sink.

* Add config options for stopbits and parity to Serial.

* Remove exception logging call from yaml parser.

* Add comments to clear up very implicit test.

* Rename Sink -> Sender, Source -> Receiver.

* Rename sink and source in tests.

* Fix tests.

---------

Co-authored-by: Adrian Weiler <a.weiler@aldea.de>
2024-12-09 19:32:34 +01:00
Felix Weiler
1f6e17bd42 Switch to pathlib for config paths. (#128)
* Switch to pathlib for config paths.

* Run tests on windows platform.

* Fix test in zmq to mock Path object instead of str.

* Fix async zmq test.

* Revert "Run tests on windows platform."

This reverts commit ac4c47ef4ed13b7440521dc39c2224b09a4926bb.
2024-05-29 15:41:12 +02:00
Felix Weiler
a183f28cad Fix mqtt publisher connection issue. (#100) 2024-03-09 11:33:53 +08:00
Felix Weiler
d9df091d2f Feature/async udp (#80)
* First draft of async udp source.

* Add async udp publisher. UDP integration tests.

* Renamed publisher to sink, subscriber to source.
2024-02-22 19:23:33 +08:00
Felix Weiler
8c985bdf3c Refactor/background tasks (#75)
* Add start, stop and __repr__ to sink and source types.

* Merge conflicts on mqtt async pub and resampler.

* Add start() and stop() functions to udp and zmq.

Change tests accordingly.

* Rename broker, ip, interface to common config name "host".

* Updated "host" entry in config files.

* Add lazyload to mqtt-source.
2024-02-22 18:50:13 +08:00
Felix Weiler
1d1e762912 Add verbose and pretty flags to hkcli. (#71)
* Add verbose and pretty flags to hkcli.

Adds testing for console sink.

* Add argparse help strings to hkcli.
2024-02-17 12:20:45 +08:00
Felix Weiler
bbcdbb624f Feature/command line interface (#54)
* Move scripts to dedicated run folder to be available from other sources.

* Additioal cmdline args for hkcli

* Add scripts.

* Remove deprecated PATH from factory.

* Skipping factory tests, need to redo.

* Add config options for hkcli.

* Bump patch version.
2024-01-22 19:00:17 +01:00
Felix Weiler
78ba98a587 Feature/async sources (#46)
* WIP: Added async file reader.

* Async resampling and synchronization refactored.

* Add async mqtt publisher. Remove queue from joint.

* Add async zmq publisher and subscriber.

* Modify integration tests for streaming.

* Name refactoring resampler.

* Added async source/sink to factory.

* Refactor joint and add integration tests.

* Add termcolor dev dependency

* Add conosole source and sink

* Add cli interface for different protocols

* Removed files unfit for merge.

* Fix review requests.

* Restore use of $MSB_CONFIG_DIR for now.

It seems that the default behaviour is not looking for
.config/heisskleber

* Remove version test, causing unnecessary failures.
2024-01-22 11:23:00 +01:00
felix
e7ba510423 Remove unnecessary configs. Increase wait in zmq integration test. 2023-11-28 17:39:39 +01:00
felix
936e1f4c1c Add resources/zmq.yaml for tests. 2023-11-28 14:53:26 +01:00
felix
799ec8f2cd Remove test of zmq broker executable. 2023-11-28 14:49:01 +01:00
Aljoscha Sander
b37a871f79 added broker test 2023-11-27 14:52:46 +01:00
Aljoscha Sander
07508d2899 WIP: working on zmq pub sub test 2023-11-27 09:27:07 +01:00
Aljoscha Sander
510c60a78b fixed broken tests 2023-11-27 07:32:54 +01:00
Aljoscha Sander
e1ef65ef66 WIP: pub and sub won't talk to each other (zmq) 2023-11-27 00:12:28 +01:00
Aljoscha Sander
ef4bd9bb9f fixed version assert 2023-11-26 20:34:32 +01:00
Aljoscha Sander
7d18a8d931 fixed ruff complaints 2023-11-26 17:56:19 +01:00
Aljoscha Sander
d16a4ce341 WHY THE FUCK DOES THE PRE-COMMIT RUFF HOOK PRODUCE A DIFFERENT OUTPUT THAN POETRY RUN RUFF>?@ 2023-11-25 18:51:16 +01:00
Aljoscha Sander
c754689c1f added broker test and removed signal handler from broker 2023-11-23 15:17:34 +01:00
Aljoscha Sander
cc64f823d0 WIP: fixed typo 2023-11-23 15:09:50 +01:00
Felix Weiler
efa3a504dd Replace black with ruff for formatting. 2023-11-15 15:36:41 +01:00
Felix Weiler
473a93ef9e Rename Subscriber to Source, Publisher to Sink. 2023-11-15 15:34:07 +01:00
Felix Weiler
3fe8d11a60 Add get_source and get_sink to heisskleber. 2023-11-15 14:57:23 +01:00
Felix Weiler
7f1b92f5cc Add more integration tests, run test on joint. 2023-11-13 20:31:31 +01:00
Felix Weiler
b055c68dfa Add Joint functionality and tests. 2023-11-13 20:06:41 +01:00
Felix Weiler
4ea5668db3 Cleaning up async mqtt subscriber. 2023-11-13 18:38:59 +01:00
Felix Weiler
1ea91f211d Tidy up messy merge conflict after stashing 2023-11-13 18:04:21 +01:00
Felix Weiler
03d1115c59 Fixed behaviour of streamer at f_in == f_out 2023-11-13 15:34:53 +01:00
Felix Weiler
f8147dac89 Fix async mqtt test 2023-11-13 14:50:12 +01:00
Felix Weiler
fd18c18d5a Fixed test for async streamer 2023-11-11 20:40:55 +01:00
Felix Weiler
0ba690cb4a WIP: Write more tests 2023-11-10 17:01:23 +01:00
Felix Weiler
55db1e325e Work in progress. 2023-11-09 12:56:09 +01:00
Felix Weiler
6ccc4d8f06 WIP: Async MQTT subscriber 2023-11-09 11:31:23 +01:00
Felix Weiler
774e0d8496 Breaking: Change signatures of Publisher.send and Subscriber.__init__.
This commit is a lot and adds breaking changes.
Also adds a UDP subscriber and publisher.
2023-11-07 12:41:07 +01:00
Felix Weiler
8cfc66ac45 WIP: Test, refactor 2023-11-06 22:52:48 +01:00
Felix Weiler
6729544f58 Minor fixes in network 2023-11-03 17:41:03 +01:00
felix
7acbdb9d16 Fix doc settings. 2023-11-02 12:16:57 +01:00
felix
5e2cbb8cb8 Initial commit. 2023-10-31 14:37:16 +01:00