Skip to content

Commit

Permalink
Restructure file folders
Browse files Browse the repository at this point in the history
  • Loading branch information
pmdartus committed Dec 20, 2014
1 parent 47bb310 commit 3651348
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 22 deletions.
1 change: 1 addition & 0 deletions libs/server/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__author__ = 'pmdartus'
5 changes: 3 additions & 2 deletions libs/nanocube.py → libs/server/nanocube.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import sys
from node import Node
from timeserietable import TimeSerieTable

from libs.server.node import Node
from libs.server.timeserietable import TimeSerieTable


class NanoCube(object):
Expand Down
File renamed without changes.
2 changes: 0 additions & 2 deletions libs/querybuilder.py → libs/server/querybuilder.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from timeserietable import TimeSerieTable

class QueryBuilder(object):
def __init__(self, cube, **kwargs):
super(QueryBuilder, self).__init__()
Expand Down
8 changes: 5 additions & 3 deletions libs/serializer.py → libs/server/serializer.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import io
import re
from nanocube import NanoCube
from node import Node
from timeserietable import TimeSerieTable

from libs.server.nanocube import NanoCube
from libs.server.node import Node
from libs.server.timeserietable import TimeSerieTable


def dumps(cube):
Expand Down Expand Up @@ -104,6 +105,7 @@ def _dump_cube(cube, stream):


def _dump_nodes(node, stream):

if not isinstance(node, TimeSerieTable):
for key in node.proper_children:
_dump_nodes(node.proper_children[key], stream)
Expand Down
10 changes: 6 additions & 4 deletions libs/server.py → libs/server/server.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import argparse
import zmq
import yaml
import datetime
import csv
import serializer as Serializer
from threading import Thread
from nanocube import NanoCube

import zmq
import yaml

import libs.server.serializer as Serializer
from libs.server.nanocube import NanoCube


class ServerManager(object):
Expand Down
File renamed without changes.
4 changes: 3 additions & 1 deletion test/helpers.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import csv
import datetime
import os
from libs.nanocube import NanoCube

from server.nanocube import NanoCube


samples = dict(
simple=dict(
Expand Down
8 changes: 5 additions & 3 deletions test/test_nanocube.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from nose.tools import assert_equals, assert_is_instance, assert_not_equals, assert_is_none
from datetime import datetime
from copy import copy
from libs.timeserietable import TimeSerieTable
from libs.nanocube import NanoCube

from nose.tools import assert_equals, assert_is_instance, assert_is_none

from libs.server.timeserietable import TimeSerieTable
from libs.server.nanocube import NanoCube


class TestNanoCube:
Expand Down
4 changes: 3 additions & 1 deletion test/test_querybuilder.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from datetime import datetime

from nose.tools import ok_, eq_

from helpers import mock_cube
from libs.querybuilder import QueryBuilder
from server.querybuilder import QueryBuilder


class TestQueryBuilder:
Expand Down
6 changes: 4 additions & 2 deletions test/test_serializer.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import os
from datetime import datetime

from nose.tools import eq_

from helpers import mock_cube
from libs.querybuilder import QueryBuilder
import libs.serializer as serializer
from libs.server.querybuilder import QueryBuilder
import libs.server.serializer as serializer


class TestSerializer:
Expand Down
4 changes: 0 additions & 4 deletions test/test_timeserietable.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
from datetime import datetime
from nose.tools import assert_equals
from libs.timeserietable import TimeSerieTable

'''
class TestTimeSerieTable(object):
def mock_time(self, hour, min, sec):
Expand Down

0 comments on commit 3651348

Please sign in to comment.