Skip to content

Conversation

Zehen-249
Copy link
Contributor

Description

This PR introduces a new asynchronous update mechanism for Osdag. The system uses QProcess and a non-modal progress dialog to ensure a smooth user experience without freezing the UI.

Key Features Added

Asynchronous Updates:

  • Uses QProcess instead of blocking subprocess.run, ensuring the main UI remains responsive.

Non-blocking Progress Dialog:

  • The update dialog is non-modal, allowing users to continue using the application while the update runs.

Cross-Platform Conda/Pixi Support:

  • Detects the correct paths for conda or pixi executables dynamically for Windows, Linux, and macOS.

Confirmation Before Update:

  • Prompts the user before starting the update process.

Implementation Details

Refactored Update class in update_version_check module:

  • Fetches the latest version from the Osdag downloads page.
  • Compares it with the current version.
  • Runs update commands (conda or pixi) asynchronously using QProcess.

Added output_signal and finished_signal for updating the GUI in real-time.

Created a progress dialog (QDialog) with:

  • Status label
  • Live log view (conda prompt output)

Integrated update flow with Check for Update menu option in osadgMainPage module

How to Test

  • Go to Help → Check for Update in the Osdag application.
  • Change __version___ variable to lower value in ._version module for testing, this ensure update available pop-up.
  • If an update is available → A confirmation dialog appears.
  • On confirmation, the update process starts in a non-blocking progress dialog.
  • During update UI remains responsive.
  • Real-time logs in the dialog.
  • On completion → A message box indicates success or failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant