Skip to content

Commit a7c7b09

Browse files
committed
Initial implementation of models and tasks
1 parent f965f20 commit a7c7b09

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+3804
-72
lines changed

.coveragerc

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[run]
2+
branch = True
3+
data_file = .coverage
4+
source=user_tasks
5+
omit =
6+
test_settings
7+
*migrations*
8+
*admin.py
9+
*static*
10+
*templates*

.github/ISSUE_TEMPLATE.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
* django-user-tasks version:
2+
* Django version:
3+
* Python version:
4+
* Operating System:
5+
6+
### Description
7+
8+
Describe what you were trying to get done.
9+
Tell us what happened, what went wrong, and what you expected to happen.
10+
11+
### What I Did
12+
13+
```
14+
Paste the command(s) you ran and the output.
15+
If there was a crash, please include the traceback here.
16+
```

.gitignore

+52-71
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,70 @@
1-
# Byte-compiled / optimized / DLL files
2-
__pycache__/
31
*.py[cod]
4-
*$py.class
2+
__pycache__
53

64
# C extensions
75
*.so
86

9-
# Distribution / packaging
10-
.Python
11-
env/
12-
build/
13-
develop-eggs/
14-
dist/
15-
downloads/
16-
eggs/
17-
.eggs/
18-
lib/
19-
lib64/
20-
parts/
21-
sdist/
22-
var/
23-
*.egg-info/
24-
.installed.cfg
7+
# Packages
258
*.egg
26-
27-
# PyInstaller
28-
# Usually these files are written by a python script from a template
29-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
30-
*.manifest
31-
*.spec
9+
*.egg-info
10+
dist
11+
build
12+
eggs
13+
parts
14+
bin
15+
var
16+
sdist
17+
develop-eggs
18+
.installed.cfg
19+
lib
20+
lib64
3221

3322
# Installer logs
3423
pip-log.txt
35-
pip-delete-this-directory.txt
3624

3725
# Unit test / coverage reports
38-
htmlcov/
39-
.tox/
26+
.cache/
4027
.coverage
4128
.coverage.*
42-
.cache
43-
nosetests.xml
29+
.tox
4430
coverage.xml
45-
*,cover
46-
.hypothesis/
31+
htmlcov/
4732

4833
# Translations
4934
*.mo
50-
*.pot
51-
52-
# Django stuff:
53-
*.log
54-
local_settings.py
55-
56-
# Flask stuff:
57-
instance/
58-
.webassets-cache
59-
60-
# Scrapy stuff:
61-
.scrapy
62-
63-
# Sphinx documentation
64-
docs/_build/
65-
66-
# PyBuilder
67-
target/
68-
69-
# IPython Notebook
70-
.ipynb_checkpoints
71-
72-
# pyenv
73-
.python-version
74-
75-
# celery beat schedule file
76-
celerybeat-schedule
77-
78-
# dotenv
79-
.env
80-
81-
# virtualenv
82-
venv/
83-
ENV/
84-
85-
# Spyder project settings
86-
.spyderproject
8735

88-
# Rope project settings
89-
.ropeproject
36+
# IDEs and text editors
37+
*~
38+
*.swp
39+
.idea/
40+
.project
41+
.pycharm_helpers/
42+
.pydevproject
43+
44+
# The Silver Searcher
45+
.agignore
46+
47+
# OS X artifacts
48+
*.DS_Store
49+
50+
# Logging
51+
log/
52+
logs/
53+
chromedriver.log
54+
ghostdriver.log
55+
56+
# Complexity
57+
output/*.html
58+
output/*/index.html
59+
60+
# Sphinx
61+
docs/_build
62+
docs/modules.rst
63+
docs/user_tasks.rst
64+
65+
# Private requirements
66+
requirements/private.in
67+
requirements/private.txt
68+
69+
# tox environment temporary artifacts
70+
tests/__init__.py

.travis.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Config file for automatic testing at travis-ci.org
2+
3+
language: python
4+
5+
python:
6+
- 2.7
7+
- 3.5
8+
9+
env:
10+
- TOXENV=django18
11+
- TOXENV=django19
12+
- TOXENV=django110
13+
14+
matrix:
15+
include:
16+
- python: 3.5
17+
env: TOXENV=quality
18+
- python: 3.5
19+
env: TOXENV=docs
20+
21+
cache:
22+
- pip
23+
24+
install:
25+
- pip install -r requirements/travis.txt
26+
27+
script:
28+
- tox
29+
30+
after_success:
31+
- codecov
32+
33+
# Set password via "travis encrypt --add deploy.password"; for details, see
34+
# https://docs.travis-ci.com/user/deployment/pypi
35+
deploy:
36+
provider: pypi
37+
user: edx
38+
distributions: sdist bdist_wheel
39+
on:
40+
tags: true
41+
condition: '$TOXENV = py35-django19'

.tx/config

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[main]
2+
host = https://www.transifex.com
3+
4+
[edx-platform.django-user-tasks]
5+
file_filter = user_tasks/conf/locale/<lang>/LC_MESSAGES/django.po
6+
source_file = user_tasks/conf/locale/en/LC_MESSAGES/django.po
7+
source_lang = en
8+
type = PO
9+
10+
[edx-platform.django-user-tasks-js]
11+
file_filter = user_tasks/conf/locale/<lang>/LC_MESSAGES/djangojs.po
12+
source_file = user_tasks/conf/locale/en/LC_MESSAGES/djangojs.po
13+
source_lang = en
14+
type = PO

AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Jeremy Bowman <[email protected]>

CHANGELOG.rst

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Change Log
2+
----------
3+
4+
..
5+
All enhancements and patches to cookiecutter-django-app will be documented
6+
in this file. It adheres to the structure of http://keepachangelog.com/ ,
7+
but in reStructuredText instead of Markdown (for ease of incorporation into
8+
Sphinx documentation and the PyPI description).
9+
10+
This project adheres to Semantic Versioning (http://semver.org/).
11+
12+
.. There should always be an "Unreleased" section for changes pending release.
13+
14+
Unreleased
15+
~~~~~~~~~~
16+
17+
Added
18+
_____
19+
20+
* First release on PyPI.

LICENSE renamed to LICENSE.txt

File renamed without changes.

MANIFEST.in

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
include AUTHORS
2+
include CHANGELOG.rst
3+
include CONTRIBUTING.rst
4+
include LICENSE.txt
5+
include README.rst
6+
recursive-include user_tasks *.html *.png *.gif *js *.css *jpg *jpeg *svg *py

Makefile

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
.PHONY: clean compile_translations coverage docs dummy_translations extract_translations \
2+
fake_translations help pull_translations push_translations quality requirements test test-all validate
3+
4+
.DEFAULT_GOAL := help
5+
6+
define BROWSER_PYSCRIPT
7+
import os, webbrowser, sys
8+
try:
9+
from urllib import pathname2url
10+
except:
11+
from urllib.request import pathname2url
12+
13+
webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1])))
14+
endef
15+
export BROWSER_PYSCRIPT
16+
BROWSER := python -c "$$BROWSER_PYSCRIPT"
17+
18+
help: ## display this help message
19+
@echo "Please use \`make <target>' where <target> is one of"
20+
@perl -nle'print $& if m{^[a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m %-25s\033[0m %s\n", $$1, $$2}'
21+
22+
clean: ## remove generated byte code, coverage reports, and build artifacts
23+
find . -name '*.pyc' -exec rm -f {} +
24+
find . -name '*.pyo' -exec rm -f {} +
25+
find . -name '*~' -exec rm -f {} +
26+
coverage erase
27+
rm -fr build/
28+
rm -fr dist/
29+
rm -fr *.egg-info
30+
31+
compile_translations: ## compile translation files, outputting .po files for each supported language
32+
./manage.py compilemessages
33+
34+
coverage: clean ## generate and view HTML coverage report
35+
py.test --cov-report html
36+
$(BROWSER) htmlcov/index.html
37+
38+
docs: ## generate Sphinx HTML documentation, including API docs
39+
tox -e docs
40+
$(BROWSER) docs/_build/html/index.html
41+
42+
dummy_translations: ## generate dummy translation (.po) files
43+
cd user_tasks && i18n_tool dummy
44+
45+
extract_translations: ## extract strings to be translated, outputting .mo files
46+
./manage.py makemessages -l en -v1 -d django
47+
./manage.py makemessages -l en -v1 -d djangojs
48+
49+
fake_translations: extract_translations dummy_translations compile_translations ## generate and compile dummy translation files
50+
51+
pip-compile: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
52+
pip install -q pip-tools
53+
pip-compile --upgrade -o requirements/base.txt requirements/base.in
54+
pip-compile --upgrade -o requirements/dev.txt requirements/dev.in
55+
pip-compile --upgrade -o requirements/doc.txt requirements/doc.in
56+
pip-compile --upgrade -o requirements/quality.txt requirements/quality.in
57+
pip-compile --upgrade -o requirements/test.txt requirements/base.in requirements/test.in
58+
pip-compile --upgrade -o requirements/travis.txt requirements/travis.in
59+
# Let tox control the Django version for tests
60+
sed '/Django==/d' requirements/test.txt > requirements/test.tmp
61+
mv requirements/test.tmp requirements/test.txt
62+
63+
pull_translations: ## pull translations from Transifex
64+
tx pull -a
65+
66+
push_translations: ## push source translation files (.po) from Transifex
67+
tx push -s
68+
69+
quality: ## check coding style with pycodestyle and pylint
70+
tox -e quality
71+
72+
requirements: ## install development environment requirements
73+
pip install -qr requirements/dev.txt --exists-action w
74+
pip-sync requirements/base.txt requirements/dev.txt requirements/private.* requirements/test.txt
75+
76+
test: clean ## run tests in the current virtualenv
77+
py.test
78+
79+
test-all: ## run tests on every supported Python/Django combination
80+
tox -e quality
81+
tox
82+
83+
validate: quality test ## run tests and quality checks

README.md

-1
This file was deleted.

0 commit comments

Comments
 (0)