Skip to content

Commit 62174e1

Browse files
authored
Merge pull request #1527 from AllenNeuralDynamics/production_testing
[update main] 2025-05-06
2 parents 101b176 + c145074 commit 62174e1

File tree

1 file changed

+57
-1
lines changed

1 file changed

+57
-1
lines changed

src/foraging_gui/Foraging.py

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6185,6 +6185,62 @@ def _Start(self):
61856185
except Exception:
61866186
logging.error(traceback.format_exc())
61876187

6188+
def photometry_workflow_running(self) -> bool or None:
6189+
"""
6190+
If fiber photometery is configured for session, check if work flow is running
6191+
6192+
:returns: boolean indicating if workflow is running or not. If None, fip is not configured
6193+
"""
6194+
6195+
if self.PhotometryB.currentText() == "on" and (
6196+
not self.FIP_started
6197+
):
6198+
reply = QMessageBox.critical(
6199+
self,
6200+
"Box {}, Start".format(self.box_letter),
6201+
'Photometry is set to "on", but the FIP workflow has not been started',
6202+
QMessageBox.Ok,
6203+
)
6204+
6205+
logging.info(
6206+
"Cannot start session without starting FIP workflow"
6207+
)
6208+
return False
6209+
6210+
# Check if photometry excitation is running or not
6211+
if self.PhotometryB.currentText() == "on" and not self.StartExcitation.isChecked():
6212+
logging.warning('photometry is set to "on", but excitation is not running')
6213+
6214+
reply = QMessageBox.question(
6215+
self,
6216+
"Box {}, Start".format(self.box_letter),
6217+
'Photometry is set to "on", but excitation is not running. Start excitation now?',
6218+
QMessageBox.Yes | QMessageBox.No,
6219+
QMessageBox.Yes,
6220+
)
6221+
if reply == QMessageBox.Yes:
6222+
self.StartExcitation.setChecked(True)
6223+
logging.info("User selected to start excitation")
6224+
started = self._StartExcitation()
6225+
if started == 0:
6226+
reply = QMessageBox.critical(
6227+
self,
6228+
"Box {}, Start".format(self.box_letter),
6229+
"Could not start excitation, therefore cannot start the session",
6230+
QMessageBox.Ok,
6231+
)
6232+
logging.info(
6233+
"could not start session, due to failure to start excitation"
6234+
)
6235+
self.Start.setChecked(False)
6236+
return False
6237+
else:
6238+
logging.info("User selected not to start excitation")
6239+
self.Start.setChecked(False)
6240+
return False
6241+
6242+
return True
6243+
61886244
def session_end_tasks(self):
61896245
"""
61906246
Data cleanup and saving that needs to be done at end of session.
@@ -6995,7 +7051,7 @@ def _generate_upload_manifest(self):
69957051
"capsule_id": capsule_id,
69967052
"mount": mount,
69977053
"destination": "//allen/aind/scratch/dynamic_foraging_rig_transfer",
6998-
"s3_bucket": "private",
7054+
"s3_bucket": "public",
69997055
"processor_full_name": "AIND Behavior Team",
70007056
"modalities": modalities,
70017057
"schemas": [

0 commit comments

Comments
 (0)