MCPcopy Index your code
hub / github.com/DeepLabCut/DeepLabCut / _run_update_command

Method _run_update_command

deeplabcut/gui/window.py:333–352  ·  view source on GitHub ↗
(self, packages)

Source from the content-addressed store, hash-verified

331 self._updater.check(silent=self._scheduled_update_check_silent)
332
333 def _run_update_command(self, packages):
334 if not packages:
335 return
336
337 if self._update_process is not None and self._update_process.state() != QtCore.QProcess.NotRunning:
338 return
339
340 self._progress_bar.show()
341 self.status_bar.showMessage("Installing updates...")
342
343 self._update_process_output = []
344 self._update_process = QtCore.QProcess(self)
345 self._update_process.setProgram(sys.executable)
346 self._update_process.setArguments(["-m", "pip", "install", "-U", *packages])
347
348 self._update_process.finished.connect(self._on_update_process_finished)
349 self._update_process.errorOccurred.connect(self._on_update_process_error)
350 self._update_process.readyRead.connect(self._drain_update_process_output)
351 self._update_process.setProcessChannelMode(QtCore.QProcess.MergedChannels)
352 self._update_process.start()
353
354 def _drain_update_process_output(self):
355 if self._update_process is None:

Callers 1

Calls 4

showMethod · 0.80
connectMethod · 0.80
startMethod · 0.80
stateMethod · 0.45

Tested by

no test coverage detected