Exemplo n.º 1
0
# 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.
]
Exemplo n.º 2
0
# -----------------------------------------------------------------------------
# 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.
]
Exemplo n.º 3
0
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__ = [
Exemplo n.º 4
0
# ----------------------------------------------------------------------------
# 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)
Exemplo n.º 5
0
# 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.
]
Exemplo n.º 6
0
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.
]
Exemplo n.º 7
0
                    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.
]
Exemplo n.º 8
0
# -----------------------------------------------------------------------------


# ------------------------------
# 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.
]
Exemplo n.º 9
0
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.
]
Exemplo n.º 10
0
# ----------------------------------------------------------------------------
# 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.
]