884 Commits

Author SHA1 Message Date
Athanasius
7eb55898db python: Use version 3.9.8 2022-03-12 11:00:50 +00:00
Athanasius
d9d3bc0de4 github: Add pr-checks workflow
* flake8 checks
2022-03-12 11:00:50 +00:00
Athanasius
d65b715222 github: Add dependabot config 2022-03-12 11:00:50 +00:00
Athanasius
ef84dc0579 flake8: minor cleanups 2022-03-12 11:00:50 +00:00
Athanasius
5bc06ccdc5 Relay: As we're not sending topic from Gateway, take out the sub code
Just subscribe to everything.
2022-03-12 11:00:50 +00:00
Athanasius
be254e7594 Gateway -> Monitor now working
We literally weren't making use of the 'topic' in the message. Thus, so
as to avoid issues with trying to mash a string topic together with a
bytes (compressed) message, I've ripped that out.
2022-03-12 11:00:50 +00:00
Athanasius
8bbf4f5eb8 Monitor: python3 tweaks
* setsockopt_string()
* Trying to see what's up with:

Traceback (most recent call last):
  File "src/gevent/greenlet.py", line 906, in gevent._gevent_cgreenlet.Greenlet.run
  File "/home/eddn/dev/python3.9-venv/lib/python3.9/site-packages/eddn-2.0a0.dev0-py3.9.egg/eddn/Monitor.py", line 203, in monitor_worker
    message_text = zlib.decompress(message)
zlib.error: Error -3 while decompressing data: incorrect header check
2021-11-04T18:25:03Z <Greenlet at 0x7f71dbecf150: monitor_worker(b'\'https://eddn.edcd.io/schemas/journal/1\' |-| b)> failed with error
2022-03-12 11:00:50 +00:00
Athanasius
7328a4183b Monitor: *Maybe* working now?
It doesn't crash, including when the gateway successfully receives a
message, but unclear if those messages are then making it to the Monitor
OK.
2022-03-12 11:00:50 +00:00
Athanasius
14cd5d1b35 python3: Gateway now working
Now I'm actually trying to run the code I'm finding more that needs
changing in order to run under python3
2022-03-12 11:00:50 +00:00
Athanasius
25eea854ad setup.py: Don't cite module versions, let requirements.txt do that 2022-03-12 11:00:50 +00:00
Athanasius
0641bf3f24 setup.py: General python3, flake8, mypy 2022-03-12 11:00:46 +00:00
Athanasius
3df5c52d53 Validator: Full flake8 and mypy pass 2022-03-12 10:59:55 +00:00
Athanasius
6ca78a51df requirements: strict_rfc3339 was unused 2022-03-12 10:59:55 +00:00
Athanasius
693ad95fb3 StatsCollector: Full flake8 and mypy pass
A function name refactor touches other files.
2022-03-12 10:59:55 +00:00
Athanasius
f81fdf91ee DuplicateMessages: Full flake8 and mypy pass 2022-03-12 10:59:55 +00:00
Athanasius
2d896ce37f DuplicateMessages: Refactor isDuplicated() name to snake_case 2022-03-12 10:59:55 +00:00
Athanasius
fb67f960be DuplicateMessages: Very initial flake8 pass 2022-03-12 10:59:55 +00:00
Athanasius
c99d572adc Use that bottle Plugin.apply() signature throughout 2022-03-12 10:59:55 +00:00
Athanasius
a14b32631c .flake8: Comment out min-coverage-percents
I figured out the bottle Plugin.apply() thing.

Leaving as a comment for reference.
2022-03-12 10:59:55 +00:00
Athanasius
031e4c9a70 Bouncer: Trying out 'Callable' for bottle plugin.apply() type annotation 2022-03-12 10:59:55 +00:00
Athanasius
86313dba28 Bouncer: Full flake8 and mypy pass 2022-03-12 10:59:52 +00:00
Athanasius
52316d4b62 .flake8: Drop the type annotations minimum to 50%
Mostly I'm having trouble finding what else I *could* add types to in
Bouncer.py.  I think it's the bottle plugin classes' (EnableCors and
CustomLogging) functions.
2022-03-12 10:58:45 +00:00
Athanasius
e5fe4da978 Settings.loadConfig() got renamed to load_config() 2022-03-12 10:58:42 +00:00
Athanasius
be6fe8b419 Settings: flake8 and mypy passes
Yes, we want to keep the extra-spaces formatting, but that means
noqa'ing E221.
2022-03-12 10:56:39 +00:00
Athanasius
03c7f6c96b Version: Bump to 2.0-alph0 for this python3 work 2022-03-12 10:55:00 +00:00
Athanasius
b876fec22c Relay: Full flake8/mypy pass 2022-03-12 10:54:57 +00:00
Athanasius
1c245735fd Monitor: Make EnableCors.apply() static 2022-03-12 10:52:25 +00:00
Athanasius
0400854390 Monitor: types pass 2022-03-12 10:52:22 +00:00
Athanasius
c0af9b1a97 Monitor: docstring'd 2022-03-12 10:51:56 +00:00
Athanasius
5cb2dbed92 Monitor: Initial flake8 pass 2022-03-12 10:51:17 +00:00
Athanasius
fee5279c12 Gateway: Make the CORS apply() static
Quietens a PyCharm warning
2022-03-12 10:49:53 +00:00
Athanasius
dcce3bdc86 Gateway: Minor renames to make PyCharm not gripe
These are related to local variables shadowing globals.
2022-03-12 10:49:53 +00:00
Athanasius
18d4f13139 Gateway: typing: main() 2022-03-12 10:49:53 +00:00
Athanasius
db7dcb489f Gateway: typing: stats() 2022-03-12 10:49:53 +00:00
Athanasius
820abea797 Gateway: typing: health_check() 2022-03-12 10:49:53 +00:00
Athanasius
d0f2d6a5bc Gateway: typing: upload() 2022-03-12 10:49:51 +00:00
Athanasius
d327dea943 Gateway: typing: parse_and_error_handle() 2022-03-12 10:49:10 +00:00
Athanasius
2e64ac2e9b Gateway: typing: get_decompressed_message() 2022-03-12 10:49:10 +00:00
Athanasius
2a2017ed51 Gateway: Start adding types/checking 2022-03-12 10:49:08 +00:00
Athanasius
a41650865b requirements-dev: types-pkg_resources 2022-03-12 10:47:34 +00:00
Athanasius
08897785b9 requirements-dev: types-simplejson 2022-03-12 10:47:33 +00:00
Athanasius
e3b4148eba Gateway: parse_qs is in urllib.parse now 2022-03-12 10:47:33 +00:00
Athanasius
daa1ae0ac1 Gateway: misc formatting pass 2022-03-12 10:47:33 +00:00
Athanasius
14a857a416 Gateway: % -> f-string pass 2022-03-12 10:47:31 +00:00
Athanasius
b0a5122b8c Gateway: docstring pass 2022-03-12 10:42:48 +00:00
Athanasius
96975df9fa Gateway: snake_case variables 2022-03-12 10:41:58 +00:00
Athanasius
22a5aa8db0 Gateway: More import fixup 2022-03-12 10:40:05 +00:00
Athanasius
46dec75082 Gateway: Remove un-used bottle imports 2022-03-12 10:39:27 +00:00
Athanasius
9b7d531641 monitor/eddn.js: PyCharm code cleanup 2022-03-12 10:38:49 +00:00
Athanasius
3f4ce7786b Gateway: Proper import order 2022-03-12 10:38:38 +00:00