Skip to content

Commit dcadb89

Browse files
committed
test stack widgets passing
1 parent bdf6c1e commit dcadb89

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed

src/pymapmanager/annotations/lineAnnotationsCore.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ def setPivotDistance(self, segmentID : int, clickedPoint: shapely.Point):
5151
logger.info(f' -->> pivotDistance: {pivotDistance}')
5252

5353
# self._buildDataFrame()
54-
self._buildTimepoint()
54+
logger.warning('abb 202508 removed call to _buildTimepoint')
55+
# self._buildTimepoint()
5556

5657
self._buildDataFrame()
5758

@@ -246,7 +247,8 @@ def setValue(self, colName, segmentID, value):
246247

247248
self.singleTimepoint.updateSegment(segmentId = segmentID, value=_segment)
248249

249-
self._buildTimepoint()
250+
logger.warning('abb 202508 removed call to _buildTimepoint')
251+
# self._buildTimepoint()
250252
self._buildDataFrame()
251253

252254
# self._buildDataFrame()

src/pymapmanager/interface/pyMapManagerApp.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,8 @@ def loadStackWidget(self,
763763
path = path[:-1]
764764

765765
if loadFile and not canImportPath(path):
766-
_errorStr = f'Incorrect file type, expecting one of :{acceptedExtensions()}'
766+
_ext = os.path.split(path)[1]
767+
_errorStr = f'Incorrect file type "{_ext}, expecting one of :{acceptedExtensions()}'
767768
logger.warning(_errorStr)
768769
window = self.activeWindow()
769770
QtWidgets.QMessageBox.critical(window, "Error", _errorStr)

src/pymapmanager/interface/stackWidgets/stackWidget.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ def selectedEvent(self, event : "pmmEvent"):
625625
_pointSelection = _eventSelection.getPointSelection()
626626
_stackSelection.setPointSelection(_pointSelection)
627627

628-
logger.info(f' === processing _pointSelection:{_pointSelection}')
628+
# logger.info(f' === processing _pointSelection:{_pointSelection}')
629629

630630
if len(_pointSelection) == 1:
631631
# check if event spine id exists

src/pymapmanager/stack.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,8 @@ def redo(self, annotationType: Literal["Spine", "Segment"]):
273273

274274
# Not redoing add properly
275275
# CRITICAL FOR REDO !!!!!
276-
self.getPointAnnotations()._buildTimepoint() # rebuild single timepoint
276+
# abb 202508 removed
277+
# self.getPointAnnotations()._buildTimepoint() # rebuild single timepoint
277278

278279
if annotationType == "Spine":
279280
self.getPointAnnotations()._buildDataFrame()

src/pymapmanager/tests/interface/test_stack_widgets.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,20 @@ def test_plugins(qtbot, qapp):
6565

6666
# print('qapp:', qapp)
6767

68+
# abb 202508, this downloads a zip. OUR LOADING OF ZAR ZIP IS BROKEN !!!
6869
mmapPath = mapmanagercore.data.get202504_map()
70+
6971
# logger.info('202504 loading from local mmap directory')
7072
# mmapPath = '../MapManagerCore-Data/data/202504/single_timepoint_202504.mmap'
7173
# mapPath = '../MapManagerCore-Data/data/202504/single_timepoint_202504.mmap.zip'
74+
75+
logger.info(f'trying to open mmapPath:{mmapPath}')
7276
if not os.path.isdir(mmapPath) and not mmapPath.endswith('.zip'):
7377
logger.error(f'did not find folder path mmapPath: {mmapPath}')
7478
return
7579

7680
logger.info(f'opening stack widget path {mmapPath}')
77-
stackWidgetWindow = qapp.loadStackWidget(mmapPath)
81+
stackWidgetWindow = qapp.loadStackWidget(mmapPath, loadFile=False) # we are loading a mmap, not a zip file
7882
# stackWidgetWindow = stackWidget(path=mmapPath)
7983

8084
# get list of all stack widgets from app, keys are class of plugin

0 commit comments

Comments
 (0)