Commit Graph

113 Commits

Author SHA1 Message Date
Felix Weiler-Detjen
6facd5e8a7 WIP: file sender. 2025-01-23 16:30:52 +00:00
Felix Weiler-Detjen
c69a9ec051 WIP: implement file sender and receiver. 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
2580ceda35 Merge pull request #181 from flucto-gmbh/fix/mqtt-ssl
Fix mqtt sender not sending any messages via ssl.
2025-01-13 10:57:01 +00:00
Felix Weiler-Detjen
37cd50c41c Add tls parameters to mqtt receiver. 2025-01-13 10:45:43 +00:00
Felix Weiler-Detjen
4e6adfca1a Fix error in release.yml 2025-01-10 14:53:59 +00:00
Felix Weiler-Detjen
f5945af65d Sort __init__.py 2025-01-10 14:51:57 +00:00
Felix Weiler-Detjen
6c210bdf78 Fix mqtt sender not sending any messages via ssl. 2025-01-10 14:43:46 +00:00
Felix Weiler
f3dab17d19 Merge pull request #179 from flucto-gmbh/fix/error-naming
Rename UnpackError to UnpackerError
2024-12-11 12:17:26 +01:00
Felix Weiler-Detjen
af767078bf Rename UnpackError to UnpackerError 2024-12-11 12:16:13 +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
9ea27403a4 Add documentation for mqtt.yaml usage. (#127) 2024-05-27 14:08:19 +02:00
Felix Weiler
26406110e5 Feature/filters (#110)
* Change Serializable definition.

* Add iter and aiter methods to source types.

* Add filter baseclass and two implementations.

G-H filter, a simple observer.
Butterworth filter, can be high or low.

* Fix documentation of gh filter.
2024-04-09 09:34:51 +08:00
Felix Weiler
04fc291b27 Turn sources into iterators (#109)
* Change Serializable definition.

* Add iter and aiter methods to source types.
2024-04-09 09:33:37 +08:00
Felix Weiler
26a1127ac5 Add source_id to MqttConf (#102)
* Introduced source_id field in mqtt config, added config export.

* Bump patch version.
2024-03-11 17:15:09 +08:00
Felix Weiler-Detjen
d33e3a64fb Bump patch version. 2024-03-09 19:25:24 +08:00
Felix Weiler
a183f28cad Fix mqtt publisher connection issue. (#100) 2024-03-09 11:33:53 +08:00
Felix Weiler
0fdada71c2 Async tcp source (#96)
* Added AsyncTcpSource.

* Refine async tcp

* Bump patch version.
2024-03-08 15:54:35 +08:00
Felix Weiler
79913647d5 Fix default is_connected value of async zmq subscriber. (#92)
* Fix default is_connected value of async zmq subscriber.

* Bump patch version.
2024-03-02 10:08:25 +08:00
Aljoscha Sander
e2c2d01de6 Fix/exception verbose output only (#91)
* made the print statement of when unpacking a message fails controlled by the verbose flag

* bump to 0.5.3
2024-02-27 19:10:38 +08:00
Aljoscha Sander
1ab1cbf521 bump to 0.5.2 2024-02-25 22:27:50 +08:00
Aljoscha Sander
d855e3e13d added error handling to decode in receive (#83) 2024-02-25 22:24:52 +08:00
Felix Weiler
efb8333aaa Add usage to readme. (#82) 2024-02-23 21:56:02 +08:00
Aljoscha Sander
b331821b25 updated to 0.5.1 2024-02-23 21:55:07 +08:00
Felix Weiler
334f8a257d Fix coverage report generation. (#81)
* Fix coverage report generation.

* Only run action on push to main

* Don't run tests on tests themselves.

* Fix on push directive
2024-02-23 11:14:23 +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
dependabot[bot]
01eebe3cbd Bump cryptography from 41.0.7 to 42.0.4 (#79)
Bumps [cryptography](https://github.com/pyca/cryptography) from 41.0.7 to 42.0.4.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/41.0.7...42.0.4)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-22 11:07:39 +08:00
Felix Weiler-Detjen
1a5114db5f Bump minor version. 2024-02-22 10:48:37 +08:00
dependabot[bot]
0908b63b40 Bump virtualenv from 20.23.0 to 20.25.0 in /.github/workflows (#38)
Bumps [virtualenv](https://github.com/pypa/virtualenv) from 20.23.0 to 20.25.0.
- [Release notes](https://github.com/pypa/virtualenv/releases)
- [Changelog](https://github.com/pypa/virtualenv/blob/main/docs/changelog.rst)
- [Commits](https://github.com/pypa/virtualenv/compare/20.23.0...20.25.0)

---
updated-dependencies:
- dependency-name: virtualenv
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-22 09:27:06 +08:00
dependabot[bot]
2fd6dbc58f Bump safety from 2.3.4 to 2.3.5 (#35)
Bumps [safety](https://github.com/pyupio/safety) from 2.3.4 to 2.3.5.
- [Release notes](https://github.com/pyupio/safety/releases)
- [Changelog](https://github.com/pyupio/safety/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pyupio/safety/compare/2.3.4...2.3.5)

---
updated-dependencies:
- dependency-name: safety
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aljoscha Sander <aljoscha.sander@mailbox.org>
2024-02-22 09:26:49 +08:00
dependabot[bot]
1d7e4affa9 Bump tornado from 6.3.3 to 6.4 (#40)
Bumps [tornado](https://github.com/tornadoweb/tornado) from 6.3.3 to 6.4.
- [Changelog](https://github.com/tornadoweb/tornado/blob/master/docs/releases.rst)
- [Commits](https://github.com/tornadoweb/tornado/compare/v6.3.3...v6.4.0)

---
updated-dependencies:
- dependency-name: tornado
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-22 09:23:23 +08:00
dependabot[bot]
1e4f1ffddf Bump actions/setup-python from 4.6.1 to 5.0.0 (#41)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.6.1 to 5.0.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4.6.1...v5.0.0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-22 09:23:00 +08:00
dependabot[bot]
622ec310cc Bump mypy from 1.7.1 to 1.8.0 (#43)
Bumps [mypy](https://github.com/python/mypy) from 1.7.1 to 1.8.0.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python/mypy/compare/v1.7.1...v1.8.0)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-22 09:22:45 +08:00
dependabot[bot]
3fb4b8e284 Bump importlib-metadata from 6.8.0 to 7.0.1 (#44)
Bumps [importlib-metadata](https://github.com/python/importlib_metadata) from 6.8.0 to 7.0.1.
- [Release notes](https://github.com/python/importlib_metadata/releases)
- [Changelog](https://github.com/python/importlib_metadata/blob/main/NEWS.rst)
- [Commits](https://github.com/python/importlib_metadata/compare/v6.8.0...v7.0.1)

---
updated-dependencies:
- dependency-name: importlib-metadata
  dependency-type: indirect
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-22 09:22:29 +08:00
dependabot[bot]
0e81b49e4a Bump idna from 3.4 to 3.6 (#33)
Bumps [idna](https://github.com/kjd/idna) from 3.4 to 3.6.
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst)
- [Commits](https://github.com/kjd/idna/compare/v3.4...v3.6)

---
updated-dependencies:
- dependency-name: idna
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-22 09:21:55 +08:00
dependabot[bot]
bd5798f41b Bump actions/cache from 2 to 4 (#53)
Bumps [actions/cache](https://github.com/actions/cache) from 2 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-22 09:21:35 +08:00
dependabot[bot]
576e557853 Bump pip from 23.3.1 to 24.0 in /.github/workflows (#59)
Bumps [pip](https://github.com/pypa/pip) from 23.3.1 to 24.0.
- [Changelog](https://github.com/pypa/pip/blob/main/NEWS.rst)
- [Commits](https://github.com/pypa/pip/compare/23.3.1...24.0)

---
updated-dependencies:
- dependency-name: pip
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-22 09:21:11 +08:00
dependabot[bot]
392548b61a Bump furo from 2023.9.10 to 2024.1.29 in /docs (#60)
Bumps [furo](https://github.com/pradyunsg/furo) from 2023.9.10 to 2024.1.29.
- [Release notes](https://github.com/pradyunsg/furo/releases)
- [Changelog](https://github.com/pradyunsg/furo/blob/main/docs/changelog.md)
- [Commits](https://github.com/pradyunsg/furo/compare/2023.09.10...2024.01.29)

---
updated-dependencies:
- dependency-name: furo
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-22 09:20:56 +08:00
dependabot[bot]
18d44704a1 Bump codecov/codecov-action from 3 to 4 (#66)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-22 09:20:31 +08:00
Felix Weiler
0311ad40cf Add reconnection to mqtt async publisher. (#73) 2024-02-17 12:23:11 +08:00
Felix Weiler
4ad5176847 Fix/resampler typecheck (#72)
* Add type checks to resampler.py, drops all non-numeric values.

* Single type check with ValueError raised if non-numeric.
2024-02-17 12:21:53 +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
c3fcb395e9 Removed last remaining reference to MSB. Closes #49. (#63) 2024-02-12 08:21:05 +08:00
Felix Weiler
03e6a056ff Add codecov action and dependencies. (#58) 2024-02-08 10:25:47 +01:00
Aljoscha Sander
e987e6111c hotfix zmqbroker: adedd main() 2024-01-30 16:40:32 +01:00
Felix Weiler
f2809c26ee Fixed error handling in cli.py (#57)
* Fixed error handling in cli.py

* Removed reference to MSB_CONFIG_DIR

* Add annotations to joint.

* Release patch 0.4.5
2024-01-26 17:30:34 +01: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