Skip to content

Commit

Permalink
Merge branch 'release/v1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
philipbelesky committed Aug 16, 2016
2 parents e943692 + cd81dfc commit 0501013
Show file tree
Hide file tree
Showing 697 changed files with 32,525 additions and 44,697 deletions.
22 changes: 22 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[flake8]
# Idea is to remove these over time
#
# E203 = whitespace before ':'
# E221 = multiple spaces before operator
# E241 = multiple spaces after ','
# E231 = missing whitespace after ','

# E261 = at least two spaces before inline comment
# E126 = continuation line over-indented for hanging indent
# E128 = continuation line under-indented for visual indent
# I100 = Imported names are in the wrong order.

# Q000 = double quotes

ignore = E126,E128,E221,E226,E261,E203,E231,E241,Q000,I100

max-line-length = 200

exclude = docs, migrations, node_modules, bower_components, venv, */__init__.py

import-order-style = google
14 changes: 7 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Django Related
local_settings.py
tabbycat/local_settings.py
.gitmodules/
__pycache__/

# Compilation
staticfiles/
static/css/
static/js/
static/fonts/
tabbycat/staticfiles/
tabbycat/static/css/
tabbycat/static/js/
tabbycat/static/fonts/

# Dependencies
node_modules
Expand All @@ -22,10 +22,10 @@ data/*
!data/sandbox/
!data/test/
!data/presets/
!data/fixtues/
!data/fixtures/

# Docs
site/
docs/site/

# Tags
tags
Expand Down
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ services:
install:
- pip install -r requirements_common.txt
script:
- dj test -v 2
- flake8 tabbycat
- cd tabbycat && dj test -v 2
26 changes: 26 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,32 @@
Change Log
==========

1.0.0
-----
Redesigned and redeveloped adjudicator allocation page
- Redesigned interface, featuring clearer displays of conflict and diversity information
- Changes to importances and panels are now automatically saved
- Added debate "liveness" to help identify critical rooms—many thanks to Thevesh Theva
- Panel score calculations performed live to show strength of voting majorities
New features
- Added record pages for teams and adjudicators
- Added a diversity tab to display demographic information about participants and scoring
Significant general improvements
- Shifted most table rendering to Vue.js to improve performance and design
- Drastically reduced number of SQL queries in large tables, *e.g.* draw, results, tab
Break round management
- Completed support for break round draws
- Simplified procedure for adding remarks to teams and updating break
- Reworked break generation code to be class-based, to improve future extensibility
- Added support for break qualification rules: AIDA Australs, AIDA Easters, WADL
Feedback
- Changed Boolean fields in AdjudicatorFeedbackQuestion to reflect what they actually do
- Changed "panellist feedback enabled" option to "feedback paths", a choice of three options
- Dropped "/t/" from tournament URLs and moved "/admin/" to "/database/", with 301 redirects
- Added basic code linting to the continuous integration tests
- Many other small bug fixes, refactors, optimisations, and documentation updates


0.9.0
-----
- Added a beta implementation of the break rounds workflow
Expand Down
33 changes: 18 additions & 15 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@
Contributing
============

.. important:: We are using the `git-flow workflow <http://danielkummer.github.io/git-flow-cheatsheet/>`_, so please submit any pull requests against the **develop branch** (and not master).

Contributions are welcome, and are greatly appreciated! Every little bit helps, and credit will be given. `Join our Facebook group <https://www.facebook.com/groups/tabbycat.debate/>`_.
Contributions are welcome, and are greatly appreciated! Every little bit helps, and credit will be given. `Join our Facebook group <https://www.facebook.com/groups/tabbycat.debate/>`_ if you have any questions about how to get started contributing.

Bug reports
===========

Please report bugs by opening a new issue in our `GitHub repository <https://github.com/czlee/tabbycat/issues>`_.

It is most helpful if you can include:
Please report bugs by opening a new issue in our `GitHub repository <https://github.com/czlee/tabbycat/issues>`_. It is most helpful if you can include:

- How Tabbycat was installed (on Heroku, locally on OS X, `etc.`)
- Any details about your tournament and setup that might be helpful in troubleshooting
Expand All @@ -20,10 +16,20 @@ It is most helpful if you can include:
Getting started
===============

- Insert general setup instructions
- Insert instructions on how to make a feature/bug branch
- Maybe insert instructions on how to run tests / flake8
- Insert pull request checklist/guidelines
.. important:: We are using the `git-flow workflow <http://danielkummer.github.io/git-flow-cheatsheet/>`_, so please submit any pull requests against the **develop branch** (and not master).

- Generally we prefer that features and bug fixes are submitted as pull requests on their own branch (as described in the git-flow process)
- We use Django's testing tools — it would be great if new features came with unit tests
- TODO: more detail on tests and pull request checklist/guidelines

Style guide
===========

We use `flake8 <http://flake8.readthedocs.io>`_ to check for a non-strict series of style rules. Warnings will trigger a Travis CI build to fail. The entire codebase can be checked by using::

$ flake8 .

While in the base directory

Semantic versioning convention
==============================
Expand All @@ -48,14 +54,11 @@ Documentation

Documentation is created using `Sphinx <http://sphinx-doc.org/>`_ and hosted at `Read The Docs <https://readthedocs.org>`_. Pushes to ``develop`` will update the *latest* documentation set, while pushes to ``master`` will update the *stable* documentation set.

Previewing Locally
------------------

Install the docs-specific requirements (from the base folder)::
To preview the documentation locally, install the docs-specific requirements (from the base folder)::

$ pip install -r 'docs/requirements.txt'

Start the server::
Then start the server::

$ sphinx-autobuild docs docs/_build/html --port 7999

Expand Down
168 changes: 114 additions & 54 deletions Gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,83 +1,143 @@
var gulp = require('gulp');
var gutil = require('gulp-util'); // Error logging + NoOop

// Compilation
var sass = require('gulp-sass');
var rename = require('gulp-rename');
var concat = require('gulp-concat');

// Compression
var minifyCSS = require('gulp-minify-css');
var cleanCSS = require('gulp-clean-css');
var uglify = require('gulp-uglify');

// Browserify
var browserify = require('browserify'); // Bundling modules
var babelify = require('babelify'); // Use ES syntax
var vueify = require('vueify');
var source = require('vinyl-source-stream'); // Use browserify in gulp
var es = require('event-stream'); // Browserify multiple files at once
var streamify = require('gulp-streamify');

// Debug & Config
var livereload = require('gulp-livereload');
var outputDir = 'tabbycat/static/';
var isProduction = (gutil.env.development === true) ? false: true;
if (isProduction === true) {
console.log('GULP: Building for production');
} else if (isProduction === false) {
console.log('GULP: Building for development');
}

// Tasks
gulp.task('fonts-compile', function() {
gulp.src([
'bower_components/**/*.eot',
'bower_components/**/*.svg',
'bower_components/**/*.ttf',
'bower_components/**/*.woff',
'bower_components/**/*.woff2',
'node_modules/bootstrap-sass/assets/fonts/**/*.eot',
'node_modules/bootstrap-sass/assets/fonts/**/*.svg',
'node_modules/bootstrap-sass/assets/fonts/**/*.ttf',
'node_modules/bootstrap-sass/assets/fonts/**/*.woff',
'node_modules/bootstrap-sass/assets/fonts/**/*.woff2',
'node_modules/lato-font/fonts/**/*.eot',
'node_modules/lato-font/fonts/**/*.svg',
'node_modules/lato-font/fonts/**/*.ttf',
'node_modules/lato-font/fonts/**/*.woff',
'node_modules/lato-font/fonts/**/*.woff2',
])
.pipe(rename({dirname: ''})) // Remove folder structure
.pipe(gulp.dest('static/fonts/vendor/'));
.pipe(gulp.dest(outputDir + 'fonts/'));
});

gulp.task('styles-compile', function() {
gulp.src(['templates/scss/printables.scss', 'templates/scss/style.scss'])
gulp.src([
'tabbycat/templates/scss/allocation-old.scss',
'tabbycat/templates/scss/printables.scss',
'tabbycat/templates/scss/style.scss'])
.pipe(sass().on('error', sass.logError))
.pipe(minifyCSS())
.pipe(rename(function (path) {
path.basename += ".min";
}))
.pipe(gulp.dest('static/css/'));
// '*' compatability = IE9+
.pipe(isProduction ? cleanCSS({compatibility: '*'}) : gutil.noop())
.pipe(gulp.dest(outputDir + '/css/'))
.pipe(isProduction ? gutil.noop() : livereload());
});

// Creates task for collecting dependencies
gulp.task('js-compile', function() {
gulp.src(['templates/js/*.js'])
.pipe(uglify())
.pipe(rename(function (path) {
path.basename += ".min";
}))
.pipe(rename({dirname: ''})) // Remove folder structure
.pipe(gulp.dest('static/js/'));
gulp.task("js-vendor-compile", function() {
gulp.src([
'node_modules/jquery/dist/jquery.js', // For Debug Toolbar
'node_modules/datatables.net/js/jquery.dataTables.js', // Deprecate,
'node_modules/jquery-validation/dist/jquery.validate.js', // Deprecate,
'tabbycat/templates/js-vendor/jquery-ui.min.js', // Deprecate,
])
.pipe(isProduction ? uglify() : gutil.noop()) // Doesnt crash
.pipe(gulp.dest(outputDir + '/js/vendor/'));
});

// Creates task for collecting dependencies
gulp.task('js-main-vendor-compile', function() {
gulp.src(['bower_components/jquery/dist/jquery.js',
'bower_components/bootstrap-sass/assets/javascripts/bootstrap.js',
'templates/js/vendor/jquery.dataTables.min.js',
'templates/js/vendor/fixed-header.js',
])
.pipe(concat('vendor.js'))
.pipe(uglify())
.pipe(rename(function (path) {
path.basename += ".min";
}))
.pipe(rename({dirname: ''})) // Remove folder structure
.pipe(gulp.dest('static/js/vendor/'));
gulp.task("js-compile", function() {
gulp.src([
'tabbycat/templates/js-standalones/*.js',
])
// Can't run uglify() until django logic is out of standalone js files
// .pipe(isProduction ? uglify() : gutil.noop())
.pipe(gulp.dest(outputDir + '/js/'))
.pipe(isProduction ? gutil.noop() : livereload());
});

// Creates task for collecting dependencies
gulp.task('js-alt-vendor-compile', function() {
gulp.src(['bower_components/jquery/dist/jquery.min.js', // Redundant but needed for debug toolbar
'bower_components/d3/d3.min.js',
'bower_components/jquery-ui/jquery-ui.min.js',
'bower_components/jquery-validation/dist/jquery.validate.min.js',
'bower_components/vue/dist/vue.min.js',
'bower_components/vue/dist/vue.js', // For when debug is on
])
.pipe(uglify())
.pipe(rename({dirname: ''})) // Remove folder structure
.pipe(gulp.dest('static/js/vendor/'));
gulp.task("js-browserify", function() {
// With thanks to https://fettblog.eu/gulp-browserify-multiple-bundles/
// We define our input files, which we want to have bundled
var files = [
'tabbycat/templates/js-bundles/public.js',
'tabbycat/templates/js-bundles/admin.js'
];
// map them to our stream function
var tasks = files.map(function(entry) {
return browserify({ entries: [entry] })
.transform(vueify)
.on('error', gutil.log)
.transform([babelify, {
presets: ["es2015"],
plugins: ['transform-runtime']
}])
.on('error', gutil.log)
.bundle().on('error', gutil.log)
.on('error', function() {
gutil.log
this.emit('end');
})
.pipe(source(entry))
.on('error', gutil.log)
.pipe(isProduction ? streamify(uglify()) : gutil.noop())
.on('error', gutil.log)
.pipe(rename({
extname: '.bundle.js',
dirname: ''
}))
.pipe(gulp.dest(outputDir + '/js/'));
// .pipe(isProduction ? gutil.noop() : livereload());
// TODO: get proper hot reloading going?
});
// create a merged stream
return es.merge.apply(null, tasks);
});

// Automatically build and watch the CSS folder for when a file changes
gulp.task('default', ['build'], function() {
gulp.watch('templates/scss/**/*.scss', ['styles-compile']);
gulp.watch('templates/js/**/*.js', ['js-compress']);
gulp.task("html-reload", function() {
return gulp.src('')
.pipe(livereload());
});

// Build task for production
gulp.task('build', ['fonts-compile', 'styles-compile', 'js-compile', 'js-main-vendor-compile', 'js-alt-vendor-compile' ]);
// Runs with --production if debug is false or there's no local settings
gulp.task('build', [
'fonts-compile',
'styles-compile',
'js-vendor-compile',
'js-compile',
'js-browserify',
]);

// Runs when debug is True and when runserver/collectstatic is called
// Watch the CSS/JS for changes and copy over to static AND static files when done
gulp.task('watch', ['build'], function() {
livereload.listen();
gulp.watch('tabbycat/templates/scss/**/*.scss', ['styles-compile']);
gulp.watch('tabbycat/templates/js-standalones/*.js', ['js-compile']);
gulp.watch('tabbycat/templates/js-bundles/*.js', ['js-browserify']);
gulp.watch('tabbycat/templates/**/*.vue', ['js-browserify']);
gulp.watch('tabbycat/**/*.html', ['html-reload']);
});
5 changes: 3 additions & 2 deletions Procfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# production
web: waitress-serve --port=$PORT wsgi:application
web: sh -c 'cd ./tabbycat/ && waitress-serve --port=$PORT wsgi:application'

# debug
#web: waitress-serve --port=$PORT --expose-tracebacks wsgi:application
web: sh -c 'cd tabbycat && waitress-serve --port=$PORT --expose-tracebacks wsgi:application'
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Tabbycat

[![Docs](https://readthedocs.org/projects/tabbycat/badge/?version=latest)](http://tabbycat.readthedocs.io/en/latest/) [![Docs](https://readthedocs.org/projects/tabbycat/badge/?version=stable)](http://tabbycat.readthedocs.io/en/stable/) [![Build Status](https://travis-ci.org/czlee/tabbycat.svg?branch=develop)](https://travis-ci.org/czlee/tabbycat) [![Dependency Status](https://www.versioneye.com/user/projects/574bd0dace8d0e00473733b5/badge.svg?style=flat)](https://www.versioneye.com/user/projects/574bd0dace8d0e00473733b5)
[![Docs](https://readthedocs.org/projects/tabbycat/badge/?version=latest)](http://tabbycat.readthedocs.io/en/latest/) [![Docs](https://readthedocs.org/projects/tabbycat/badge/?version=stable)](http://tabbycat.readthedocs.io/en/stable/) [![Build Status](https://travis-ci.org/czlee/tabbycat.svg?branch=develop)](https://travis-ci.org/czlee/tabbycat) [![Dependency Status](https://gemnasium.com/badges/github.com/czlee/tabbycat.svg)](https://gemnasium.com/github.com/czlee/tabbycat)

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)

Tabbycat is a draw tabulation system for 3 vs 3 debating tournaments. It was used at Auckland Australs 2010, [Victoria Australs 2012](https://www.facebook.com/Australs2012), [Otago Australs 2014](http://australs2014.herokuapp.com), [Daejeon Australs 2015](http://australs2015.herokuapp.com) and [many other tournaments of all sizes](http://tabbycat.readthedocs.io/en/stable/about/tournament-history.html).
Tabbycat is a draw tabulation system for 3 vs 3 debating tournaments. It was used at Australs in Auckland 2010, [Wellington 2012](https://www.facebook.com/Australs2012), [Dunedin 2014](http://australs2014.herokuapp.com), [Daejeon 2015](http://australs2015.herokuapp.com) and [Perth 2016](http://australs2016.herokuapp.com), as well as [many other tournaments of all sizes](http://tabbycat.readthedocs.io/en/stable/about/tournament-history.html).

Our **demo site** is at [tabbycatdebate.herokuapp.com](http://tabbycatdebate.herokuapp.com/). It's normally up, but its form will vary from time to time as we set up new feature demos for people. If it's down and you'd like to see it, or if you want to play with it as if you were running a tournament, [contact us](#authors-and-contacts). To see a post-tournament website, have a look at the [Daejeon Australs 2015 tab website](http://australs2015.herokuapp.com).
Our **demo site** is at [tabbycatdebate.herokuapp.com](http://tabbycatdebate.herokuapp.com/). It's normally up, but its form will vary from time to time as we set up new feature demos for people. If it's down and you'd like to see it, or if you want to play with it as if you were running a tournament, [contact us](#authors-and-contacts). To see a post-tournament website, have a look at the [WAustrals 2016 tab website](http://australs2016.herokuapp.com).

## Features

Expand Down
7 changes: 0 additions & 7 deletions actionlog/urls.py

This file was deleted.

Loading

0 comments on commit 0501013

Please sign in to comment.