From 5bd4b1bad2506f2f5f71161ac9e8a9b141e0fef4 Mon Sep 17 00:00:00 2001 From: Eugene Crosser Date: Tue, 19 Jul 2022 16:57:47 +0200 Subject: [PATCH] rename `lookaside` to `rectifier` --- debian/control | 2 +- debian/lintian-overrides | 2 +- debian/loctrkd.conf | 2 +- debian/loctrkd.default | 2 +- .../{loctrkd.lookaside.service => loctrkd.rectifier.service} | 2 +- debian/loctrkd.target | 4 ++-- debian/rules | 2 +- loctrkd/{lookaside.py => rectifier.py} | 4 ++-- test/common.py | 2 +- test/test_storage.py | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) rename debian/{loctrkd.lookaside.service => loctrkd.rectifier.service} (84%) rename loctrkd/{lookaside.py => rectifier.py} (95%) diff --git a/debian/control b/debian/control index ec01d74..72dbcae 100644 --- a/debian/control +++ b/debian/control @@ -26,4 +26,4 @@ Depends: adduser, Conflicts: python3-gps303 Replaces: python3-gps303 Description: Suite of modules to collect reports from xz303 GPS trackers - Consists of collector, storagae, lookaside, and termconfig + Consists of collector, storagae, rectifier, and termconfig diff --git a/debian/lintian-overrides b/debian/lintian-overrides index b14c41e..d9790ee 100644 --- a/debian/lintian-overrides +++ b/debian/lintian-overrides @@ -1,4 +1,4 @@ python3-loctrkd: systemd-service-file-refers-to-unusual-wantedby-target loctrkd.target [lib/systemd/system/loctrkd.collector.service] -python3-loctrkd: systemd-service-file-refers-to-unusual-wantedby-target loctrkd.target [lib/systemd/system/loctrkd.lookaside.service] +python3-loctrkd: systemd-service-file-refers-to-unusual-wantedby-target loctrkd.target [lib/systemd/system/loctrkd.rectifier.service] python3-loctrkd: systemd-service-file-refers-to-unusual-wantedby-target loctrkd.target [lib/systemd/system/loctrkd.storage.service] python3-loctrkd: systemd-service-file-refers-to-unusual-wantedby-target loctrkd.target [lib/systemd/system/loctrkd.termconfig.service] diff --git a/debian/loctrkd.conf b/debian/loctrkd.conf index d22214d..9f45a08 100644 --- a/debian/loctrkd.conf +++ b/debian/loctrkd.conf @@ -14,7 +14,7 @@ htmlfile = /var/lib/loctrkd/index.html [storage] dbfn = /var/lib/loctrkd/trkloc.sqlite -[lookaside] +[rectifier] # "opencellid" and "googlemaps" can be here. Both require an access token, # though googlemaps is only online, while opencellid backend looks up a # local database, that can be updated once a week or once a month. diff --git a/debian/loctrkd.default b/debian/loctrkd.default index 7b91fc7..15884b2 100644 --- a/debian/loctrkd.default +++ b/debian/loctrkd.default @@ -1,5 +1,5 @@ # Environment for loctrkd suite # Common command-line option for all daemons #OPTIONS="-c /etc/loctrkd.conf -d" -# Which lookaside service to use: opencellid or googleloc +# Which rectifier service to use: opencellid or googleloc LOOKASIDE=opencellid diff --git a/debian/loctrkd.lookaside.service b/debian/loctrkd.rectifier.service similarity index 84% rename from debian/loctrkd.lookaside.service rename to debian/loctrkd.rectifier.service index 0be3186..fe87874 100644 --- a/debian/loctrkd.lookaside.service +++ b/debian/loctrkd.rectifier.service @@ -5,7 +5,7 @@ PartOf=loctrkd.target [Service] Type=simple EnvironmentFile=-/etc/default/loctrkd -ExecStart=python3 -m loctrkd.lookaside $OPTIONS +ExecStart=python3 -m loctrkd.rectifier $OPTIONS KillSignal=INT Restart=on-failure StandardOutput=journal diff --git a/debian/loctrkd.target b/debian/loctrkd.target index 50b71c0..dc27380 100644 --- a/debian/loctrkd.target +++ b/debian/loctrkd.target @@ -3,12 +3,12 @@ Description=GPS303 support suite Requires=loctrkd.collector.service \ loctrkd.storage.service \ loctrkd.termconfig.service \ - loctrkd.lookaside.service \ + loctrkd.rectifier.service \ loctrkd.wsgateway.service After=loctrkd.collector.service \ loctrkd.storage.service \ loctrkd.termconfig.service \ - loctrkd.lookaside.service \ + loctrkd.rectifier.service \ loctrkd.wsgateway.service [Install] diff --git a/debian/rules b/debian/rules index b35833a..3b60f58 100755 --- a/debian/rules +++ b/debian/rules @@ -12,7 +12,7 @@ override_dh_installsystemd: dh_installsystemd --name=loctrkd dh_installsystemd --name=loctrkd.collector dh_installsystemd --name=loctrkd.storage - dh_installsystemd --name=loctrkd.lookaside + dh_installsystemd --name=loctrkd.rectifier dh_installsystemd --name=loctrkd.termconfig dh_installsystemd --name=loctrkd.wsgateway dh_installsystemd --name=loctrkd.ocid-dload diff --git a/loctrkd/lookaside.py b/loctrkd/rectifier.py similarity index 95% rename from loctrkd/lookaside.py rename to loctrkd/rectifier.py index 31c3105..5ef6d35 100644 --- a/loctrkd/lookaside.py +++ b/loctrkd/rectifier.py @@ -12,11 +12,11 @@ from . import common from .zx303proto import parse_message, proto_name, WIFI_POSITIONING from .zmsg import Bcast, Resp, topic -log = getLogger("loctrkd/lookaside") +log = getLogger("loctrkd/rectifier") def runserver(conf: ConfigParser) -> None: - qry = import_module("." + conf.get("lookaside", "backend"), __package__) + qry = import_module("." + conf.get("rectifier", "backend"), __package__) qry.init(conf) # Is this https://github.com/zeromq/pyzmq/issues/1627 still not fixed?! zctx = zmq.Context() # type: ignore diff --git a/test/common.py b/test/common.py index df43023..761ea67 100644 --- a/test/common.py +++ b/test/common.py @@ -52,7 +52,7 @@ class TestWithServers(TestCase): "dbfn": self.tmpfilebase + ".opencellid.sqlite", "downloadurl": f"http://localhost:{freeports[2]}/test/262.csv.gz", } - self.conf["lookaside"] = { + self.conf["rectifier"] = { "backend": "opencellid", } self.conf["wsgateway"] = { diff --git a/test/test_storage.py b/test/test_storage.py index 4737f52..88dea4f 100644 --- a/test/test_storage.py +++ b/test/test_storage.py @@ -14,7 +14,7 @@ from loctrkd.ocid_dload import SCHEMA class Storage(TestWithServers): def setUp(self, *args: str, **kwargs: Any) -> None: super().setUp( - "collector", "storage", "lookaside", "termconfig", verbose=True + "collector", "storage", "rectifier", "termconfig", verbose=True ) with connect(self.conf.get("opencellid", "dbfn")) as ldb: ldb.execute(SCHEMA) -- 2.43.0