326 Commits

Author SHA1 Message Date
Athanasius
f8dc28b256
src/eddn/__init__.py: docstring 2022-08-18 15:19:16 +01:00
Athanasius
241bd911dd
Gateway: flake8 and mypy pass
# Conflicts:
#	src/eddn/Gateway.py
2022-08-18 15:19:14 +01:00
Athanasius
a8d0806446
Bouncer: flake8 pass 2022-08-18 15:18:54 +01:00
Athanasius
95b48ed3cc
Relay: Tweak for zmq changes 2022-08-18 15:18:53 +01:00
Athanasius
c426885b52
Monitor: Tweak for zmq changes 2022-08-18 15:18:53 +01:00
Athanasius
060645a8dc
Settings: Rename loadFrom -> load_from 2022-08-18 15:18:53 +01:00
Athanasius
3a55f6b005
Gateway: zmq's PUB is *only* in the main module now
But we still need to `import zmq.green as zmq` so use:

```python
from zmq import PUB as ZMQ_PUB
```
2022-08-18 15:18:53 +01:00
Athanasius
e9397b46e2
Settings: Rename loadConfig -> load_config 2022-08-18 15:18:52 +01:00
Athanasius
3dba22b6cb
Gateway: Remove "remember to do the python3 rebase" line 2022-08-18 15:18:52 +01:00
Athanasius
2b39934fd7
'Guard' non-code to ensure this gets updated for bottle size limit etc 2022-08-18 15:18:52 +01:00
Athanasius
5e51c604a4
flake8: minor cleanups
# Conflicts:
#	src/eddn/Gateway.py
2022-08-18 15:18:48 +01:00
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
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
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
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
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
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