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

Static files from content packs served from CONTENT_ROOT #5386

Merged
merged 4 commits into from Jan 17, 2017

Conversation

Projects
None yet
2 participants
@benjaoming
Member

benjaoming commented Jan 17, 2017

Summary

  • Reduces HTTP logging on dev server to something readable
  • Fixes kalite manage contentpackchecker all --update so it only updates installed content packs
  • Unpacks subtitle files *.vtt to CONTENT_ROOT/srt: Annotates with updated url and no longer needs to ignore any file or folder patterns during collectstatic

TODO

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

  • Have tests been written for the new code? If you're fixing a bug, write a regression test (or have a really good reason for not writing one... and I mean really good!)
  • Has documentation been written/updated?
  • New dependencies (if any) added to requirements file
  • Update get_subtitle_file_path
  • Remove old code unpacking/updating /perseus/ke/exercises/*
  • In kalite.management.commands.setup, remove collectstatic_ignores
  • Update content annotation to discover from different dir and update url column
  • Update ka-lite-raspberry-pi Nginx Conf
  • Update dev server runserver
  • Update cherrypy staticdirs

Reviewer guidance

Let me know if you find anything unacceptable here. New static files handing will be described in release notes.

Issues addressed

#5073

@benjaoming benjaoming added this to the 0.17.0 milestone Jan 17, 2017

@benjaoming benjaoming added the has PR label Jan 17, 2017

@codecov-io

This comment has been minimized.

Show comment
Hide comment
@codecov-io

codecov-io Jan 17, 2017

Current coverage is 51.82% (diff: 40.00%)

Merging #5386 into develop will increase coverage by 0.14%

@@            develop      #5386   diff @@
==========================================
  Files           143        143          
  Lines          7516       7491    -25   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits           3884       3882     -2   
+ Misses         3632       3609    -23   
  Partials          0          0          

Powered by Codecov. Last update 4aa06af...2d1ea12

codecov-io commented Jan 17, 2017

Current coverage is 51.82% (diff: 40.00%)

Merging #5386 into develop will increase coverage by 0.14%

@@            develop      #5386   diff @@
==========================================
  Files           143        143          
  Lines          7516       7491    -25   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits           3884       3882     -2   
+ Misses         3632       3609    -23   
  Partials          0          0          

Powered by Codecov. Last update 4aa06af...2d1ea12

@benjaoming

This comment has been minimized.

Show comment
Hide comment
@benjaoming

benjaoming Jan 17, 2017

Member

Alright, seems it was just a matter of moving srt/ from STATIC_ROOT to CONTENT_ROOT in the unpacking process and then the annotation process.

Member

benjaoming commented Jan 17, 2017

Alright, seems it was just a matter of moving srt/ from STATIC_ROOT to CONTENT_ROOT in the unpacking process and then the annotation process.

benjaoming added a commit to benjaoming/ka-lite that referenced this pull request Jan 17, 2017

@benjaoming

This comment has been minimized.

Show comment
Hide comment
@benjaoming

benjaoming Jan 17, 2017

Member

Since the .srt files are now handled in CONTENT_ROOT, there's no need to update the folders served by the dev server, cherrypy or Nginx. Users having setup other mechanisms for serving these folders will also not be affected. This is great :)

Member

benjaoming commented Jan 17, 2017

Since the .srt files are now handled in CONTENT_ROOT, there's no need to update the folders served by the dev server, cherrypy or Nginx. Users having setup other mechanisms for serving these folders will also not be affected. This is great :)

@benjaoming

This comment has been minimized.

Show comment
Hide comment
@benjaoming

benjaoming Jan 17, 2017

Member

Tested after reinstalling the English content pack that subtitles are still working

screenshot from 2017-01-17 21-38-03

Member

benjaoming commented Jan 17, 2017

Tested after reinstalling the English content pack that subtitles are still working

screenshot from 2017-01-17 21-38-03

@benjaoming benjaoming changed the title from [WIP] Static files and content packs to Static files from content packs served from CONTENT_ROOT Jan 17, 2017

@benjaoming benjaoming merged commit c30cf79 into learningequality:develop Jan 17, 2017

2 of 3 checks passed

codecov/patch 40.00% of diff hit (target 51.67%)
Details
ci/circleci Your tests passed on CircleCI!
Details
codecov/project 51.82% (+0.14%) compared to 4aa06af
Details

@benjaoming benjaoming removed the has PR label Jan 17, 2017

benjaoming added a commit to benjaoming/ka-lite that referenced this pull request Jan 17, 2017

@benjaoming benjaoming deleted the benjaoming:static-files-devserver-logging branch Feb 9, 2017

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