Unfortunately the `eddn_gateway()` fixture needs to be `module` scope, and
that means you can't use it with anything that uses a fixture that utilises
`monkeypatch`, because that's `function` scope.
So, back to directly appending to `sys.path`.
* Define our own TRACE logging level ('deeper' than DEBUG).
* Define `.trace()` method to use it.
* `logger.trace(...)` for duplicate or 'sent to Listeners' messages.
NB: mypy is still unhappy about Logger.trace, despite attempting the same
workaround asin EDMC. Hence the ` # type: ignore` on uses.
* `eddn_message()` fixture, set up to return a method when used, such that
*that* can be called with a key to look up the approproiate test message.
* `test_messages` dictionary to support that.
This is Athanasius feeling out how best to add tests to this ancient code.
* Test that eddn.Gateway.parse_and_error_handle() returns the correct error
string for:
- Invalid JSON being passed in.
- An outdated schema being cited.
So, yes, running any of these absolutely directly:
cd src
python eddn/Gateway.py
will fail. But you *can*:
cd src
python -m eddn.Gateway
and they work perfectly fine.
* py_modules parameter to setup() isn't documented in the setuptools
docs, but is in a general 'python packaging' one.
* So now the main scripts are NOT within the `eddn` package..
* But all other code is...
* But the schema files don't need to be.
# Conflicts:
# src/schemas/fssbodysignals-README.md
# src/schemas/fssbodysignals-v1.0.json
# src/schemas/fsssignaldiscovered-README.md
# src/schemas/fsssignaldiscovered-v1.0.json
With `import eddn.core.Validator` and the like it was actually picking
up the egg versions of the files, not local ones.
Currently this will run as per:
cd src/eddn
python Gateway.py --config ~/.local/share/eddn/dev/config.json
# Conflicts:
# src/eddn/schemas/fssbodysignals-README.md
# src/eddn/schemas/fssbodysignals-v1.0.json
# src/eddn/schemas/fsssignaldiscovered-README.md
# src/eddn/schemas/fsssignaldiscovered-v1.0.json
* Move the service scripts out of src/eddn/ into src/
* Move the schemas/ to src/schemas/
* Some updates to setup.py, i.e. source of files, but the setuptools
part isn't yet work.
# Conflicts:
# src/schemas/fssbodysignals-README.md
# src/schemas/fssbodysignals-v1.0.json
# src/schemas/fsssignaldiscovered-README.md
# src/schemas/fsssignaldiscovered-v1.0.json
As we've changed things to default to *not* doing TLS on the actual
services, and thus relying on reverse proxying of all the relevant
end points, this needed updating.
Not yet tested, that will come when I put this on dev.eddn.edcd.io.
It's only the monitor endpoint URL that needed to be configurable.
Anyone using this wholesale for schemas not under eddn.edcd.io gets to
make the necessary hard-coded changes.