Skip to content

Commit

Permalink
Merge branch '0.13.x' to master.
Browse files Browse the repository at this point in the history
Conflicts:
	kalite/distributed/static/js/distributed/software-keyboard.js
	kalite/version.py
  • Loading branch information
Aron Fyodor Asor committed Apr 27, 2015
2 parents 16e7f2f + a48f7fc commit 9d430d0
Show file tree
Hide file tree
Showing 4,014 changed files with 489,925 additions and 329,356 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*~
*.sublime-*
*.zip
/build/
locale/
node_modules/
tmp/
Expand All @@ -28,21 +29,37 @@ writeup/
/content/*.mp4
/content/*.mp4.part
/content/*.srt
/content/*.mp3
/content/*.pdf
/content/khan/
/data/logs
/data/i18n
/data/subtitles
/data/screenshots
/kalite/*.jpg
/kalite/*.mp4.part
/kalite/i18n/data/dubbed_video_mappings.json
/kalite/updates/data/video_file_sizes.json
/kalite/kalite-*.zip
/kalite/local_settings.py
/kalite/media
/kalite/temp
/data/*
!/data/khan/
/data/khan/assessmentitems.json
/data/khan/assessment_item_images
/kalite/private_key.pem
/kalite/secrets.py
/kalite/static
/kalite/i18n/static/js/i18n
/kalite/ghostdriver.log
/TAGS
.tags
/kalite/i18n/static/
/.vagrant/
ghostdriver.log
/kalite/_built.touch
*.swp
sphinx-docs/_build
sphinx-docs/images/*
/data/khan/assessmentitems.json.version
14 changes: 8 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@ language: python
python:
- '2.6'
- '2.7'
addons:
firefox: '31.0'
before_install:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile
--background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16
install:
- npm install
- npm install -g grunt-cli
- pushd $TRAVIS_BUILD_DIR; npm install; popd
- pushd $TRAVIS_BUILD_DIR; npm install -g grunt-cli; popd
script:
- cd $TRAVIS_BUILD_DIR
- bin/kalite start --traceback -v 2
- bin/kalite status
- bin/kalite stop --traceback -v 2
- python python-packages/fle_utils/tests.py
- python kalite/manage.py syncdb --migrate --noinput --traceback
- python kalite/manage.py test
- bin/kalite manage syncdb --migrate --noinput --traceback
- bin/kalite test --traceback -v 2
- grunt jshint
notifications:
email:
Expand Down
13 changes: 13 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Please include the following information when opening an issue:
* The branch you found the issue on
* The current date / the build that the issue affects
* Expected behavior
* Actual behavior
* Steps to reproduce (be detailed!)

If opening a PR, please observe the following guidelines
* 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!). Additionally, add in a "Fixes `issue number`" for PRs that address a certain issue (e.g. "Fixes #3390").
* If your PR changes or adds to the User Interface, please include screenshots in either the description or the comments.
* Give a brief summary of your changes in the PR description. Add in any other notes that are important for the reviewer to know.
* Update the documentation if your changes affect it (don't just assume they don't)
* Double check your own code for good style
65 changes: 65 additions & 0 deletions DEPRECATIONS_0.13.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
Deprecations in kalite 0.13
===========================

Why in RST, reStructuredText? Because our future sphinx will run on RST.

This is a working copy for making notes on deprecations until the documentation
structure is here.

Purging *pyc files
------------------
Previously, kalite would look for ``*pyc`` files every time it was launched,
and that was quite a waste since its only useful when upgrading. In dev
environments, we recommend that the developer keeps track of these issues
on his/her own as with any other project.

Tips:
http://blog.daniel-watkins.co.uk/2013/02/removing-pyc-files-coda.html

> Luckily, it's pretty easy to fix this in git, using hooks, specifically the
> post-checkout hook. To do that, add the following to .git/hooks/post-checkout, and make the file executable:

::

#!/bin/bash
find $(git rev-parse --show-cdup) -name "*.pyc" -delete

For the normal user, reset assured that the upgrade notes contain more
info.

TODO: Check that a git pull from an older release does not leave behind any
problematic *pyc files and possibly dump this whole thing.
Which version can I upgrade from?
---------------------------------

benjaoming: Certainly not 0.9 since I've removed the line that moves content files.


Changes in scripts/
-------------------

The ``scripts/`` directory now has everything OSX-specific in ``mac/``
and Windows stuff in ``win/``.

These scripts are intended to all deprecate sooner down the road as such
platform-specific logic will be maintained in separate distribution projects.

Scripts have been modified to continue to work but you are encouraged to
make your system setup only invoke the `kalite` in the `bin/` directory.


Starting and stopping kalite
----------------------------

Starting and stopping kalite is now performed from the new command line interface
`kalite`. Examples::

kalite start # Starts the server
kalite stop # Stops the server
kalite restart # Restarts the server
kalite status # Returns the current status of kalite, 0=stopped, 1=running
kalite manage # A proxy for the manage.py command.
kalite manage shell # Gives you a django shell

9 changes: 2 additions & 7 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,8 @@ module.exports = function(grunt) {
],
// http://www.jshint.com/docs/options/
options: {
"-W038": false, // 'variable' used out of scope.
"-W041": false, // Use '===' to compare with ''.
"-W047": false, // A trailing decimal point can be confused with a dot
"-W065": false, // Missing radix parameter.
"-W088": false, // Creating global 'for' variable.
"-W107": false, // Script URL.

// Enforcing options
bitwise: true, // Unexpected use of '&'.
Expand All @@ -30,18 +26,17 @@ module.exports = function(grunt) {
//forin: true, // The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.
freeze: true, // Extending prototype of native object: 'Object'.
immed: true, // Function declarations are not invocable. Wrap the whole function invocation in parens.
//latedef: 'nofunc', // 'variable' was used before it was defined.
latedef: 'nofunc', // 'variable' was used before it was defined.
noarg: true, // Avoid arguments.callee.
noempty: true, // Empty block.
nonbsp: true, // "non-breaking whitespace" character
nonew: true, // Do not use 'new' for side effects.
//undef: true, // 'variable' is not defined.
//unused: true, // 'variable' is defined but never used.
//unused: "vars", // 'variable' is defined but never used.
//strict: true, // Missing "use strict" statement.
trailing: true, // Trailing whitespace.

// Relaxing options
asi: true, // Missing semicolon.
shadow: true, // 'variable' is already defined.
sub: true, // ['property'] is better written in dot notation.

Expand Down
9 changes: 7 additions & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,14 @@ Inside the `ka-lite` directory (that you cloned above) you should find a script

(If you're installing the server to test/develop, rather than deploy, follow the [development instructions](https://github.com/learningequality/ka-lite/wiki) instead.)

To start the server, run the `start.sh` script in the `ka-lite` directory.
To start the server, use the `bin/kalite` executable from a command line. For instance, on Linux/Mac:

You may want to have this script run automatically when you start the computer. If you are running Ubuntu or another Debian variant, the setup script should have given you the option of setting the server to run automatically in the background when the computer boots. If you skipped this step, you can do it later by running `sudo ./runatboot.sh` from inside the `ka-lite/kalite` directory.
$ bin/kalite start # Start the server
$ bin/kalite stop # Stop the server

You may want to have this script run automatically when you start the computer. If you are running Ubuntu or another Debian variant, the setup script
should have given you the option of setting the server to run automatically in the background when the computer boots. If you skipped this step, you
can do it later by running `sudo scripts/runatboot.sh` from inside the `ka-lite` root directory.

Wait for the script to show the following:

Expand Down
15 changes: 11 additions & 4 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,20 @@ See: https://khan-exercises.readthedocs.org/en/latest/#small-print


------------------------------------------------------------------------------
For the Khan Academy content (exercises and videos):
For the Khan Academy content (Perseus exercises):
------------------------------------------------------------------------------
Unless otherwise indicated, all Licensed Educational Content is the property of Khan Academy or its subsidiaries or affiliated companies and/or third-party licensors and, subject to the terms and conditions of these Terms, is licensed to You under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License (available at http://creativecommons.org/licenses/by-nc-sa/3.0/us/) (the “Creative Commons License”).
Perseus exercise data is copyright Khan Academy and its partners, and is included here with permission.

See: http://www.khanacademy.org/about/tos#7
For full content license, see: http://www.khanacademy.org/about/tos#7


------------------------------------------------------------------------------
For the Khan Academy content (videos):
------------------------------------------------------------------------------
Unless otherwise indicated, the subset of the Khan Academy videos that are downloadable into KA Lite are released under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License (available at http://creativecommons.org/licenses/by-nc-sa/3.0/us/) (the “Creative Commons License”).

For full content license, see: http://www.khanacademy.org/about/tos#7

------------------------------------------------------------------------------
For the Python packages found under "ka-lite/python-packages":
(please alert us to any discrepancies)
Expand Down Expand Up @@ -56,4 +63,4 @@ requests

Under the ASL license v2 (http://www.apache.org/licenses/LICENSE-2.0.html):
rsa
southr
south
32 changes: 32 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "trusty64"

# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
config.vm.network "forwarded_port", guest: 8008, host: 38008

# Create a private network, which allows host-only access to the machine
# using a specific IP.
config.vm.network "private_network", ip: "192.168.33.10"

# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network "public_network"

# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
config.vm.synced_folder ".", "/vagrant", type: "nfs"

end
41 changes: 41 additions & 0 deletions bin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Everything in here will end up in the host OS' path so it can be executed
directly, example:

$ kalite start

Since the kalite command resolves many different things like where kalite is
installed and which python interpretor to run, you might wanna look a
different place for implementing new things :)

## Distributing on Mac/OSX

Rather than running the executable directly, you can also:

1. Symlink it from somewhere in your path, e.g.

cd /usr/bin
ln -s /path/to/kalite/bin/kalite .

2 . Copy `kalite` (the file in `bin/`) directly to `/usr/bin`. This is probably
what you want to do for a distribution. Then, you need to setup the following
env variables:

- KALITE_DIR: The root directory of the installation
- KALITE_PYTHON: If you want kalite run with a diffent python than the one
in your path (optional) or if `python` is not found in the system's path.


## Windows

Have a look in the `windows/` directory, there's some stuff for you. Also,
change your operating system :P

To have the new command `kalite` registered, double-click or execute
`windows/setup.bat`.

To run directly (assuming you're in the root folder), use `python.exe bin/kalite`.

### Distributing for Windows

Make sure that during the installation, the `bin/windows/setup.bat` command
is run.
Loading

0 comments on commit 9d430d0

Please sign in to comment.