MCPcopy Create free account
hub / github.com/MITK/MITK / RunUpdate

Method RunUpdate

Modules/PythonSegmentationUI/src/QmitknnInteractiveToolGUI.cpp:508–522  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

506}
507
508bool QmitknnInteractiveToolGUI::RunUpdate(bool clientOnly)
509{
510 const auto venvName = this->GetTool()->GetVirtualEnvName();
511 auto spec = mitk::nnInteractive::BuildUpgradeSpec(venvName, clientOnly);
512
513 QmitkPipInstallDialog dialog(spec, this, QmitkPipInstallDialog::Mode::Update);
514
515 if (dialog.exec() != QDialog::Accepted)
516 return false;
517
518 // Recreate the context so the interpreter sees the upgraded packages. Safe
519 // because an in-place update is only reached when no nnInteractive modules are
520 // loaded (see OfferInPlaceUpdate).
521 return this->GetTool()->CreatePythonContext();
522}
523
524bool QmitknnInteractiveToolGUI::OfferInPlaceUpdate(const mitk::nnInteractive::VersionCheckResult& versionCheck, bool clientOnly)
525{

Callers 1

OfferInPlaceUpdateMethod · 0.95

Calls 3

GetToolMethod · 0.95
GetVirtualEnvNameMethod · 0.80
CreatePythonContextMethod · 0.45

Tested by

no test coverage detected