Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
indirectlylit committed Apr 5, 2016
2 parents 4e5eeb3 + b93dddd commit aad3844
Show file tree
Hide file tree
Showing 727 changed files with 52,431 additions and 77,864 deletions.
1 change: 0 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ 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
- [ ] Add an entry to CHANGELOG.rst

## Reviewer guidance

Expand Down
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ static-updates
# MAC stuff
.DS_Store

# oh-my-zsh
.venv

# SQLite files (should probably specify the path)
*.db
*.sqlite*
Expand All @@ -41,6 +44,7 @@ static-updates
*.patch
*.pid
*.prof
secretkey.txt

# Python compiling
*.pyc
Expand All @@ -59,7 +63,6 @@ static-updates
# Documentation
docs/_build
docs/images/*
docs/kalite.1.gz

# oh-my-zsh convention for automatically
# switching on a venv
Expand All @@ -72,6 +75,9 @@ venv/
# Ignore changes to Perseus and Khan Exercises that do not come from intentional edits
/kalite/distributed/static/js/distributed/perseus

# Ignore file used to store queued video download info.
videos_to_download.json

# Lacks documentation
locale/
node_modules/
Expand Down
17 changes: 11 additions & 6 deletions MANIFEST.in.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,29 @@ include requirements.txt

recursive-include kalite *.html *.txt *.png *.js *.css *.gif *.less *.otf *.svg *.woff *.eot *.ttf *.zip *.json *.handlebars

# Get the empty DBs -- make sure they are properly generated!
recursive-exclude kalite/database *
recursive-include kalite/database/templates *sqlite
recursive-include kalite/database/templates/content_items *sqlite

# This can be a huge problem when creating an sdist from
# a local development environment
recursive-exclude kalite/static *

# Not doing this anymore
# exclude kalite/local_settings.py
# exclude kalite/settings/local_settings.py
# exclude kalite/private_key.pem
# exclude kalite/secrets.py

# Data files, these are not picked up by sdist unless listed here
recursive-include python-packages *
recursive-include static-libraries *

# There are still a couple of files left here, however main part is for build
# process
recursive-include data *
recursive-exclude data/khan *

# Necessary because it's a data directory so they
# do not get automatically excluded
recursive-exclude python-packages *pyc

# Docs
recursive-include docs/_build/html *
include docs/kalite.1.gz

36 changes: 26 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,25 @@ help:
@echo "assets - build all JS/CSS assets"
@echo "coverage - check code coverage quickly with the default Python"
@echo "docs - generate Sphinx HTML documentation, including API docs"
@echo "release - package and upload a release"
@echo "dist - package locally"
@echo "release - package and upload a release, options: format=[gztar,zip]"
@echo "dist - package locally, options: format=[gztar,zip]"
@echo "install - install the package to the active Python's site-packages"

# used for release and dist targets
format?=gztar

clean: clean-build clean-pyc clean-test

clean-dev-db:
rm -f kalite/database/data.sqlite

clean-build:
rm -fr build/
rm -fr dist/
rm -fr .eggs/
rm -fr dist-packages/
rm -fr dist-packages-temp/
rm -fr kalite/database/templates
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +

Expand All @@ -45,7 +52,7 @@ lint:
test:
bin/kalite manage test --bdd-only

test-bdd:
test-bdd: docs
bin/kalite manage test --bdd-only

test-nobdd:
Expand Down Expand Up @@ -73,24 +80,33 @@ docs:
# sphinx-apidoc -o docs/ ka-lite-gtk
$(MAKE) -C docs clean
$(MAKE) -C docs html
cli2man bin/kalite -o docs/kalite.1.gz
# open docs/_build/html/index.html


# Runs separately from the docs command for now because of Windows issues
man:
cli2man bin/kalite -o docs/kalite.1.gz

assets:
# Necessary because NPM may have wrong versions in the cache
npm cache clean
npm install --production
node build.js
bin/kalite manage compileymltojson
bin/kalite manage syncdb --noinput
bin/kalite manage migrate
mkdir -p kalite/database/templates/
cp kalite/database/data.sqlite kalite/database/templates/
bin/kalite manage retrievecontentpack download en --minimal --foreground --template

release: clean docs assets
python setup.py sdist --formats=gztar,zip upload --sign
python setup.py sdist --formats=gztar,zip upload --sign --static
release: dist man
ls -l dist
echo "uploading above to PyPi, using twine"
twine upload -s dist/*

dist: clean docs assets
python setup.py sdist
python setup.py sdist --static
dist: clean clean-dev-db docs assets
python setup.py sdist --formats=$(format)
python setup.py sdist --formats=$(format) --static
ls -l dist

install: clean
Expand Down
39 changes: 0 additions & 39 deletions Vagrantfile

This file was deleted.

7 changes: 4 additions & 3 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ machine:

dependencies:
cache_directories:
- "content"
- "data"
- "sc-latest-linux"
override:
- pip install -r requirements_test.txt
- pip install -r requirements_sphinx.txt
- pip install -e .
# This cannot be done because pip on Circle doesn't understand our sdist
# - make sdist
Expand All @@ -18,15 +19,15 @@ dependencies:
test:
override:
- make assets
- kalite start --settings=kalite.project.settings.disk_based_cache --traceback -v2
- kalite start --traceback -v2
- kalite status
- kalite stop --traceback -v2
- cd sc-*-linux && ./bin/sc -u $SAUCE_USERNAME -k $SAUCE_ACCESS_KEY --tunnel-identifier $CIRCLE_BUILD_NUM-$CIRCLE_NODE_INDEX --readyfile ~/sauce_is_ready > sc_output.txt 2>&1:
background: true
- while [ ! -e ~/sauce_is_ready ]; do sleep 1; done
- case $CIRCLE_NODE_INDEX in 0) make test-bdd ;; 1) make test-nobdd;; esac:
parallel: true
# TODO: replace below with "make link" when we're pep8
# TODO: replace below with "make lint" when we're pep8
- npm install -g jshint
- jshint kalite/*/static/js/*/
post:
Expand Down
7 changes: 0 additions & 7 deletions data/khan/channel_data.json

This file was deleted.

1 change: 0 additions & 1 deletion data/khan/contents.json

This file was deleted.

1 change: 0 additions & 1 deletion data/khan/exercises.json

This file was deleted.

Binary file removed data/khan/images/learning-image.png
Binary file not shown.
42 changes: 0 additions & 42 deletions data/khan/make_unique_slugs.py

This file was deleted.

1 change: 0 additions & 1 deletion data/khan/topics.json

This file was deleted.

Loading

0 comments on commit aad3844

Please sign in to comment.