Brod8362/d4m

Self-update

Opened this issue · 2 comments

If at some point this becomes packaged for less-technical types (e.g. GUI accessible via PyInstaller), then it would be nice to:

  • check that the current d4m version is up to date (if using github, be wary of API limits since we run close to those already sometimes). Maybe if we have CI it could link up to that.
  • add an update button which shows either "d4m: check for updates" or "d4m: up-to-date!" depending on whether or not the check has been performed yet
    • should be clear that this is updating d4m and not dmm for example
  • check that the d4m version is a prepackaged version
  • If outdated and prepackaged, offer the user a self-update button which downloads the d4m exe, does a little shuffle to rename it away and put the new one in its place (beware windows file locking semantics), and restarts it. This might require a helper script that can be run between exit and restart to rename while the EXE is not in use.
  • If outdated and not prepackaged and pip is installed and the package is not an editable install and the user has write access to the package location, offer a button which does pip install -U or equivalent

So as of 0.3.0, the windows version is installed via an installer.
I do plan to at least add the update checker, but my solution for updates is most likely just directing the user to download the latest installer and run it.

If it's installed on a system via pip, then it probably wouldn't be too bad to just run pip for them.

Either way, the update check will come in 0.3.1, and any kind of auto-installs can be handled later

Update check implemented in v0.3.1