Skip to content

Commit

Permalink
Merge pull request #5412 from benjaoming/master
Browse files Browse the repository at this point in the history
0.17.x into master
  • Loading branch information
benjaoming authored Feb 16, 2017
2 parents 48f310f + 1c5542e commit 6d82587
Show file tree
Hide file tree
Showing 4,893 changed files with 2,865 additions and 118,841 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
5 changes: 0 additions & 5 deletions .KALITE_SOURCE_DIR

This file was deleted.

6 changes: 1 addition & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@

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
- [ ] Have you written release notes for the upcoming release?

## Reviewer guidance

Expand All @@ -18,6 +17,3 @@ If not all TODOs are marked, this PR is considered WIP (work in progress)

List the issues solved or partly solved by the PR

## Screenshots (if appropriate)

*They're nice. :)*
51 changes: 13 additions & 38 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,23 @@
.project
.pydevproject

# Undocumented ignores
# Database templates
kalite/database

# setup.py
dist/
build/
*.egg-info/

# The MANIFEST.in file is automatically generated by setup.py
MANIFEST.in
# Created during make dist
.kalite_dist_tmp

# Static builds with setup.py [command] --static
dist-packages-temp/
dist-packages-downloads/
dist-packages/
.pip-temp/
.pip-downloads/
.kalite/packages/dist/

# Created by Selenium / Firefox
geckodriver.log

# User cache data generated at runtime
cache/
Expand All @@ -36,15 +39,10 @@ static-updates
# oh-my-zsh
.venv

# SQLite files (should probably specify the path)
*.db
*.sqlite*

# Not sure
*.patch
*.pid
*.prof
secretkey.txt

# Python compiling
*.pyc
Expand All @@ -56,13 +54,10 @@ secretkey.txt
# Sublime editor
*.sublime-*

# Ignore all .zip files!? No comment?? Needs fixing, I guess it's to avoid
# committing local assessment items.
*.zip

# Documentation
docs/_build
docs/images/*
kalite/static-libraries/docs

# oh-my-zsh convention for automatically
# switching on a venv
Expand All @@ -75,11 +70,10 @@ 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
# Ignore django-reverse-js file that gets copied during testing.
kalite/distributed/static/django_js_reverse/js/reverse.js

# Lacks documentation
locale/
node_modules/
tmp/
virtualenv/
Expand All @@ -90,20 +84,6 @@ writeup/
/run_command.*
/start.*
/stop.*
/content/*.jpg
/content/*.json
/content/*.png
/content/*.mp4
/content/*.mp4.part
/content/*.srt
/content/*.mp3
/content/*.pdf
/content/khan/
/content/assessment
/data/logs
/data/i18n
/data/subtitles
/data/screenshots
/kalite/*.jpg
/kalite/*.mp4.part
/kalite/i18n/data/dubbed_video_mappings.json
Expand All @@ -112,10 +92,6 @@ writeup/
/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
Expand All @@ -127,5 +103,4 @@ writeup/
/.vagrant/
ghostdriver.log
*.swp
/data/khan/assessmentitems.json.version
file_map.json
4 changes: 2 additions & 2 deletions .jshintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
kalite/distributed/static/js/distributed/base/backbone-tastypie.js
kalite/distributed/static/js/distributed/perseus/**/*
kalite/*/static/js/*/bundles/*
static-libraries/**
kalite/i18n/static/js/i18n
kalite/static-libraries/**
kalite/i18n/static/js/i18n
41 changes: 0 additions & 41 deletions .travis.yml

This file was deleted.

65 changes: 0 additions & 65 deletions DEPRECATIONS_0.13.rst

This file was deleted.

14 changes: 6 additions & 8 deletions MANIFEST.in.dist → MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# MANIFEST.in is generated with basic
# layout of MANIFEST.in.dist

include kalitectl.py
include LICENSE
include README.rst
include setup.cfg
include requirements.txt

recursive-include kalite *.html *.txt *.png *.js *.css *.gif *.less *.otf *.svg *.woff *.eot *.ttf *.zip *.json *.handlebars *.woff2
recursive-include kalite *.html *.txt *.png *.js *.css *.gif *.less *.otf *.svg *.woff *.eot *.ttf *.zip *.json *.handlebars *.woff2 *.mo *ico
recursive-include kalite/static-libraries *

recursive-include kalite/packages/dist *
recursive-exclude kalite/packages/dist *.po

# Get the empty DBs -- make sure they are properly generated!
recursive-exclude kalite/database *
Expand All @@ -18,10 +21,6 @@ recursive-include kalite/database/templates/content_items *sqlite
# a local development environment
recursive-exclude kalite/static *

# 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 *
Expand All @@ -32,6 +31,5 @@ recursive-exclude data/khan *
recursive-exclude python-packages *pyc

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

kalite/static-docs
49 changes: 26 additions & 23 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,17 @@ help:
# 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: clean-build clean-pyc clean-test clean-assets

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

Expand All @@ -45,6 +44,11 @@ clean-test:
rm -f .coverage
rm -fr htmlcov/

clean-assets:
npm cache clean
rm -rf kalite/database/templates/
rm -rf .kalite_dist_tmp

lint:
pep8 kalite
jshint kalite/*/static/js/*/
Expand All @@ -63,15 +67,7 @@ test-all:
# tox

coverage:
coverage run --source kalite kalitectl.py test
coverage report -m

coverage-bdd:
coverage run --source kalite kalitectl.py test --bdd-only
coverage report -m

coverage-nobdd:
coverage run --source kalite kalitectl.py test --no-bdd
coverage run --source kalite bin/kalite test
coverage report -m

docs:
Expand All @@ -80,6 +76,7 @@ docs:
# sphinx-apidoc -o docs/ ka-lite-gtk
$(MAKE) -C docs clean
$(MAKE) -C docs html
cp -Rf docs/_build/html kalite/static-libraries/docs/
# open docs/_build/html/index.html


Expand All @@ -88,25 +85,31 @@ 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
KALITE_HOME=.kalite_dist_tmp bin/kalite manage syncdb --noinput
KALITE_HOME=.kalite_dist_tmp bin/kalite manage migrate
rm -rf kalite/database/templates/
mkdir -p kalite/database/templates/
cp kalite/database/data.sqlite kalite/database/templates/
bin/kalite manage retrievecontentpack download en --minimal --foreground --template
cp .kalite_dist_tmp/database/data.sqlite kalite/database/templates/
bin/kalite manage retrievecontentpack empty en --foreground --template

release: dist man
ls -l dist
echo "uploading above to PyPi, using twine"
echo "Uploading dist/* to PyPi, using twine"
twine upload -s --sign-with gpg2 dist/*

dist: clean clean-dev-db docs assets
python setup.py sdist --formats=$(format)
sdist: clean docs assets
# Building assets currently creates pyc files in the source dirs,
# so we should delete those...
make clean-pyc
python setup.py sdist --formats=$(format) --static

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

install: clean
Expand Down
Loading

0 comments on commit 6d82587

Please sign in to comment.