Skip to content

Commit

Permalink
Merge pull request #12 from matheuswhite/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
matheuswhite authored Jun 12, 2019
2 parents 3ddb05f + 3d93045 commit 10952b7
Show file tree
Hide file tree
Showing 72 changed files with 233 additions and 182 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ tests/.cache/*
.bluebees/node/*
.bluebees/app/*
.bluebees/net/*
bluebees.egg-info/*
build/*
dist/*
File renamed without changes.
10 changes: 5 additions & 5 deletions bluebees.py → bluebees/__main__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import click
from client.core.core import core
from client.network.network import net
from client.application.application import app
from client.node.node import node
from client.device.device import device
from bluebees.client.core.core import core
from bluebees.client.network.network import net
from bluebees.client.application.application import app
from bluebees.client.node.node import node
from bluebees.client.device.device import device


@click.group()
Expand Down
Empty file added bluebees/client/__init__.py
Empty file.
Empty file.
15 changes: 15 additions & 0 deletions bluebees/client/application/application.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import click
from bluebees.client.application.commands.new import new
from bluebees.client.application.commands.info import info
from bluebees.client.application.commands.list import list


@click.group()
def app():
'''Mesh application feature'''
pass


app.add_command(new)
app.add_command(info)
app.add_command(list)
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from dataclasses import dataclass
from common.serializable import Serializable
from bluebees.common.serializable import Serializable
from typing import List
from client.data_paths import base_dir, app_dir
from common.file import file_helper
from bluebees.client.data_paths import base_dir, app_dir
from bluebees.common.file import file_helper


@dataclass
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import click
from client.application.application_data import ApplicationData, app_name_list
from client.data_paths import base_dir, app_dir
from bluebees.client.application.application_data import ApplicationData, app_name_list
from bluebees.client.data_paths import base_dir, app_dir


def validate_name(ctx, param, value):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import click
from client.application.application_data import app_name_list
from bluebees.client.application.application_data import app_name_list


@click.command()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from Crypto.Random import get_random_bytes
from client.application.application_data import ApplicationData, \
from bluebees.client.application.application_data import ApplicationData, \
app_name_list, app_key_list, \
app_key_index_list
from client.network.network_data import NetworkData, net_name_list
from client.data_paths import base_dir, net_dir
from common.file import file_helper
from common.template import template_helper
from common.utils import check_hex_string
from bluebees.client.network.network_data import NetworkData, net_name_list
from bluebees.client.data_paths import base_dir, net_dir
from bluebees.common.file import file_helper
from bluebees.common.template import template_helper
from bluebees.common.utils import check_hex_string
from random import randint
import click

Expand Down
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import click
import warnings
import asyncio
from client.core.dongle import Dongle
from common.broker import Broker
from bluebees.client.core.dongle import Dongle
from bluebees.common.broker import Broker
from serial import SerialException


Expand Down
2 changes: 1 addition & 1 deletion client/core/core.py → bluebees/client/core/core.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import click
from client.core.commands.run import run
from bluebees.client.core.commands.run import run


@click.group()
Expand Down
4 changes: 2 additions & 2 deletions client/core/dongle.py → bluebees/client/core/dongle.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import base64 as b64
from asyncserial import Serial
from dataclasses import dataclass
from common.client import Client
from common.logging import log_sys, INFO, DEBUG
from bluebees.common.client import Client
from bluebees.common.logging import log_sys, INFO, DEBUG


@dataclass
Expand Down
File renamed without changes.
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import click
import asyncio
from client.device.list_devices import ListDevices
from bluebees.client.device.list_devices import ListDevices


@click.command()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import click
from client.device.commands.list import list
from bluebees.client.device.commands.list import list


@click.group()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from common.client import Client
from common.logging import log_sys, INFO, DEBUG
from bluebees.common.client import Client
from bluebees.common.logging import log_sys, INFO, DEBUG


class ListDevices(Client):
Expand Down
Empty file.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from client.mesh_layers.transport_layer import TransportLayer, AckTimeout
from client.mesh_layers.mesh_context import SoftContext
from client.mesh_layers.address import address_type, UNICAST_ADDRESS, \
from bluebees.client.mesh_layers.transport_layer import TransportLayer, AckTimeout
from bluebees.client.mesh_layers.mesh_context import SoftContext
from bluebees.client.mesh_layers.address import address_type, UNICAST_ADDRESS, \
UNASSIGNED_ADDRESS
from client.mesh_layers.access_layer import check_opcode, check_parameters, \
from bluebees.client.mesh_layers.access_layer import check_opcode, check_parameters, \
OpcodeLengthError, \
OpcodeBadFormat, OpcodeReserved, \
ParametersLengthError, opcode_len
from common.logging import log_sys, INFO, DEBUG
from common.client import Client
from bluebees.common.logging import log_sys, INFO, DEBUG
from bluebees.common.client import Client
import asyncio
import traceback

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from client.mesh_layers.mesh_context import HardContext, SoftContext
from client.network.network_data import NetworkData
from client.node.node_data import NodeData
from client.data_paths import base_dir, net_dir, node_dir
from common.logging import log_sys, INFO, DEBUG
from common.crypto import crypto
from common.file import file_helper
from bluebees.client.mesh_layers.mesh_context import HardContext, SoftContext
from bluebees.client.network.network_data import NetworkData
from bluebees.client.node.node_data import NodeData
from bluebees.client.data_paths import base_dir, net_dir, node_dir
from bluebees.common.logging import log_sys, INFO, DEBUG
from bluebees.common.crypto import crypto
from bluebees.common.file import file_helper
import asyncio


Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
from client.mesh_layers.network_layer import NetworkLayer
from client.mesh_layers.mesh_context import SoftContext
from client.network.network_data import NetworkData
from client.application.application_data import ApplicationData
from client.node.node_data import NodeData
from client.data_paths import base_dir, net_dir, app_dir, node_dir
from common.logging import log_sys, INFO, DEBUG
from client.mesh_layers.address import address_type, UNICAST_ADDRESS, \
from bluebees.client.mesh_layers.network_layer import NetworkLayer
from bluebees.client.mesh_layers.mesh_context import SoftContext
from bluebees.client.network.network_data import NetworkData
from bluebees.client.application.application_data import ApplicationData
from bluebees.client.node.node_data import NodeData
from bluebees.client.data_paths import base_dir, net_dir, app_dir, node_dir
from bluebees.common.logging import log_sys, INFO, DEBUG
from bluebees.client.mesh_layers.address import address_type, UNICAST_ADDRESS, \
GROUP_ADDRESS
from client.node.group_data import find_group_by_addr
from common.crypto import crypto
from common.file import file_helper
from bluebees.client.node.group_data import find_group_by_addr
from bluebees.common.crypto import crypto
from bluebees.common.file import file_helper
from typing import List
import asyncio

Expand Down
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import click
from client.network.network_data import NetworkData, net_name_list
from client.data_paths import base_dir, net_dir
from bluebees.client.network.network_data import NetworkData, net_name_list
from bluebees.client.data_paths import base_dir, net_dir


def validate_name(ctx, param, value):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import click
from client.network.network_data import net_name_list
from bluebees.client.network.network_data import net_name_list


@click.command()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from Crypto.Random import get_random_bytes
from client.network.network_data import NetworkData, net_name_list, \
from bluebees.client.network.network_data import NetworkData, net_name_list, \
net_key_list, net_key_index_list
from common.file import file_helper
from common.template import template_helper
from common.utils import check_hex_string
from bluebees.common.file import file_helper
from bluebees.common.template import template_helper
from bluebees.common.utils import check_hex_string
from random import randint
import click

Expand Down
15 changes: 15 additions & 0 deletions bluebees/client/network/network.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import click
from bluebees.client.network.commands.new import new
from bluebees.client.network.commands.info import info
from bluebees.client.network.commands.list import list


@click.group()
def net():
'''Mesh network feature'''
pass


net.add_command(new)
net.add_command(info)
net.add_command(list)
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from dataclasses import dataclass
from common.serializable import Serializable
from bluebees.common.serializable import Serializable
from typing import List
from client.data_paths import base_dir, net_dir
from common.file import file_helper
from bluebees.client.data_paths import base_dir, net_dir
from bluebees.common.file import file_helper


@dataclass
Expand Down
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from client.node.node_data import NodeData, node_name_list
from client.application.application_data import ApplicationData, app_name_list
from client.network.network_data import NetworkData
from client.data_paths import base_dir, node_dir, app_dir, net_dir
from client.mesh_layers.mesh_context import SoftContext
from client.mesh_layers.element import Element
from common.utils import run_seq
from bluebees.client.node.node_data import NodeData, node_name_list
from bluebees.client.application.application_data import ApplicationData, app_name_list
from bluebees.client.network.network_data import NetworkData
from bluebees.client.data_paths import base_dir, node_dir, app_dir, net_dir
from bluebees.client.mesh_layers.mesh_context import SoftContext
from bluebees.client.mesh_layers.element import Element
from bluebees.common.utils import run_seq
import click
import asyncio
import traceback
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from client.node.node_data import node_name_list
from client.application.application_data import ApplicationData, app_name_list
from client.node.node_data import NodeData
from client.network.network_data import NetworkData
from common.file import file_helper
from common.utils import check_hex_string, order, run_seq
from client.data_paths import base_dir, node_dir, app_dir, net_dir
from client.mesh_layers.element import Element
from client.mesh_layers.mesh_context import SoftContext
from client.mesh_layers.access_layer import check_opcode, check_parameters, \
from bluebees.client.node.node_data import node_name_list
from bluebees.client.application.application_data import ApplicationData, app_name_list
from bluebees.client.node.node_data import NodeData
from bluebees.client.network.network_data import NetworkData
from bluebees.common.file import file_helper
from bluebees.common.utils import check_hex_string, order, run_seq
from bluebees.client.data_paths import base_dir, node_dir, app_dir, net_dir
from bluebees.client.mesh_layers.element import Element
from bluebees.client.mesh_layers.mesh_context import SoftContext
from bluebees.client.mesh_layers.access_layer import check_opcode, check_parameters, \
OpcodeLengthError, \
OpcodeBadFormat, OpcodeReserved, \
ParametersLengthError
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import click
from client.node.node_data import NodeData, node_name_list
from client.data_paths import base_dir, node_dir
from bluebees.client.node.node_data import NodeData, node_name_list
from bluebees.client.data_paths import base_dir, node_dir


def validate_name(ctx, param, value):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import click
from client.node.node_data import node_name_list
from bluebees.client.node.node_data import node_name_list


@click.command()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from Crypto.Random import get_random_bytes
from client.node.node_data import NodeData, node_name_list, node_addr_list
from client.network.network_data import NetworkData, net_name_list
from client.data_paths import base_dir, net_dir
from client.node.provisioner import Provisioner, LinkOpenError, \
from bluebees.client.node.node_data import NodeData, node_name_list, node_addr_list
from bluebees.client.network.network_data import NetworkData, net_name_list
from bluebees.client.data_paths import base_dir, net_dir
from bluebees.client.node.provisioner import Provisioner, LinkOpenError, \
ProvisioningSuccess, ProvisioningError
from common.file import file_helper
from common.template import template_helper
from common.utils import check_hex_string
from client.mesh_layers.address import address_type, UNICAST_ADDRESS
from bluebees.common.file import file_helper
from bluebees.common.template import template_helper
from bluebees.common.utils import check_hex_string
from bluebees.client.mesh_layers.address import address_type, UNICAST_ADDRESS
import click
import asyncio

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from client.node.node_data import NodeData, node_name_list
from client.data_paths import base_dir, node_dir
from client.mesh_layers.mesh_context import SoftContext
from client.mesh_layers.element import Element
from common.utils import run_seq
from common.utils import check_hex_string
from bluebees.client.node.node_data import NodeData, node_name_list
from bluebees.client.data_paths import base_dir, node_dir
from bluebees.client.mesh_layers.mesh_context import SoftContext
from bluebees.client.mesh_layers.element import Element
from bluebees.common.utils import run_seq
from bluebees.common.utils import check_hex_string
import click
import asyncio

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from client.node.node_data import NodeData, node_name_list
from client.data_paths import base_dir, node_dir
from client.mesh_layers.mesh_context import SoftContext
from client.mesh_layers.element import Element
from common.utils import check_hex_string
from common.utils import run_seq
from bluebees.client.node.node_data import NodeData, node_name_list
from bluebees.client.data_paths import base_dir, node_dir
from bluebees.client.mesh_layers.mesh_context import SoftContext
from bluebees.client.mesh_layers.element import Element
from bluebees.common.utils import check_hex_string
from bluebees.common.utils import run_seq
import click
import asyncio

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from dataclasses import dataclass
from common.serializable import Serializable
from bluebees.common.serializable import Serializable
from typing import List
from client.data_paths import base_dir, group_dir
from common.file import file_helper
from bluebees.client.data_paths import base_dir, group_dir
from bluebees.common.file import file_helper


@dataclass
Expand Down
Loading

0 comments on commit 10952b7

Please sign in to comment.