Skip to content

Commit 72817e0

Browse files
committedNov 12, 2017
Change import path to absolute
Signed-off-by: jensenzhang <[email protected]>
1 parent 3f773c7 commit 72817e0

File tree

6 files changed

+13
-9
lines changed

6 files changed

+13
-9
lines changed
 

‎.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,6 @@ ENV/
8888

8989
# Rope project settings
9090
.ropeproject
91+
92+
# IDE / Editor project settings
93+
.vscode

‎bin/nova

100644100755
+2-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ import json
55
from nova.converter import resource_query_transform
66

77
if '__main__' == __name__:
8-
resource_query_transform(json.loads(sys.argv[1]))
8+
# TODO: Error handling
9+
print(json.dumps(resource_query_transform(json.loads(sys.argv[1]))))

‎nova/abstraction.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env python
22

33
from functools import partial
4-
from lputil import paths_to_nzv, is_redundant
5-
from view import Element, View
6-
from mecs import EquivAggregation, EquivDecomposition
4+
from nova.lputil import paths_to_nzv, is_redundant
5+
from nova.view import Element, View
6+
from nova.mecs import EquivAggregation, EquivDecomposition
77

88
class Abstraction(object):
99
def __init__(self, paths, bws):

‎nova/converter.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python3
22

33
import json
4-
from abstraction import MecsNetworkView
4+
from nova.abstraction import MecsNetworkView
55

66
def resource_query_transform(response):
77
response
@@ -33,5 +33,5 @@ def resource_query_transform(response):
3333
[{"flow-id":"2"}]
3434
]
3535
}
36-
print("original:", test_data)
37-
print("rsa:", resource_query_transform(test_data))
36+
print("original:", json.dumps(test_data))
37+
print("rsa:", json.dumps(resource_query_transform(test_data)))

‎nova/mecs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from itertools import groupby
44
from pulp import LpAffineExpression, LpVariable, LpProblem, LpMaximize
5-
from view import Element, View
5+
from nova.view import Element, View
66

77
class EquivTransformation(object):
88
def __init__(self):

‎nova/view.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22

3-
from lputil import paths_to_nzv, Constraint, construct_prob
3+
from nova.lputil import paths_to_nzv, Constraint, construct_prob
44

55
class Element(object):
66
def __init__(self, eid, nzv, bw):

0 commit comments

Comments
 (0)
Please sign in to comment.