# Imports # ----------------------------------------------------------------------------- # ------------------------------ # Registries & Registrars # ------------------------------ from veredi.data.registration import codec # ------------------------------ # Registrees # ------------------------------ from .identity import PolicyId # ----------------------------------------------------------------------------- # Registration # ----------------------------------------------------------------------------- codec.register(PolicyId) # ----------------------------------------------------------------------------- # Exports # ----------------------------------------------------------------------------- __all__ = [ # No exports? Just a registration thing. ]
# ----------------------------------------------------------------------------- # Imports # ----------------------------------------------------------------------------- from veredi.data.registration import codec, config # ----------------------------------------------------------------------------- # Imports: Registration # ----------------------------------------------------------------------------- from .identity import ComponentId, EntityId, SystemId from .system import System # ----------------------------------------------------------------------------- # Registration # ----------------------------------------------------------------------------- codec.register(ComponentId) codec.register(EntityId) codec.register(SystemId) config.ignore(System) # ----------------------------------------------------------------------------- # Exports # ----------------------------------------------------------------------------- __all__ = [ # No exports? Just a registration thing. ]
from . import websocket # ----------------------------------------------------------------------------- # Registration # ----------------------------------------------------------------------------- codec.register_enum(MsgType, dotted='veredi.interface.mediator.message.type', name_encode='v.mt', enum_encode_type=codec.enum.FlagEncodeValue) codec.register_enum(Message.SpecialId, dotted='veredi.interface.mediator.message.sid', name_encode='spid', enum_encode_type=codec.enum.FlagEncodeValue) codec.register(Message) codec.register(ConnectionMessage) config.register(MediatorSystem) config.ignore(Mediator) config.ignore(websocket.mediator.WebSocketMediator) config.register(websocket.server.WebSocketServer) config.register(websocket.client.WebSocketClient) # ----------------------------------------------------------------------------- # Exports # ----------------------------------------------------------------------------- __all__ = [
# ---------------------------------------------------------------------------- # Imports: Registration # ---------------------------------------------------------------------------- from .tree import (Node, Leaf, Branch, Dice, Constant, Variable, OperatorMath, OperatorAdd, OperatorSub, OperatorMult, OperatorDiv, OperatorPow) from .parser import D20Parser # ----------------------------------------------------------------------------- # Registration # ----------------------------------------------------------------------------- # Always register. codec.register(Dice) codec.register(Constant) codec.register(Variable) codec.register(OperatorAdd) codec.register(OperatorSub) codec.register(OperatorMult) codec.register(OperatorDiv) codec.register(OperatorPow) # Always ignore. codec.ignore(Node) codec.ignore(Leaf) codec.ignore(Branch) codec.ignore(OperatorMath) config.register(D20Parser)
# Imports: Registration # ----------------------------------------------------------------------------- # Registering/ignoring some base/simple things here so we don't have a inverted # sort of dependency. Base should be... basic stuff. Configuration and # registration is outside its paygrade, really. # ------------------------------ # Registrees # ------------------------------ from veredi.base.paths import safing from veredi.base.identity import MonotonicId, SerializableId # ----------------------------------------------------------------------------- # Registration # ----------------------------------------------------------------------------- config.register(safing.to_human_readable, 'veredi.paths.sanitize.human') config.register(safing.to_hashed, 'veredi.paths.sanitize.hashed.sha256') codec.register(MonotonicId) codec.register(SerializableId) # ----------------------------------------------------------------------------- # Exports # ----------------------------------------------------------------------------- __all__ = [ # No exports? Just a registration thing. ]
from .system import MathSystem # ----------------------------------------------------------------------------- # Registration # ----------------------------------------------------------------------------- # ------------------------------ # EncodableRegistry # ------------------------------ codec.register_enum(NodeType, dotted='veredi.math.parser.type', name_encode='node.type', enum_encode_type=codec.enum.FlagEncodeName) codec.register(MathOutputEvent) codec.ignore(MathTree) # ------------------------------ # ConfigRegistry # ------------------------------ config.register(MathSystem) # ----------------------------------------------------------------------------- # Exports # ----------------------------------------------------------------------------- __all__ = [ # No exports? Just a registration thing. ]
enum_encode_type=codec.enum.FlagEncodeValue) codec.register_enum(LogField, dotted='veredi.interface.mediator.payload.log.field', name_encode='field', enum_encode_type=codec.enum.EnumEncodeName) codec.register_enum(log.Level, dotted='veredi.logs.log.level', name_encode='log.level', enum_encode_type=codec.enum.EnumEncodeName) codec.register_enum(log.Group, dotted='veredi.logs.log.group', name_encode='log.group', enum_encode_type=codec.enum.EnumEncodeName) codec.register(LogReply) codec.register(BarePayload) codec.register(LogPayload) codec.ignore(BasePayload) # ----------------------------------------------------------------------------- # Exports # ----------------------------------------------------------------------------- __all__ = [ # No exports? Just a registration thing. ]
# ----------------------------------------------------------------------------- # ------------------------------ # Registries & Registrars # ------------------------------ from veredi.data.registration import codec # ------------------------------ # Registrees # ------------------------------ from .zest_tree import MockNode # ----------------------------------------------------------------------------- # Registration # ----------------------------------------------------------------------------- # Should be registered if unit-testing, ignored if not. codec.register(MockNode, unit_test_only=True) # ----------------------------------------------------------------------------- # Exports # ----------------------------------------------------------------------------- __all__ = [ # No exports? Just a registration thing. ]
from .event import Recipient, OutputEvent from .envelope import Address, Envelope from .system import OutputSystem # ----------------------------------------------------------------------------- # Registration # ----------------------------------------------------------------------------- codec.register_enum(Recipient, dotted='veredi.interface.output.event.recipient', name_encode='recipient', enum_encode_type=codec.enum.FlagEncodeValue) codec.register(Address) codec.register(Envelope) codec.ignore(OutputEvent) config.register(OutputSystem) # ----------------------------------------------------------------------------- # Exports # ----------------------------------------------------------------------------- __all__ = [ # No exports? Just a registration thing. ]
# ---------------------------------------------------------------------------- # Imports: Registration # ---------------------------------------------------------------------------- from .identity import InputId from .system import InputSystem from .command import commander from .history import history # ----------------------------------------------------------------------------- # Registration # ----------------------------------------------------------------------------- codec.register(InputId) config.register(InputSystem) config.register(commander.Commander) config.register(history.Historian) # ----------------------------------------------------------------------------- # Exports # ----------------------------------------------------------------------------- __all__ = [ # No exports? Just a registration thing. ]