PyWeather icon indicating copy to clipboard operation
PyWeather copied to clipboard

Adding a new updater system - Part 2

Open o355 opened this issue 9 years ago • 13 comments

The PyWeather updater system sucks at the moment, and I'm going to change this in 0.6.4 beta.

Right now, the PyWeather updater uses Git to update, which has been notoriously unreliable across a half a dozen releases. Git only works on some platforms, and I'm sick of the updater breaking on each release.

Beginning with 0.6.3 beta, the Git updater will be entirely disabled, and I feel as if coding in a new updater will extend 0.6.3 beta's release time out too far into December 2017. A few configuration options will get removed as well.

From 0.6.3 beta to 0.6.4 beta, the .zip method will be the only way of downloading PyWeather within itself.

The new updater will encompass a few new tricks that I still need to learn, and here's how things will generally work:

  • The updater will check for new updates, and show to the user if they'd like to download the .zip, or update within PyWeather. The manual downloading of the .zip file will still be available.
  • If a user decides to run the automatic updater, the .zip will be unzipped in the base directory of PyWeather, replacing all files.
  • With the updated configupdate.py file, the script will run, and PyWeather will exit. Progress messages will get displayed throughout the process.

With this, I need to learn these skills:

  • Unzipping a .zip file properly with Python 3

Part 2 involves adding the actual updater code itself into 0.6.4 beta.

Checklist:

  • [x] Creating v2 of the API
  • [x] Figuring out how to download .zip files with a real progress bar (no spinny wheel)
  • [x] Figuring out how to properly extract .zip files
  • [ ] Making a base updater UI to allow the user to check for updates (no downloading yet) and change to a different branch
  • [x] Making the real "meat" of the updater
  • [x] Adapting configupdate.py to accept RC packages
  • [ ] Redoing the update checker on boot

o355 avatar Oct 25 '17 14:10 o355

How is this going?

BenjaminUrquhart avatar Nov 07 '17 01:11 BenjaminUrquhart

At this point development of the new updater system has not started, and development of the new updater will begin after 0.6.3 beta is released.

o355 avatar Nov 07 '17 01:11 o355

API v2.0 is up, now the arms race of making a progress bar.

TQDM is a no-go as it doesn't look nice. Looking at clint and click right now.

o355 avatar Jan 30 '18 16:01 o355

Click did the job, look at this glorious progress bar:

screenshot_20180130_231559

Simple and has an ETA timer. That now brings the required libraries for PyWeather up a notch but it's open source.

Now working on how to get a progress bar when unpacking the zip (using Halo might as well work as unzipping 200 KB archives shouldn't take more than a few seconds), and also clearing the download indicator. Hey, click might be able to help with that too!

o355 avatar Jan 31 '18 04:01 o355

I've now got an unpacking indicator working as well. Next step is to add MD5/SHA1 (SHA-256 maybe?) hash checking to the updater and quitting if it fails.

So far the test script is working about as well as it needs to!

o355 avatar Jan 31 '18 04:01 o355

I'm now working on the actual new updater and currently I'm working in a new system for checking for updates.

Slow but steady progress.

o355 avatar Jan 31 '18 14:01 o355

Now adding some new features (and of course lots of libraries):

  • Showing file sums on the updater page
  • Allowing to check the .zip download method to check the downloaded .zip's sums

New libraries:

  • Hashsum (included)
  • Zipfile (included)
  • Click (NOT included)

o355 avatar Feb 02 '18 15:02 o355

The actual updater is 95% done. Now refactoring configupdate.py since sequential order rocks

o355 avatar Feb 15 '18 13:02 o355

The actual new updater is now actually done. Here's what's left to do:

  • Add the old updater code and improve it some
  • Add branch switching functionality
  • Test, test, test, and test some more

o355 avatar Feb 26 '18 13:02 o355

I've started working on branch switching. I've also added a depreciated branch checker as well. Things are coming along nicely.

o355 avatar Mar 05 '18 14:03 o355

Things are moving along slowly, and I've decided to halt development of the updater because I'm tired of coding it for a few months. I'm halfway done with the branch selection feature.

When development eventually resumes it shouldn't take that long for me to finish coding, but testing will take a long time.

o355 avatar Apr 06 '18 14:04 o355

If you haven't already known, I deleted the updater (not radar). It was too ambitious and I needed to focus on what matters in an updater.

I have decided to only implement the features below for the new updater:

  • The usual checking for updates and updating without Git, but only with 1 checksum check (SHA256)
  • The usual updating with a .zip file, and again with 1 checksum check
  • There will be no branches. It's too complicated.
  • The API will be refactored.
  • Yes, incorporating a Git updater for users who still want it.

o355 avatar May 02 '18 15:05 o355

Halted until all minor 1.0.0 issues are fixed.

o355 avatar May 30 '18 15:05 o355