Skip to content

Commit

Permalink
Merge pull request #4 from agoravoting/next
Browse files Browse the repository at this point in the history
version 3.3.0
  • Loading branch information
Findeton authored Jul 26, 2016
2 parents 1655bcb + 44686f9 commit d4d8fce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion agora_results/pipes/podemos.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from itertools import groupby, chain
import sys

def podemos_proportion_rounded_and_duplicates(data_list, women_names, proportions, withdrawed_candidates=[]):
def podemos_proportion_rounded_and_duplicates(data_list, women_names, proportions, withdrawed_candidates=[], question_indexes=None):
'''
Given a list of woman names, returns a list of winners where the proportions
of each sex is between the number provided.
Expand All @@ -39,6 +39,8 @@ def podemos_proportion_rounded_and_duplicates(data_list, women_names, proportion
num_winners = question['num_winners']
max_samesex = int(num_winners*(proportions[1]/total))
q_withdrawed = [a['id'] for a in withdrawed_candidates if a['question_num'] == question_index]
if question_indexes is not None and question_index not in question_indexes:
continue

if question['tally_type'] not in ["plurality-at-large"] or len(question['answers']) < 2 or question['num_winners'] < 2:
last_winner = None
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

setup(
name='Agora Results',
version='3.2.0',
version='3.3.0',
author='Agora Voting Team',
author_email='agora@agoravoting.com',
packages=['agora_results', 'agora_results.pipes'],
Expand Down

0 comments on commit d4d8fce

Please sign in to comment.