1
0
mirror of https://github.com/craigerl/aprsd.git synced 2026-06-01 13:45:06 -04:00
Commit Graph

78 Commits

Author SHA1 Message Date
hemna d0dfaa42e6 Added unit tests 2025-12-09 17:20:23 -05:00
hemna c34a82108b fixed tox failures 2025-11-26 20:28:25 -05:00
hemna 961d3e946a Fixed unit tests 2025-10-11 20:23:44 -04:00
hemna af0feaf9c8 Fixed some unit tests
Fixed unit tests related to the updated static method signatures
of the client and drivers.
2025-10-07 14:18:50 -04:00
hemna 1c39546bb9 Reworked the entire client and drivers
This patch includes a completely reworked client structure.
There is now only 1 client object, that loads the appropriate
drivers.  The drivers are fake, aprsis and tcpkiss.

The TCPKISS client was written from scratch to avoid using asyncio.
Asyncion is nothing but a pain in the ass.
2025-04-23 20:52:02 -04:00
hemna ec1adf4182 fixed list-plugins
This patch fixes the list-plugins and list-extensions.
Pypi changed their search page to require javascript, which
breaks python scripts....
2025-01-03 17:16:26 -05:00
hemna 72d068c0b8 Changed to ruff
This patch changes to the ruff linter.  SO MUCH quicker.
Removed grey and mypy as well.
2024-12-20 22:00:54 -05:00
hemna 3bba8a19da Removed LocationPlugin from aprsd core
This eliminates the requirement for geopy library and all it's deps.

The new location for the LocationPlugin is here:

https://github.com/hemna/aprsd-location-plugin
2024-12-11 15:55:16 -05:00
hemna 0880a356e6 Remove email plugin
This patch removes the email plugin from APRSD core.  The new
home for email plugin is here:

http://github.com/hemna/aprsd-email-plugin.git
2024-12-11 15:55:15 -05:00
hemna 8f8887f0e4 Remove webchat as a built in command.
Webchat will now be an extension that can be installed.
the extension is here:
https://github.com/hemna/aprsd-webchat-extension

Install it from git or pypi.
2024-12-11 15:55:15 -05:00
hemna f66b96288f Fixed issue with packet object and prepare()
If any part of the code had a packet object and called prepare()
on it, it would create a msgNo if it wasn't set.  Sometimes we
get packets on the wire/RF that don't have a msgNo, so adding one
locally is wrong.   We should ONLY create a msgNo on a packet that
is destined for transmission.

This patch ensures that even if prepare() is called, that only
packets that are created locally for TX get a msgNo unless it
already exists from RX'd packets.
2024-11-26 16:52:39 -05:00
hemna c82e9ba597 Fixed broken unit tests
This patch fixes some broken unit tests with the aprsis client.
2024-11-21 09:01:49 -05:00
hemna 224686cac5 Added unit test for APRSISClient 2024-11-05 13:39:44 -05:00
hemna ab2de86726 Added unit test for ClientFactory 2024-11-05 12:32:16 -05:00
hemna f1d066b8a9 Added unit test for client base
This patch adds a unit test for the APRSClient base class.
2024-11-05 12:15:59 -05:00
hemna b317d0eb63 Refactor client and drivers
this patch refactors the client, drivers and client factory
to use the same Protocol mechanism used by the stats collector
to construct the proper client to be used according to
the configuration
2024-05-23 11:38:27 -04:00
hemna f92b2ee364 Got unit tests working again 2024-04-02 09:30:45 -04:00
hemna a270c75263 Fixed pep8 errors and missing files 2024-04-02 09:30:45 -04:00
hemna f400c6004e Fix for filtering curse words
This patch adds a fix for filtering out curse words.
This adds a flag to the regex to ignore case!
2024-03-23 18:02:01 -04:00
hemna f53df24988 More packet cleanup and tests 2024-03-23 17:05:41 -04:00
hemna e386e91f6e Eliminated need for from_aprslib_dict
This patch eliminates the need for a custom
static method on each Packetclass to convert an aprslib
raw decoded dictionary -> correct Packet class.

This now uses the built in dataclasses_json from_dict()
mixin with an override for both the WeatherPacket and
the ThirdPartyPacket.

This patch also adds the TelemetryPacket and adds some
missing members to a few of the classes from test runs
decoding all packets from APRS-IS -> Packet classes.

Also adds some verification for packets in test_packets
2024-03-20 21:46:43 -04:00
hemna 386d2bea62 Fix for micE packet decoding with mbits 2024-03-20 16:12:18 -04:00
hemna 1477e61b0f Refactored packets
this patch removes the need for dacite2 package for creating
packet objects from the aprslib decoded packet dictionary.

moved the factory method from the base Packet object
to the core module.
2024-03-20 15:41:25 -04:00
hemna e9c48c1914 fix pep8 failures 2024-02-27 14:21:04 -05:00
hemna 6a6e854caf Removed flask-classful from webchat
This patch removed the dependency on flask-classful.  This required
making all of the flask web routing non class based.

This patch also changes the aprsis class to allow retries for failed
connections when the aprsis servers are full and not responding to
login requests.
2023-07-20 14:34:31 -04:00
hemna 35d41582ee Moved logging to log for wsgi.py
Added wsgi.py to be used with gunicorn to start aprsd's web admin
interface.

gunicorn -b :8080 "aprsd.wsgi:app"
2023-07-16 16:32:39 -04:00
hemna fe0d71de4d Replace ratelimiter with rush
This patch replaces the ratelimiter library with rush for rate limiting
as the ratelimiter package doesn't work with python 3.11.

This patch also refactors the flask.pu to admin_web.py and
aprsd.py to main.py
2023-07-08 17:30:22 -04:00
hemna 80b85e648f Fixed unit tests for Location plugin 2023-06-22 09:06:55 -04:00
hemna e9a954a8fd Fix some unit tests and loading of CONF w/o file 2022-12-27 15:31:49 -05:00
hemna 7ccfc253cf Removed references to old custom config
Also updated unittests to pass.
2022-12-27 14:30:03 -05:00
hemna e13ca0061a Convert config to oslo_config
This patch is the initial conversion of the custom config
and config file yaml format to oslo_config's configuration mechanism.

The resulting config format is now an ini type file.

The default location is ~/.config/aprsd/aprsd.conf

This is a backwards incompatible change.  You will have to rebuild
the config file and edit it.

Also any aprsd plugins can now define config options in code and
add an setup.cfg entry_point definition
oslo_config.opts  =
  foo.conf = foo.conf:list_opts
2022-12-24 16:51:40 -05:00
hemna ce3b29f990 Added rain formatting unit tests to WeatherPacket 2022-12-22 12:04:17 -05:00
hemna f464ff0785 Removed watchlist plugins
All plugins can be loaded with the enabled_plugins
Also added unit tests for the PluginManager
2022-12-21 11:18:26 -05:00
hemna 123b3ffa81 Change RX packet processing to enqueu
This changes the RX thread to send the packet into a queue instead of
starting a new thread for every packet.
2022-12-18 08:52:58 -05:00
hemna 6030cb394b More messaging -> packets cleanup
Fixed the unit tests and the notify plugin
2022-12-16 15:58:03 -05:00
hemna 67a441d443 Updated plugins and plugin interfaces for Packet
This patch updates unit tests as well as the Plugin filter()
interface to accept a packets.Packet object instead of a
packet dictionary.
2022-12-16 15:58:02 -05:00
hemna 19e5cfa9cc Add unit tests for webchat 2022-12-14 08:26:12 -05:00
hemna 585d55f10d Added webchat command
This patch adds the new aprsd webchat command which shows
a new webpage that allows you to aprsd chat with multiple
callsigns
2022-11-23 13:00:36 -05:00
hemna 1ccb2f7695 Moved log.py to logging
Also renamed logging/logging.py to logging/rich.py
2022-11-23 13:00:36 -05:00
hemna bed060f1c5 Refactor utils to directory
This patch moves the utils.py to utils/__init__.py
and fuzzyclock.py to utils
and separates the ring_buffer to it's own file in utils
2022-11-23 13:00:36 -05:00
hemna 2f6e7e17e8 Added unit tests for dev test-plugin
Also added a check to make sure that the aprs_login
parameter is passed in for use as the fromcallsign.
2021-12-12 16:35:26 -05:00
hemna a7bbde4a43 Send Message command defaults to config
The APRS_LOGIN and APRS_PASSWORD arguments now fallback
to the config file if it exists.

First it checks the passed in parameters, then checks the
environement vars, then checks the parsed config to find the
login and password.

This patch also adds unit tests for the send-message command to
check the fallback.
2021-12-12 16:13:08 -05:00
hemna 8ea00e9888 Added unit tests for USWeatherPlugin, USMetarPlugin 2021-12-07 13:31:58 -05:00
hemna 5d6ac5cf31 Added test_location to test LocationPlugin 2021-12-07 12:38:12 -05:00
hemna 0ad791bdd9 Added NotifyPlugin unit tests and more
This patch restructures the unit tests for plugins.
This also adds unit tests for the NotifyPlugin
2021-12-07 11:25:14 -05:00
hemna 152132b0ed Fix test failures 2021-11-10 11:51:21 -05:00
hemna e009791b75 Converted MsgTrack to ObjectStoreMixin 2021-10-22 16:07:20 -04:00
hemna b0d25a76f7 Fixed unit tests
Had to initialize the watchlist and seenlist with a config dict.
2021-10-21 09:20:24 -04:00
hemna 491644ece6 Added new Config object.
The config object now has builtin dot notation getter with default

config.get("some.path.here", default="Not found")
2021-10-04 15:37:14 -04:00
hemna 23e3876e7b Refactor utils usage
This patch separates out the config from the utils.py
utils.py has grown into a catchall for everything and this
patch is the start of that cleanup.
2021-09-16 17:08:30 -04:00