Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions IDCBrowser/IDCBrowser.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,8 @@ def onPythonRequirementsCheckTimeout(self):
self.pythonRequirementsCheckTimer.stop()

requiredLibraries = [
"idc-index"
"idc-index",
"idc-index-data"
]

outdatedLibraries = []
Expand Down Expand Up @@ -1521,8 +1522,22 @@ def setupPythonRequirements(self, update=False):
userMessage = "The module requires idc-index python package, which will now be installed."
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The user message references only 'idc-index python package' but the code now installs/updates both 'idc-index' and 'idc-index-data' packages. Consider updating this message to mention both packages for clarity.

Copilot uses AI. Check for mistakes.
logging.info(userMessage)
with slicer.util.displayPythonShell() as shell, slicer.util.tryWithErrorDisplay(message=errorMessage, waitCursor=True) as errorDisplay:
slicer.util.pip_install(f"{'--upgrade ' if update else ''}idc-index>=0.7.0")
if update:
slicer.util.pip_install("--no-cache-dir --upgrade idc-index")
slicer.util.pip_install("--no-cache-dir --upgrade idc-index-data")
else:
slicer.util.pip_install("idc-index idc-index-data")
installed = True

import importlib
# Force reload of the module to pick up the new version
if 'idc_index' in sys.modules:
import idc_index
importlib.reload(idc_index)
if 'idc_index.index' in sys.modules:
from idc_index import index
importlib.reload(index)

else:
installed = True

Expand Down