Git Product home page Git Product logo

tally-ho's Introduction

Build Status codecov Codacy Badge

Tally-Ho!

Election results data entry and verification software built by Ona Systems and commissioned by the Libyan High National Elections Commission and the United Nations Development Program.

Quick install

Checkout the repos

git clone [email protected]:onaio/tally-ho.git

Make a virtual environment and install requirements

Prerequisites: this assumes you have virtualenvwrapper and PostgreSQL installed.

mkvirtualenv tally --python=python3.9
pip install -r requirements/dev.pip

Install libpq-dev library that contains a minimal set of PostgreSQL_ binaries and headers requried for building 3rd-party applications for PostgreSQL_.

sudo apt-get install libpq-dev

Install memcache

sudo apt-get update && sudo apt-get install -y memcached

Install redis

sudo apt-get install -y redis-server

Make sure you have the latest versions of pip, wheel, and setuptools installed, run

python -m pip install -U pip wheel setuptools

To Enable pre-commit hook checks for development, in your virtual env, run

pre-commit install

Running celery

celery -A tally_ho.celeryapp worker --loglevel=info

Quick start with user demo data

This will remove all data in the database.

To create the database, load demo users, and start the server all in one, run

./scripts/quick_start

If you've aleady setup the server, you can start the server with

python manage.py runserver --settings=tally_ho.settings.dev

Loading tally demo data

TODO: add some demo result forms and candidate lists

Advanced: recreate the database, then load the data and demo users

This will remove all data in the database.

This will only work if you have data files in the folder ./data

The first argument is the database user, the second is the database host IP address, and the third is the settings file. Modify these arguments as needed.

./scripts/reload_all postgres 127.0.0.1 tally_ho.settings.common

Docker Install

If you already have Docker and docker-compose installed on your machine you can quickly have a demo up by changing into the checked out code directory and running:

docker-compose build
docker-compose up

You can now visit the site at 127.0.0.1:8000.

If you want to use Docker to run the site in production you will need to:

  1. modify the docker-compose.yml file to change the NGINX listening port from 8000 to 80,
  2. add the host you are running the site on to a new ALLOWED_HOSTS list in the tally_ho/settings/docker.py file.

Running Tests

run pytest tally_ho

Documentation

Generating Model Graphs

The below assumes you have pip installed requirements/dev.pip and graphviz in your machine.

Generate model graph for all models:

python manage.py graph_models --settings=tally_ho.settings.dev --pydot -a -g -o tally-ho-all-models.png

Generate model graph for app models:

python manage.py graph_models --settings=tally_ho.settings.dev --pydot -a -X GroupObjectPermission,UserObjectPermission,GroupObjectPermissionBase,BaseGenericObjectPermission,UserObjectPermissionBase,BaseObjectPermission,Version,Revision,Pageview,Visitor,Session,AbstractBaseSession,Site,LogEntry,User,Group,AbstractUser,Permission,ContentType,AbstractBaseUser,PermissionsMixin,BaseModel -g -o tally-ho-app-models.png

Demo Users

The create_demo_users command will create demo users for each role with usernames like super_administrator, and password data.

File Uploads

The MAX_FILE_UPLOAD_SIZE variable in tally_ho/settings/common.py file defines the file upload limit which is currently set to 10MB.

News

tally-ho's People

Contributors

codacy-badger avatar faith-mutua avatar johnmwashuma avatar kipsigei avatar lincmba avatar mberg avatar petermuriuki avatar pld avatar ukanga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tally-ho's Issues

Quality Control Form View

For the Quality Control view can we combine the form and the reconciliation section into one screen - like we are doing corrections and data entry

QC of Multi-race ballots only showing one race

For multi-race ballots only the general seems to be showing at QC - see form 220040126

It might just be easier to do what we are doing at data entry and just bung it all onto one screen - reconciliation and results.

Corrections - merge into a single corrections screen

With the corrections screen I am thinking that perhaps we don't split it into two sections anymore (currently it is reconciliation checks and results checks). In the end, all fields must be corrected or it needs to go back. I wonder if this would just be simpler?

Forms with two races - races not seperated

In the case were two races are listed under one ballot (ie there is a 0 racetype and a 2-4 racetype) then the names of the candidates are listed together instead of being seperated.

So if you look at the image below for barcode number 360010147, then you can see there are two 1s, 2 two 2s etc. If you look on form 47, there are two headers above the list of candidates - one for general one for component race (tebu)

image

Intake Re-try

http://libyatally.ona.io/intake/check-center-details

I think there should be an option to try again. Otherwise for the sake of typos or people not reading forms correctly, the forms will have to go though the clearance loop. People should be able to:
a. Accept
b. Name does not match + Code Incorrect - Go back and try again
c. Name does not match + Code Correct - Send to Clearance

Corrections - Incorrect Mis-Match Alert

I have entered two DEs the same but at corrections the reconciliation section says it does not match.

When one clicks into the reconciliation section the records match and there is no option to correct.

110020201
11002

Remove Data entry of Remarks

I think we should not do data entry of the remarks. If we do, it will be nigh impossible for there to be two exactly matching entries, which will mean forms will keep circling the system.

Reconcilliation Section Presentation

We are afraid that if this does not more closely match the layout of the reconciliation section, that people will accidentally misplace numbers - and find it harder to review the forms against the screen.

I think we need to re-arrange things to make them look more like the paper (in this section)

Data Entry 1 and 2 Seperations

At the moment any data entry clerk can enter as data entry 1 or data entry 2. It would be better if users could be assigned to either 1 or 2. This is because we would seek to enforce the separation between data entry 1 and data entry 2 clerks.

While it is less of a concern in this election, the issue is that we would like to prevent collusion between clerks. In theory two persons could decide to changes results - make the same adjustments and these would pass though corrections without being caught - and only have QC as a check.

Error messages on Match - Corrections

We tried to accept this form as matching a couple of times and we are getting this error

barcode number - 354000201

Exception at /corrections/match
Results do not match.
Request Method: POST
Request URL: http://libyatally.ona.io/corrections/match
Django Version: 1.6.1
Exception Type: Exception
Exception Value:
Results do not match.
Exception Location: ./libya_tally/apps/tally/views/corrections.py in post, line 159
Python Executable: /usr/local/bin/uwsgi
Python Version: 2.7.3
Python Path:
['.',
'',
'/var/www/.virtualenvs/tally-system/lib/python2.7',
'/var/www/.virtualenvs/tally-system/lib/python2.7/plat-linux2',
'/var/www/.virtualenvs/tally-system/lib/python2.7/lib-tk',
'/var/www/.virtualenvs/tally-system/lib/python2.7/lib-old',
'/var/www/.virtualenvs/tally-system/lib/python2.7/lib-dynload',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-linux2',
'/usr/lib/python2.7/lib-tk',
'/var/www/.virtualenvs/tally-system/local/lib/python2.7/site-packages']
Server time: Tue, 11 Feb 2014 20:06:23 +0000

'Internal System Error' - With general + component forms

In the case where a form has both general and component forms, it will be in-taken. However when we go to data entry it displays "internal system error". I am assuming this is cause it i having trouble handling the display this type of form

220300729
360050247

Enter Centre Details 400 Error

If you enter a good serial number but a bad/mismatching centre code instead of just being rejected and informed of your mistake you get thrown out to a 400 error.

Corrections - Presenting Old Data

I have entered a form, rejected it at corrections, and then re-entered it (this time with all 1s with the exception of one 2)

When I get to corrections it shows an older set of data instead of that of the most current data entry attempts.

Numbers:
100000016
31001

Hiding Duplicate Fields

Low Priority of course - but is there a way of masking fields the duplicate fields when you are not writing into them

I find that, for example, I copy the barcode number in once, and then when I go to do the - second entry I just copy from what i typed above. Of course, i'm just being lazy but I assume so will be a lot of the staff....

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.