learningequality / ka-lite

KA Lite: lightweight web server for serving core Khan Academy content (videos and exercises) without needing internet connectivity
https://learningequality.org/ka-lite/
Other
456 stars 306 forks source link

Harden download robustness #5545

Closed benjaoming closed 6 years ago

benjaoming commented 6 years ago

Summary

TODO

If not all TODOs are marked, this PR is considered WIP (work in progress)

Reviewer guidance

...

Issues addressed

5538

5356

codecov[bot] commented 6 years ago

Codecov Report

Merging #5545 into 0.17.x will increase coverage by 1.89%. The diff coverage is 73.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           0.17.x    #5545      +/-   ##
==========================================
+ Coverage   64.67%   66.56%   +1.89%     
==========================================
  Files         117      117              
  Lines        6612     6639      +27     
==========================================
+ Hits         4276     4419     +143     
+ Misses       2336     2220     -116
Impacted Files Coverage Δ
kalite/updates/settings.py 100% <ø> (ø) :arrow_up:
kalite/topic_tools/content_models.py 77.8% <0%> (-0.29%) :arrow_down:
kalite/updates/models.py 84.82% <100%> (+0.13%) :arrow_up:
kalite/updates/management/utils.py 78.44% <100%> (+5.88%) :arrow_up:
...alite/updates/management/commands/videodownload.py 74.56% <62.5%> (+15.73%) :arrow_up:
kalite/updates/videos.py 88.73% <73.33%> (+2.79%) :arrow_up:
...ributed/management/commands/retrievecontentpack.py 89.16% <76.92%> (+40.98%) :arrow_up:
kalite/i18n/base.py 76.17% <81.25%> (+20.31%) :arrow_up:
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 86e1ea6...e941add. Read the comment docs.

benjaoming commented 6 years ago

Added download progress for contentpack retrieval.

image

benjaoming commented 6 years ago

Download progress callback also added in UI

image

benjaoming commented 6 years ago

Repositioned the progress bars for content pack downloads so it doesn't look like something is broken.

image

benjaoming commented 6 years ago

A small related TODO of this PR would be to add automated testing for retrieving and deleting a content pack.

benjaoming commented 6 years ago

Merging this for further tests in a pre-release!