Skip to content

Commit a14dcb5

Browse files
committed
update import statements for external usage
1 parent d83a702 commit a14dcb5

6 files changed

+15
-15
lines changed

lib/CBBA.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import copy
55
import matplotlib.pyplot as plt
66
import numpy as np
7-
from lib.Task import Task
8-
from lib.WorldInfo import WorldInfo
7+
from Task import Task
8+
from WorldInfo import WorldInfo
99

1010

1111
class CBBA(object):

lib/HelperLibrary.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env python3
22
import random
33
import numpy as np
4-
from lib.Agent import Agent
5-
from lib.Task import Task
6-
from lib.WorldInfo import WorldInfo
4+
from Agent import Agent
5+
from Task import Task
6+
from WorldInfo import WorldInfo
77

88

99
def create_agents_and_tasks(num_agents: int, num_tasks: int, WorldInfoInput: WorldInfo, config_data):

test/pathmagic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class context:
77
def __enter__(self):
88
# append the main directory of CBBA-Python to sys.path
99
# assume the working directory is always the main directory of CBBA-Python
10-
sys.path.append(os.getcwd())
10+
sys.path.append(os.getcwd() + "/lib")
1111
print(os.getcwd())
1212

1313
def __exit__(self, *args):

test/run_cbba_example_01.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
import matplotlib.pyplot as plt
55
import pathmagic
66
with pathmagic.context():
7-
from lib.CBBA import CBBA
8-
from lib.WorldInfo import WorldInfo
9-
import lib.HelperLibrary as HelperLibrary
7+
from CBBA import CBBA
8+
from WorldInfo import WorldInfo
9+
import HelperLibrary as HelperLibrary
1010

1111

1212
if __name__ == "__main__":

test/run_cbba_example_02.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
import matplotlib.pyplot as plt
55
import pathmagic
66
with pathmagic.context():
7-
from lib.CBBA import CBBA
8-
from lib.WorldInfo import WorldInfo
9-
import lib.HelperLibrary as HelperLibrary
7+
from CBBA import CBBA
8+
from WorldInfo import WorldInfo
9+
import HelperLibrary as HelperLibrary
1010

1111

1212
if __name__ == "__main__":

test/run_cbba_example_03.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
import matplotlib.pyplot as plt
55
import pathmagic
66
with pathmagic.context():
7-
from lib.CBBA import CBBA
8-
from lib.WorldInfo import WorldInfo
9-
import lib.HelperLibrary as HelperLibrary
7+
from CBBA import CBBA
8+
from WorldInfo import WorldInfo
9+
import HelperLibrary as HelperLibrary
1010

1111

1212
if __name__ == "__main__":

0 commit comments

Comments
 (0)