Skip to content

Commit a3cdd6b

Browse files
committed
better messaging
1 parent eaaccb1 commit a3cdd6b

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed

proj/environment/manager.py

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,11 @@ def conclude(self):
157157

158158
# Upload results to dropbox
159159
if self.winstor:
160-
self._upload_to_dropbox()
160+
logging.info("Uploading to dropbox")
161+
try:
162+
self._upload_to_dropbox()
163+
except Exception as e:
164+
logging.error(f"Failed to upload to dropbox: {e}")
161165

162166
logging.info("Sending slack message")
163167
send_slack_message(
@@ -173,13 +177,14 @@ def conclude(self):
173177
logging.info("Did not upload to dropbox")
174178

175179
def failed(self):
176-
logging.info("Sending slack message")
177-
send_slack_message(
178-
f"""
179-
\n
180-
Failed simulation simulation
181-
Start time: {self.simstart}
182-
End time: {timestamp()}
183-
Data folder: {self.datafolder}
184-
"""
185-
)
180+
logging.info("Sending slack FAILED message")
181+
if self.winstor:
182+
send_slack_message(
183+
f"""
184+
\n
185+
Failed simulation simulation
186+
Start time: {self.simstart}
187+
End time: {timestamp()}
188+
Data folder: {self.datafolder}
189+
"""
190+
)

proj/model/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class Config:
2626
# ------------------------------- Mouse params ------------------------------- #
2727
# ? works
2828
mouse = dict(
29+
mouse_type="working",
2930
L=1.5, # half body width | cm
3031
R=1, # radius of wheels | cm
3132
d=0.1, # distance between axel and CoM | cm
@@ -36,6 +37,7 @@ class Config:
3637

3738
# ? more realistic
3839
# mouse = dict(
40+
# mouse_type = 'realistic',
3941
# L=2, # half body width | cm
4042
# R=2, # radius of wheels | cm
4143
# d=3, # distance between axel and CoM | cm

run_allocentric.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# ModelPolar,
88
)
99

10+
1011
# from proj.plotting.trajectories import plot_trajectory
1112

1213

0 commit comments

Comments
 (0)