Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
7ab2e49
Feature. Implementado def VotingTally
josregmej Dec 31, 2020
79e5e66
Feature: Añadida la creación de fichero tally.txt
josregmej Jan 8, 2021
0c8f46d
Fix: Corregido error provocado por un import
josregmej Jan 8, 2021
704c858
Feature: Implementada la creacion de un zip con el tally
josregmej Jan 10, 2021
b46b24c
Merge pull request #4 from RioTinto-Votaciones/featureOrden
josregmej Jan 12, 2021
791cd40
Merge branch 'develop' into almacenar-tally
josregmej Jan 12, 2021
be66fa9
Merge pull request #5 from RioTinto-Votaciones/almacenar-tally
josregmej Jan 12, 2021
27e6e1a
Merge pull request #6 from RioTinto-Votaciones/featureOrden
josregmej Jan 12, 2021
c668bc9
Test: Creado test de votación con url ya existente; #19
franchesco98 Jan 13, 2021
a8afa91
Test: Creado metodo y test para que haga una prueba con 10 voters
josregmej Jan 13, 2021
6b162c4
Test: modificado .travis.yml
jailucloz Jan 14, 2021
b525d5d
fix: modificado .travis.yml para lanzar en ramas master y develop
jailucloz Jan 14, 2021
74db7eb
Merge pull request #8 from RioTinto-Votaciones/travisCI
jailucloz Jan 14, 2021
ddaafd3
Test: Se han creado 2 nuevas pruebas
josregmej Jan 15, 2021
7d79794
Doc: modificacion del badge
jailucloz Jan 15, 2021
5eec377
Fix: añadido local_settings.travis.py
jailucloz Jan 15, 2021
155831e
Fix: arreglo para despliegue en travis.yml
jailucloz Jan 15, 2021
59b9554
Test Creado test de votación cuya URL tiene un espacio en blanco; #19
franchesco98 Jan 15, 2021
d9a6bd4
Fix: añadido makemigrations a travis.yml
jailucloz Jan 15, 2021
1793aa5
Fix: cambios en Dockerfile para apuntar a nuestro repo
jailucloz Jan 15, 2021
22d69ec
Fix: cambios varios para despliegue en Heroku
jailucloz Jan 15, 2021
273a782
Fix: modificado .gitignore para poder trackear local_settings.py
jailucloz Jan 16, 2021
dbd98ba
Fix: añadido local_settings.py
jailucloz Jan 16, 2021
dee4062
Fix: añadido ficheros para despliegue en Heroku
jailucloz Jan 16, 2021
5550dbb
Fix: cambiada version de python a 3.7.1
jailucloz Jan 16, 2021
7f33149
Fix: cambiada version de python a 3.7.9 en runtime.txt
jailucloz Jan 16, 2021
312216a
Fix: añadido array APIS vacio
jailucloz Jan 16, 2021
0fa9bd5
Fix: runtime cambiado a version python 3.7.5
jailucloz Jan 16, 2021
fb52ca2
Test: Se han creado varias pruebas nuevas
josregmej Jan 17, 2021
be05d09
Fix: correción en order question
lizesqsaa Jan 17, 2021
ab01959
Merge pull request #11 from RioTinto-Votaciones/featureOrden
lizesqsaa Jan 17, 2021
6724359
Merge pull request #12 from RioTinto-Votaciones/Pruebas-Fran
lizesqsaa Jan 17, 2021
55d4925
Merge pull request #13 from RioTinto-Votaciones/Pruebas-Javier
lizesqsaa Jan 17, 2021
bea68f3
Merge branch 'master' into develop
josregmej Jan 17, 2021
2ad19eb
Merge pull request #9 from RioTinto-Votaciones/develop
josregmej Jan 17, 2021
adddb92
Fix: Borrados archivos tally autogenerados al hacer recuentos
franchesco98 Jan 17, 2021
d5f43aa
Fix: arreglo mala identación en el local_settings.py
franchesco98 Jan 17, 2021
3a2c761
Fix: arreglado error con las migraciones de django
franchesco98 Jan 17, 2021
27d02e5
Feature: Añadidas las preguntas 'Yes or No' al crear una votación
franchesco98 Jan 17, 2021
be82c68
Fix: Solucionado error url al editar una votación
franchesco98 Jan 17, 2021
63747b2
Feat: Despliegue en docker
franchesco98 Jan 17, 2021
92cb6df
Fix: arreglado fallo requirements.txt Docker
franchesco98 Jan 17, 2021
4c81f3e
Fix: arreglado error requirements.txt not found
franchesco98 Jan 17, 2021
4b44ad3
Fix: cambiado ADD a COPY en Dockerfile para el requirements.txt
franchesco98 Jan 17, 2021
5c5c9d1
Test: Creado test de vista crear votación con URL
franchesco98 Feb 6, 2021
05a5ca3
Test: Creado test de vista crear votación sin URL
franchesco98 Feb 6, 2021
6b21dbd
Test: Código de los test de vista refactorizado
franchesco98 Feb 6, 2021
5fdc9f9
Test: Creado test de vista crear votación con URL ya existente
franchesco98 Feb 6, 2021
de77139
Test: Creación de una votación sin URL
franchesco98 Feb 7, 2021
d08a6ba
Merge pull request #14 from RioTinto-Votaciones/master
franchesco98 Feb 9, 2021
899749f
Merge pull request #15 from RioTinto-Votaciones/Pruebas-Javier
franchesco98 Feb 9, 2021
13122ad
lizesqsaa Feb 9, 2021
094300e
Test: tests de order question.
lizesqsaa Feb 9, 2021
70ed016
Fix: test order questions
lizesqsaa Feb 9, 2021
59924ec
Test: test unitario create question whitout description.
lizesqsaa Feb 10, 2021
5510c1d
Test: test unitario create order question
lizesqsaa Feb 10, 2021
df5b82b
Test: test unitario create voting whit order question.
lizesqsaa Feb 10, 2021
800b576
Fix: delete tests.py
lizesqsaa Feb 10, 2021
1bcbc38
Fix: Arreglar errores en test unitarios de order question.
lizesqsaa Feb 10, 2021
cd064b4
Fix: correccion test n order questi
lizesqsaa Feb 10, 2021
5c8724c
Test: create test voting con yes or no question.
lizesqsaa Feb 10, 2021
3aec566
Test: test create yesornoquestion success
lizesqsaa Feb 10, 2021
761289f
Test: test create yes or no question succes and error.
lizesqsaa Feb 10, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ coverage.xml

# Django stuff:
*.log
local_settings.py
#local_settings.py

# Flask stuff:
instance/
Expand Down
41 changes: 24 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
dist: xenial

services:
- postgresql
addons:
postgresql: "9.4"
before_script:
- psql -U postgres -c "create user decide password 'decide'"
- psql -U postgres -c "create database test_decide owner decide"
- psql -U postgres -c "ALTER USER decide CREATEDB"
language: python
python:
- "3.6"
- '3.6'
branches:
only:
- master
- develop
services:
- postgresql
env:
- DJANGO=2.0 DB=postgres
global:
- PGPORT=5432
before_install:
- cd decide
install:
- pip install -r requirements.txt
- pip install codacy-coverage
- pip install -r ../requirements.txt
before_script:
- cp local_settings.travis.py local_settings.py
- psql -U postgres -c "create user decide password 'decide'"
- psql -U postgres -c "create database test_decide owner decide"
- psql -U postgres -c "ALTER USER decide CREATEDB"
- python manage.py makemigrations
- python manage.py migrate
script:
- cd decide
- coverage run --branch --source=. ./manage.py test --keepdb --with-xunit
- coverage xml
- python-codacy-coverage -r coverage.xml
- python manage.py test
addons:
postgresql: '9.6'
4 changes: 4 additions & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
% prepara el repositorio para su despliegue.
release: sh -c 'cd decide && python manage.py migrate'
% especifica el comando para lanzar Decide
web: sh -c 'cd decide && gunicorn decide.wsgi --log-file -'
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.com/wadobo/decide.svg?branch=master)](https://travis-ci.com/wadobo/decide) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/94a85eaa0e974c71af6899ea3b0d27e0)](https://www.codacy.com/app/Wadobo/decide?utm_source=github.com&utm_medium=referral&utm_content=wadobo/decide&utm_campaign=Badge_Grade) [![Codacy Badge](https://api.codacy.com/project/badge/Coverage/94a85eaa0e974c71af6899ea3b0d27e0)](https://www.codacy.com/app/Wadobo/decide?utm_source=github.com&utm_medium=referral&utm_content=wadobo/decide&utm_campaign=Badge_Coverage)
[![Build Status](https://travis-ci.com/RioTinto-Votaciones/decide.svg?branch=develop)](https://travis-ci.com/RioTinto-Votaciones/decide)

Plataforma voto electrónico educativa pro
=====================================
Expand Down
11 changes: 6 additions & 5 deletions decide/base/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Generated by Django 2.0 on 2018-06-05 08:42
# Generated by Django 2.0 on 2021-01-17 21:48

import base.models
from django.db import migrations, models


Expand All @@ -24,10 +25,10 @@ class Migration(migrations.Migration):
name='Key',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('p', models.IntegerField()),
('g', models.IntegerField()),
('y', models.IntegerField()),
('x', models.IntegerField(blank=True, null=True)),
('p', base.models.BigBigField()),
('g', base.models.BigBigField()),
('y', base.models.BigBigField()),
('x', base.models.BigBigField(blank=True, null=True)),
],
),
]
33 changes: 0 additions & 33 deletions decide/base/migrations/0002_auto_20180921_1056.py

This file was deleted.

34 changes: 0 additions & 34 deletions decide/base/migrations/0003_auto_20180921_1119.py

This file was deleted.

4 changes: 4 additions & 0 deletions decide/base/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ def setUp(self):
user_admin.set_password('qwerty')
user_admin.save()

user_admin = User(username='admin-selenium', is_staff=True, is_superuser=True, is_active=True)
user_admin.set_password('qwerty')
user_admin.save()

def tearDown(self):
self.client = None
self.token = None
Expand Down
2 changes: 1 addition & 1 deletion decide/census/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 2.0 on 2018-04-08 17:16
# Generated by Django 2.0 on 2021-01-17 21:48

from django.db import migrations, models

Expand Down
7 changes: 6 additions & 1 deletion decide/decide/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
'voting',
]

BASEURL = 'http://localhost:8000'
BASEURL = 'https://votacionegc.herokuapp.com/'

MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
Expand Down Expand Up @@ -161,6 +161,8 @@
# number of bits for the key, all auths should use the same number of bits
KEYBITS = 256

APIS = {}

# Versioning
ALLOWED_VERSIONS = ['v1', 'v2']
DEFAULT_VERSION = 'v1'
Expand All @@ -180,3 +182,6 @@


INSTALLED_APPS = INSTALLED_APPS + MODULES

# import django_heroku
# django_heroku.settings(locals())
45 changes: 45 additions & 0 deletions decide/local_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
ALLOWED_HOSTS = ["*"]

# Modules in use, commented modules that you won't use
MODULES = [
'authentication',
'base',
'booth',
'census',
'mixnet',
'postproc',
'store',
'visualizer',
'voting',
]

APIS = {
'authentication': 'http://localhost:8000',
'base': 'http://localhost:8000',
'booth': 'http://localhost:8000',
'census': 'http://localhost:8000',
'mixnet': 'http://localhost:8000',
'postproc': 'http://localhost:8000',
'store': 'http://localhost:8000',
'visualizer': 'http://localhost:8000',
'voting': 'http://localhost:8000',
}

BASEURL = 'http://localhost:8000'

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'decide',
'USER': 'decide',
'PASSWORD': 'decide',
'HOST': 'localhost',
'PORT': '5432',
}
}

# number of bits for the key, all auths should use the same number of bits
KEYBITS = 256

STATIC_URL = '/static/'

41 changes: 41 additions & 0 deletions decide/local_settings.travis.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
ALLOWED_HOSTS = ["*"]

# Modules in use, commented modules that you won't use
MODULES = [
'authentication',
'base',
'booth',
'census',
'mixnet',
'postproc',
'store',
'visualizer',
'voting',
]

APIS = {
'authentication': 'http://localhost:8000',
'base': 'http://localhost:8000',
'booth': 'http://localhost:8000',
'census': 'http://localhost:8000',
'mixnet': 'http://localhost:8000',
'postproc': 'http://localhost:8000',
'store': 'http://localhost:8000',
'visualizer': 'http://localhost:8000',
'voting': 'http://localhost:8000',
}

BASEURL = 'http://localhost:8000'

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'postgres',
'USER': 'postgres',
'HOST': 'localhost',
'PORT': '5432',
}
}

# number of bits for the key, all auths should use the same number of bits
KEYBITS = 256
31 changes: 7 additions & 24 deletions decide/mixnet/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 2.0 on 2018-02-16 11:26
# Generated by Django 2.0 on 2021-01-17 21:48

from django.db import migrations, models
import django.db.models.deletion
Expand All @@ -9,36 +9,19 @@ class Migration(migrations.Migration):
initial = True

dependencies = [
('base', '0001_initial'),
]

operations = [
migrations.CreateModel(
name='Auth',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=200)),
('url', models.URLField()),
('me', models.BooleanField(default=False)),
],
),
migrations.CreateModel(
name='Key',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('p', models.IntegerField()),
('g', models.IntegerField()),
('y', models.IntegerField()),
('x', models.IntegerField(blank=True, null=True)),
],
),
migrations.CreateModel(
name='Mixnet',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('vote_id', models.PositiveIntegerField()),
('auths', models.ManyToManyField(related_name='mixnets', to='mixnet.Auth')),
('key', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='mixnets', to='mixnet.Key')),
('pubkey', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='mixnets_pub', to='mixnet.Key')),
('voting_id', models.PositiveIntegerField()),
('auth_position', models.PositiveIntegerField(default=0)),
('auths', models.ManyToManyField(related_name='mixnets', to='base.Auth')),
('key', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='mixnets', to='base.Key')),
('pubkey', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='mixnets_pub', to='base.Key')),
],
),
]
18 changes: 0 additions & 18 deletions decide/mixnet/migrations/0002_auto_20180216_1617.py

This file was deleted.

18 changes: 0 additions & 18 deletions decide/mixnet/migrations/0003_mixnet_auth_position.py

This file was deleted.

Loading