Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a new updater system - Part 2 #39

Open
5 of 7 tasks
o355 opened this issue Oct 25, 2017 · 13 comments
Open
5 of 7 tasks

Adding a new updater system - Part 2 #39

o355 opened this issue Oct 25, 2017 · 13 comments

Comments

@o355
Copy link
Owner

o355 commented Oct 25, 2017

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:

  • Creating v2 of the API
  • Figuring out how to download .zip files with a real progress bar (no spinny wheel)
  • 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
  • Making the real "meat" of the updater
  • Adapting configupdate.py to accept RC packages
  • Redoing the update checker on boot
@o355 o355 added this to the 0.6.4 beta milestone Oct 25, 2017
@BenjaminUrquhart
Copy link
Contributor

How is this going?

@o355
Copy link
Owner Author

o355 commented Nov 7, 2017

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
Copy link
Owner Author

o355 commented Jan 30, 2018

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
Copy link
Owner Author

o355 commented Jan 31, 2018

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
Copy link
Owner Author

o355 commented Jan 31, 2018

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
Copy link
Owner Author

o355 commented Jan 31, 2018

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
Copy link
Owner Author

o355 commented Feb 2, 2018

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
Copy link
Owner Author

o355 commented Feb 15, 2018

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

@o355
Copy link
Owner Author

o355 commented Feb 26, 2018

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
Copy link
Owner Author

o355 commented Mar 5, 2018

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

@o355
Copy link
Owner Author

o355 commented Apr 6, 2018

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 o355 added halted and removed high priority labels Apr 6, 2018
@o355
Copy link
Owner Author

o355 commented May 2, 2018

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
Copy link
Owner Author

o355 commented May 30, 2018

Halted until all minor 1.0.0 issues are fixed.

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

No branches or pull requests

2 participants