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
458 stars 305 forks source link

Empty contentpack for distribution and testing #5350

Closed benjaoming closed 7 years ago

benjaoming commented 7 years ago

Summary

We should finally kill off the English content pack, as the only purpose it serves is to have a function content tree in a blank installation -- for which users should download a full English content pack, anyways.

This will also greatly improve test speeds AFAIK.

TODO

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

Reviewer guidance

Please comment if you have any concerns about testing with no content data :) IMO we need to speed up the tests significantly, so going from 92MB test db to ~0 MB is pretty awesome.

Issues addressed

5336 #5318

codecov-io commented 7 years ago

Current coverage is 51.81% (diff: 78.63%)

Merging #5350 into develop will increase coverage by 0.79%

@@            develop      #5350   diff @@
==========================================
  Files           142        142          
  Lines          7487       7608   +121   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           3820       3942   +122   
+ Misses         3667       3666     -1   
  Partials          0          0          

Powered by Codecov. Last update 0969659...b89c622

benjaoming commented 7 years ago

All BDD tests are actually working now, other tests are failing because they haven't got a content.db with fixtures.

benjaoming commented 7 years ago

Update on English content pack vs. empty content.db:

If there is an empty content.db (i.e. no content packs installed), the user will now be displayed this warning regardless of the situation. For instance, if you have 1 other language, it will still show up. I think this is the intention of all content packs as they do not contain any static exercise data files.

screenshot from 2016-12-11 19-34-50