Skip to content

Commit

Permalink
Merge branch 'release/2.0.0-alpha.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
JackMorganNZ committed Jun 21, 2017
2 parents f373696 + 7159c25 commit 318284b
Show file tree
Hide file tree
Showing 1,063 changed files with 43,307 additions and 54 deletions.
19 changes: 19 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[run]
branch = True
source =
config
general
locale
resources
static
templates
topics
utils
omit =
# Omit migration files
*/migrations/*
# Omit database proxy file used with Google Cloud SQL Proxy
csunplugged/config/settings/database_proxy.py

[report]
fail_under=20
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
csunplugged/build/*
csunplugged/temp/*
csunplugged/static/*
csunplugged/node_modules/*
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.md text
*.conf text
*.py text
*.html text
*.css text
*.js text
3 changes: 3 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Please [read our guidelines for contributing](http://cs-unplugged.readthedocs.io/en/latest/getting_started/contributing_guide.html)

In addition to these guidelines, you agree to uphold our [Code of Conduct](http://cs-unplugged.readthedocs.io/en/latest/getting_started/code_of_conduct.html).
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## Description

Clearly and concisely describe the issue or suggestion here:







### Checklist

*Change the space in the box to an `x` for those you have completed. You can also fill these out after creating the issue.*

- [ ] I have linked any relevant existing issues/suggestions in the description above (include `#???` in your description to reference an issue, where `???` is the issue number).

If this is a code related issue, please include the following in your description:

- [ ] Steps to reproduce the behavior
- [ ] The platform(s)/software you are encountering the issue on
- [ ] The behavior you expect to see, and the actual behavior
28 changes: 28 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## Proposed changes

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request:







### Checklist

*Change the space in the box to an `x` for those you have completed.
You can also fill these out after creating the pull request.
If you're unsure about any of them, don't hesitate to ask.
We're here to help!
This is simply a reminder of what we are going to look for before merging your change.*

- [ ] I have read the contribution guidelines.
- [ ] I have linked any relevant existing issues/suggestions in the description above (include `#???` in your description to reference an issue, where `???` is the issue number).
- [ ] The pull request is requesting a merge into the `develop` branch.
- [ ] I have added necessary documentation (if appropriate).
- [ ] If I've added/modified/deleted a third-party system, I've updated the relevant license files.

### Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc.
Feel free to add any images that might be helpful to understand the initial problem/solution.
112 changes: 112 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Ignore app.yaml file that contains passwords, secret keys, etc
app*.yaml
!app-sample.yaml

# Byte-compiled / optimized / DLL files
*__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# dotenv
.env

# virtualenv
.venv/
venv/
docker_venv/
ENV/

# Spyder project settings
.spyderproject

# Rope project settings
.ropeproject

# Installed node modules
node_modules/

# vim files
*.swp
*.swo

# Custom git settings
.gitconfig

# Temporary folder
temp/

# Collected static files folder
staticfiles/
6 changes: 6 additions & 0 deletions .pyup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Settings for pyup bot
# Details here: https://pyup.io/docs/configuration/

branch: develop
label_prs: backend
branch_prefix: pyup/
44 changes: 44 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
sudo: required
services:
- docker
env:
- DOCKER_COMPOSE_VERSION=1.11.2
language: python
python:
- '3.6'
install:
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-engine
- sudo rm /usr/local/bin/docker-compose
- curl -L "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- sudo docker --version
- sudo docker-compose --version
before_script:
- "./csu start"
script:
- "./csu dev test"
- "./csu dev test_backwards"
- "./csu dev test_coverage"
- "./csu dev style"
- "./csu dev docs"
deploy:
- provider: script
script: bash ./infrastructure/dev-deploy/dev-deploy.sh
skip_cleanup: true
on:
branch: develop
- provider: script
script: bash ./infrastructure/prod-deploy/prod-deploy.sh
skip_cleanup: true
on:
branch: master
after_script:
- bash <(curl -s https://codecov.io/bash)
notifications:
email: false
slack:
rooms: deptfunstuff:abJKvzApk5SKtcEyAgtswXAv
on_success: change
on_failure: change
30 changes: 30 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This Dockerfile is based off the Google App Engine Python runtime image
# https://github.com/GoogleCloudPlatform/python-runtime
FROM gcr.io/google-appengine/python

# Add metadata to Docker image
LABEL maintainer="[email protected]"

# Set terminal to be noninteractive
ARG DEBIAN_FRONTEND=noninteractive

ENV DJANGO_PRODUCTION=True

# Install packages, running of Python 3.4.2
RUN apt-get update && apt-get install -y \
python3 \
python3-dev \
python3-pip
RUN apt-get clean && rm /var/lib/apt/lists/*_*

EXPOSE 8080
RUN mkdir /csunplugged
WORKDIR /csunplugged

# Copy and install Python dependencies
RUN python -m virtualenv --python=python3.4 /docker_venv
COPY requirements /requirements
RUN /docker_venv/bin/pip3 install -r /requirements/production.txt

ADD ./csunplugged /csunplugged/
CMD /docker_venv/bin/gunicorn -c gunicorn.conf.py -b :8080 config.wsgi
48 changes: 48 additions & 0 deletions Dockerfile-local
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This Dockerfile is based off the Google App Engine Python runtime image
# https://github.com/GoogleCloudPlatform/python-runtime
FROM gcr.io/google-appengine/python

# Add metadata to Docker image
LABEL maintainer="[email protected]"

# Set terminal to be noninteractive
ARG DEBIAN_FRONTEND=noninteractive

ENV DJANGO_PRODUCTION=False

# Install packages (including Weasyprint dependencies), running of Python 3.4.2
RUN apt-get update && apt-get install -y \
python3 \
python3-dev \
python3-pip \
libffi-dev \
libcairo2-dev \
python-dev \
python-pip \
python-lxml \
python-cffi \
libpango1.0-0 \
libgdk-pixbuf2.0-0 \
shared-mime-info
RUN apt-get clean && rm /var/lib/apt/lists/*_*

EXPOSE 8080

# Copy and create virtual environment
COPY requirements /requirements
RUN python -m virtualenv --python=python3.4 /docker_venv

# Install Weasyprint dependencies
RUN /docker_venv/bin/pip3 install -U pip setuptools
RUN /docker_venv/bin/pip3 install packaging==16.8
RUN /docker_venv/bin/pip3 install appdirs==1.4.3
RUN /docker_venv/bin/pip3 install html5lib==1.0b9
RUN /docker_venv/bin/pip3 install six==1.10.0
RUN /docker_venv/bin/pip3 install weasyprint==0.36

# Install dependencies
RUN /docker_venv/bin/pip3 install -r /requirements/local.txt

RUN mkdir /cs-unplugged/
RUN mkdir /cs-unplugged/csunplugged/
WORKDIR /cs-unplugged/csunplugged/
21 changes: 21 additions & 0 deletions LICENCE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2016-2017 University of Canterbury Computer Science Education Research Group

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 318284b

Please sign in to comment.