969 Commits

Author SHA1 Message Date
Athanasius
7fe2e8880a
Relay: As we're not sending topic from Gateway, take out the sub code
Just subscribe to everything.
2022-08-18 15:18:29 +01:00
Athanasius
529725d2db
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-08-18 15:18:29 +01:00
Athanasius
cc19d390ce
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-08-18 15:18:29 +01:00
Athanasius
f7370a2f0b
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-08-18 15:18:29 +01:00
Athanasius
fdee2c054f
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-08-18 15:18:28 +01:00
Athanasius
257d3e880a
setup.py: Don't cite module versions, let requirements.txt do that 2022-08-18 15:18:28 +01:00
Athanasius
998be94c5d
setup.py: General python3, flake8, mypy 2022-08-18 15:18:28 +01:00
Athanasius
bd5784034a
Validator: Full flake8 and mypy pass 2022-08-18 15:18:28 +01:00
Athanasius
b5df9439ad
requirements: strict_rfc3339 was unused 2022-08-18 15:18:28 +01:00
Athanasius
e6529060e2
StatsCollector: Full flake8 and mypy pass
A function name refactor touches other files.
2022-08-18 15:18:27 +01:00
Athanasius
e6b81a2a3f
DuplicateMessages: Full flake8 and mypy pass 2022-08-18 15:18:27 +01:00
Athanasius
ee7ac90996
DuplicateMessages: Refactor isDuplicated() name to snake_case 2022-08-18 15:18:27 +01:00
Athanasius
01b5ccf7ac
DuplicateMessages: Very initial flake8 pass 2022-08-18 15:18:27 +01:00
Athanasius
e9b4afcdf6
Use that bottle Plugin.apply() signature throughout
# Conflicts:
#	src/eddn/Gateway.py
2022-08-18 15:18:24 +01:00
Athanasius
a05e1d3d2c
.flake8: Comment out min-coverage-percents
I figured out the bottle Plugin.apply() thing.

Leaving as a comment for reference.
2022-08-18 15:18:01 +01:00
Athanasius
485055357b
Bouncer: Trying out 'Callable' for bottle plugin.apply() type annotation 2022-08-18 15:18:01 +01:00
Athanasius
1f420a8f3e
Bouncer: Full flake8 and mypy pass 2022-08-18 15:18:00 +01:00
Athanasius
a44b6286b2
.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-08-18 15:18:00 +01:00
Athanasius
fcfe9e01b2
Settings.loadConfig() got renamed to load_config() 2022-08-18 15:18:00 +01:00
Athanasius
8fb722f6c5
Settings: flake8 and mypy passes
Yes, we want to keep the extra-spaces formatting, but that means
noqa'ing E221.
2022-08-18 15:18:00 +01:00
Athanasius
dd7e12fa28
Version: Bump to 2.0-alph0 for this python3 work 2022-08-18 15:18:00 +01:00
Athanasius
3b5d16c674
Relay: Full flake8/mypy pass 2022-08-18 15:17:59 +01:00
Athanasius
06e9442bea
Monitor: Make EnableCors.apply() static 2022-08-18 15:17:59 +01:00
Athanasius
07e332ff61
Monitor: types pass 2022-08-18 15:17:59 +01:00
Athanasius
33a09ef8b5
Monitor: docstring'd 2022-08-18 15:17:59 +01:00
Athanasius
b37307e6a2
Monitor: Initial flake8 pass 2022-08-18 15:17:58 +01:00
Athanasius
3b3e1a91c5
Gateway: Make the CORS apply() static
Quietens a PyCharm warning
2022-08-18 15:17:58 +01:00
Athanasius
99679d9d5b
Gateway: Minor renames to make PyCharm not gripe
These are related to local variables shadowing globals.
2022-08-18 15:17:58 +01:00
Athanasius
c11fa91162
Gateway: typing: main() 2022-08-18 15:17:58 +01:00
Athanasius
179dd8aebf
Gateway: typing: stats() 2022-08-18 15:17:58 +01:00
Athanasius
8825526a1c
Gateway: typing: health_check() 2022-08-18 15:17:57 +01:00
Athanasius
5939e7c889
Gateway: typing: upload() 2022-08-18 15:17:57 +01:00
Athanasius
9be3cd82d8
Gateway: typing: parse_and_error_handle() 2022-08-18 15:17:57 +01:00
Athanasius
35b90de06d
Gateway: typing: get_decompressed_message()
# Conflicts:
#	src/eddn/Gateway.py
2022-08-18 15:17:54 +01:00
Athanasius
74de8a07ee
Gateway: Start adding types/checking
# Conflicts:
#	src/eddn/Gateway.py
2022-08-18 15:17:29 +01:00
Athanasius
dbb3e7ce7d
requirements-dev: types-pkg_resources 2022-08-18 15:16:58 +01:00
Athanasius
a062d07799
requirements-dev: types-simplejson 2022-08-18 15:16:58 +01:00
Athanasius
24c80c3132
Gateway: misc formatting pass 2022-08-18 14:45:00 +01:00
Athanasius
785378a9bc
Gateway: % -> f-string pass 2022-08-18 14:45:00 +01:00
Athanasius
048e908e09
Gateway: docstring pass 2022-08-18 14:45:00 +01:00
Athanasius
3b4fde42db
Gateway: snake_case variables 2022-08-18 14:44:59 +01:00
Athanasius
123769f8d4
Gateway: More import fixup 2022-08-18 14:44:59 +01:00
Athanasius
bf432a9708
Gateway: Remove un-used bottle imports 2022-08-18 14:44:59 +01:00
Athanasius
13765c70d5
monitor/eddn.js: PyCharm code cleanup 2022-08-18 14:44:59 +01:00
Athanasius
b127c63887
Gateway: Proper import order 2022-08-18 14:44:49 +01:00
Athanasius
ca3417c9c0
Gateway: Better top-level docstring 2022-08-18 14:43:16 +01:00
Athanasius
fea561920a
.pre-commit: No need for LANG section 2022-08-18 14:43:15 +01:00
Athanasius
b93ee82c5f
requirements: Updated for python 3.9.7 2022-08-18 14:43:15 +01:00
Athanasius
15e385287a
Initial setup for proper development with linting etc 2022-08-18 14:43:01 +01:00
Athanasius
930632b0e9
README: Change Discord URL to channel-specific one. 2022-07-26 12:43:40 +01:00