diff --git a/.ort-data/curations-dir/agora-gui-booth.yml b/.ort-data/curations-dir/voting-booth.yml similarity index 56% rename from .ort-data/curations-dir/agora-gui-booth.yml rename to .ort-data/curations-dir/voting-booth.yml index a7f7157..a057752 100644 --- a/.ort-data/curations-dir/agora-gui-booth.yml +++ b/.ort-data/curations-dir/voting-booth.yml @@ -1,7 +1,7 @@ -- id: "Yarn::agora-gui-booth" +- id: "Yarn::voting-booth" curations: comment: "This package needs to be downloaded from git" vcs: type: "git" - url: "https://github.com/agoravoting/agora-gui-common.git" + url: "https://github.com/sequentech/common-ui.git" revision: "4.0.1" diff --git a/.ort-data/disclosure_document.ftl b/.ort-data/disclosure_document.ftl index 38e2f23..87ad3fb 100644 --- a/.ort-data/disclosure_document.ftl +++ b/.ort-data/disclosure_document.ftl @@ -1,7 +1,7 @@ [#-- Copyright (C) 2020 HERE Europe B.V. Copyright (C) 2020-2021 Bosch.IO GmbH -Copyright (C) 2021 Agora Voting SL +Copyright (C) 2021 Sequent Tech Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/.ort.yml b/.ort.yml index 32b76f5..3013c37 100644 --- a/.ort.yml +++ b/.ort.yml @@ -1,15 +1,15 @@ -# SPDX-FileCopyrightText: 2014-2021 Agora Voting SL +# SPDX-FileCopyrightText: 2014-2021 Sequent Tech Inc # # SPDX-License-Identifier: AGPL-3.0-only --- resolutions: rule_violations: - - message: "The package (PIP|PyPI)::agora-(tally|results-requirements):.* has the declared ScanCode copyleft catalogized license AGPL-3.0-only." + - message: "The package (PIP|PyPI)::(tally-methods|tally-pipes-requirements):.* has the declared ScanCode copyleft catalogized license AGPL-3.0-only." reason: "LICENSE_ACQUIRED_EXCEPTION" comment: "The project is open source so it's normal that it's set as such." - - message: "The project PIP::agora-results-requirements:.* has the dependency PyPI::agora-tally:.* licensed under the ScanCode copyleft categorized license AGPL-3.0-only." + - message: "The project PIP::tally-pipes-requirements:.* has the dependency PyPI::tally-methods:.* licensed under the ScanCode copyleft categorized license AGPL-3.0-only." reason: "LICENSE_ACQUIRED_EXCEPTION" comment: "The project is open source so it's normal that it's set as such." diff --git a/AUTHORS b/AUTHORS index efc8313..db90a7f 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,2 +1,2 @@ -Eduardo Robles Elvira +Eduardo Robles Elvira Daniel García Moreno \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in index 480087b..0067953 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,3 @@ -recursive-include agora_results *.py -recursive-include agora_results/pipes/locale * +recursive-include tally_pipes *.py +recursive-include tally_pipes/pipes/locale * include *md *txt AUTHORS diff --git a/README.md b/README.md index a817edd..b15b10e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# agora-results [![tests_badge]][tests_link] +# tally-pipes [![tests_badge]][tests_link] -[tests_badge]: https://github.com/agoravoting/agora-results/workflows/Test%20python/badge.svg -[tests_link]: https://github.com/agoravoting/agora-results/actions?query=workflow%3A%22Test+python%22 +[tests_badge]: https://github.com/sequentech/tally-pipes/workflows/Test%20python/badge.svg +[tests_link]: https://github.com/sequentech/tally-pipes/actions?query=workflow%3A%22Test+python%22 ## Introduction @@ -15,17 +15,17 @@ Piece of software that processes a tally and given a pipeline it modifies the re Just execute this (no stable release yet): - $ mkvirtualenv agora-results -p $(which python3) - $ workon agora-results - $ pip install git+https://github.com/agoravoting/agora-results.git + $ mkvirtualenv tally-pipes -p $(which python3) + $ workon tally-pipes + $ pip install git+https://github.com/sequentech/tally-pipes.git ## Usage - $ agora-results --tally tally.tar.gz --config agora_results.test_config + $ tally-pipes --tally tally.tar.gz --config tally_pipes.test_config Or the same shorter: - $ agora-results -t tally.tar.gz -c config.json + $ tally-pipes -t tally.tar.gz -c config.json ## Configuration file @@ -33,7 +33,7 @@ Configuration file specifies the pipeline of functions to be applied to the resu [ [ - "agora_results.pipes.results.do_tallies", + "tally_pipes.pipes.results.do_tallies", {} ] ] @@ -46,11 +46,11 @@ Execute the unit tests with: ## Available pipes -Available pipes are documented in python, in the agora_results/pipes directory. +Available pipes are documented in python, in the tally_pipes/pipes directory. ## Development -You can of course take a look at the available pipes in the agora_results/pipes/ subdirectory and see how to develop your own pipe. Be careful, you might cook the results in an unexpected way! +You can of course take a look at the available pipes in the tally_pipes/pipes/ subdirectory and see how to develop your own pipe. Be careful, you might cook the results in an unexpected way! This software is in development state, that's why we haven't released any stable version yet. Patches and new pipes are welcome. We will review the pipe so that it does what is expected. @@ -63,27 +63,27 @@ mainly followed the guide here: https://www.mattlayman.com/blog/2015/i18n/ You can see all the available commands with: - $ agora-results --help + $ tally-pipes --help -You can contact us at agora-voting@googlegroups.com mailing list or at #agoravoting freenode.net channel. +You can contact us at sequent-voting@googlegroups.com mailing list or at #sequent freenode.net channel. ## License -Copyright (C) 2015 Agora Voting SL and/or its subsidiary(-ies). -Contact: legal@agoravoting.com +Copyright (C) 2015 Sequent Tech Inc and/or its subsidiary(-ies). +Contact: legal@sequentech.io -This file is part of the agora-core-view module of the Agora Voting project. +This file is part of the sequent-core-view module of the Sequent Tech project. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. Commercial License Usage -Licensees holding valid commercial Agora Voting project licenses may use this +Licensees holding valid commercial Sequent Tech project licenses may use this file in accordance with the commercial license agreement provided with the Software or, alternatively, in accordance with the terms contained in -a written agreement between you and Agora Voting SL. For licensing terms and -conditions and further information contact us at legal@agoravoting.com . +a written agreement between you and Sequent Tech Inc. For licensing terms and +conditions and further information contact us at legal@sequentech.io . GNU Affero General Public License Usage Alternatively, this file may be used under the terms of the GNU Affero General diff --git a/config.json b/config.json index 65007df..cd328dc 100644 --- a/config.json +++ b/config.json @@ -1,10 +1,10 @@ [ [ - "agora_results.pipes.results.do_tallies", + "tally_pipes.pipes.results.do_tallies", {"ignore_invalid_votes": true} ], [ - "agora_results.pipes.sort.sort_non_iterative", + "tally_pipes.pipes.sort.sort_non_iterative", { "question_indexes": [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] } diff --git a/img/nvotes_logo.jpg b/img/nvotes_logo.jpg deleted file mode 100644 index d3d22d6..0000000 Binary files a/img/nvotes_logo.jpg and /dev/null differ diff --git a/img/sequent_logo.jpg b/img/sequent_logo.jpg new file mode 100644 index 0000000..35c87ae Binary files /dev/null and b/img/sequent_logo.jpg differ diff --git a/requirements.txt b/requirements.txt index 54b7479..de57d0a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,4 @@ reportlab==3.5.55 requests==2.20.0 pytz==2021.3 Babel==2.9.1 --e git+https://github.com/agoravoting/agora-tally.git@master#egg=agora-tally +-e git+https://github.com/sequentech/tally-methods.git@master#egg=tally-methods diff --git a/setup.cfg b/setup.cfg index 0ee673b..cee04ed 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,7 @@ [extract_messages] -input_dirs = agora_results/pipes/ -output_file = agora_results/pipes/locale/pipes.pot +input_dirs = tally_pipes/pipes/ +output_file = tally_pipes/pipes/locale/pipes.pot [compile_catalog] domain = pipes -directory = agora_results/pipes/locale +directory = tally_pipes/pipes/locale diff --git a/setup.py b/setup.py index 69df364..7dfead2 100644 --- a/setup.py +++ b/setup.py @@ -1,19 +1,19 @@ #!/usr/bin/env python3 -# This file is part of agora-results. -# Copyright (C) 2014-2016 Agora Voting SL +# This file is part of tally-pipes. +# Copyright (C) 2014-2016 Sequent Tech Inc -# agora-results is free software: you can redistribute it and/or modify +# tally-pipes is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License. -# agora-results is distributed in the hope that it will be useful, +# tally-pipes is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License -# along with agora-results. If not, see . +# along with tally-pipes. If not, see . from setuptools import setup from setuptools.command.sdist import sdist @@ -24,15 +24,15 @@ def run(self): sdist.run(self) setup( - name='agora-results', + name='tally-pipes', version='master', - author='Agora Voting SL', - author_email='contact@nvotes.com', - packages=['agora_results', 'agora_results.pipes'], - scripts=['agora-results'], - url='https://github.com/agoravoting/agora-results', + author='Sequent Tech Inc', + author_email='contact@sequentech.io', + packages=['tally_pipes', 'tally_pipes.pipes'], + scripts=['tally-pipes'], + url='https://github.com/sequentech/tally-pipes', license='AGPL-3.0', - description='agora results processing system', + description='sequent results processing system', long_description=open('README.md').read(), setup_requires=['Babel'], cmdclass={'sdist': SdistI18n}, @@ -41,6 +41,6 @@ def run(self): 'requests==2.20.0', 'Babel==2.9.1', 'pytz==2021.3', - 'agora-tally @ git+https://github.com/agoravoting/agora-tally.git@master' + 'tally-methods @ git+https://github.com/sequentech/tally-methods.git@master' ] ) diff --git a/agora-results b/tally-pipes similarity index 83% rename from agora-results rename to tally-pipes index 652cd0a..cb966a7 100755 --- a/agora-results +++ b/tally-pipes @@ -1,22 +1,22 @@ #!/usr/bin/env python3 # -*- coding:utf-8 -*- -# This file is part of agora-results. -# Copyright (C) 2014-2016 Agora Voting SL +# This file is part of tally-pipes. +# Copyright (C) 2014-2016 Sequent Tech Inc -# agora-results is free software: you can redistribute it and/or modify +# tally-pipes is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License. -# agora-results is distributed in the hope that it will be useful, +# tally-pipes is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License -# along with agora-results. If not, see . +# along with tally-pipes. If not, see . -from agora_results import main +from tally_pipes import main import argparse if __name__ == '__main__': diff --git a/agora_results/__init__.py b/tally_pipes/__init__.py similarity index 100% rename from agora_results/__init__.py rename to tally_pipes/__init__.py diff --git a/agora_results/main.py b/tally_pipes/main.py similarity index 87% rename from agora_results/main.py rename to tally_pipes/main.py index feaeb4e..3d8bb24 100755 --- a/agora_results/main.py +++ b/tally_pipes/main.py @@ -1,19 +1,19 @@ # -*- coding:utf-8 -*- -# This file is part of agora-results. -# Copyright (C) 2014-2021 Agora Voting SL +# This file is part of tally-pipes. +# Copyright (C) 2014-2021 Sequent Tech Inc -# agora-results is free software: you can redistribute it and/or modify +# tally-pipes is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License. -# agora-results is distributed in the hope that it will be useful, +# tally-pipes is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License -# along with agora-results. If not, see . +# along with tally-pipes. If not, see . import os import copy @@ -32,17 +32,17 @@ version=VERSION, pipes=[ dict( - type='agora_results.pipes.pdf.configure_pdf', + type='tally_pipes.pipes.pdf.configure_pdf', params=dict( languages=['en'] ) ), dict( - type='agora_results.pipes.results.do_tallies', + type='tally_pipes.pipes.results.do_tallies', params={} ), dict( - type="agora_results.pipes.sort.sort_non_iterative", + type="tally_pipes.pipes.sort.sort_non_iterative", params={} ) ] @@ -51,36 +51,36 @@ # By default we only allow the most used pipes to reduce default attack surface # NOTE: keep the list sorted DEFAULT_PIPES_WHITELIST = [ - #"agora_results.pipes.desborda.podemos_desborda", - #"agora_results.pipes.desborda2.podemos_desborda2", - #"agora_results.pipes.desborda3.podemos_desborda3", - #"agora_results.pipes.desborda4.podemos_desborda4", - #"agora_results.pipes.duplicate_questions.duplicate_questions", - "agora_results.pipes.modifications.apply_modifications", - #"agora_results.pipes.multipart.make_multipart", - #"agora_results.pipes.multipart.election_max_size_corrections", - #"agora_results.pipes.multipart.question_totals_with_corrections", - #"agora_results.pipes.multipart.reduce_answers_with_corrections", - #"agora_results.pipes.multipart.multipart_tally_plaintexts_append_joiner", - #"agora_results.pipes.multipart.data_list_reverse", - #"agora_results.pipes.multipart.multipart_tally_plaintexts_joiner", - #"agora_results.pipes.multipart.append_ballots", - "agora_results.pipes.parity.proportion_rounded", - "agora_results.pipes.parity.parity_zip_non_iterative", - "agora_results.pipes.parity.reorder_winners", - "agora_results.pipes.parity.podemos_parity_loreg_zip_non_iterative", - "agora_results.pipes.parity.podemos_parity2_loreg_zip_non_iterative", - #"agora_results.pipes.podemos.podemos_proportion_rounded_and_duplicates", - #"agora_results.pipes.pretty_print.pretty_print_stv_winners", - "agora_results.pipes.pretty_print.pretty_print_not_iterative", - "agora_results.pipes.results.do_tallies", - #"agora_results.pipes.results.to_files", - #"agora_results.pipes.results.apply_removals", - "agora_results.pipes.sort.sort_non_iterative", - #"agora_results.pipes.stv_tiebreak.stv_first_round_tiebreak", - "agora_results.pipes.pdf.configure_pdf", - "agora_results.pipes.withdraw_candidates.withdraw_candidates", - #"agora_results.pipes.ballot_boxes.count_tally_sheets" + #"tally_pipes.pipes.desborda.podemos_desborda", + #"tally_pipes.pipes.desborda2.podemos_desborda2", + #"tally_pipes.pipes.desborda3.podemos_desborda3", + #"tally_pipes.pipes.desborda4.podemos_desborda4", + #"tally_pipes.pipes.duplicate_questions.duplicate_questions", + "tally_pipes.pipes.modifications.apply_modifications", + #"tally_pipes.pipes.multipart.make_multipart", + #"tally_pipes.pipes.multipart.election_max_size_corrections", + #"tally_pipes.pipes.multipart.question_totals_with_corrections", + #"tally_pipes.pipes.multipart.reduce_answers_with_corrections", + #"tally_pipes.pipes.multipart.multipart_tally_plaintexts_append_joiner", + #"tally_pipes.pipes.multipart.data_list_reverse", + #"tally_pipes.pipes.multipart.multipart_tally_plaintexts_joiner", + #"tally_pipes.pipes.multipart.append_ballots", + "tally_pipes.pipes.parity.proportion_rounded", + "tally_pipes.pipes.parity.parity_zip_non_iterative", + "tally_pipes.pipes.parity.reorder_winners", + "tally_pipes.pipes.parity.podemos_parity_loreg_zip_non_iterative", + "tally_pipes.pipes.parity.podemos_parity2_loreg_zip_non_iterative", + #"tally_pipes.pipes.podemos.podemos_proportion_rounded_and_duplicates", + #"tally_pipes.pipes.pretty_print.pretty_print_stv_winners", + "tally_pipes.pipes.pretty_print.pretty_print_not_iterative", + "tally_pipes.pipes.results.do_tallies", + #"tally_pipes.pipes.results.to_files", + #"tally_pipes.pipes.results.apply_removals", + "tally_pipes.pipes.sort.sort_non_iterative", + #"tally_pipes.pipes.stv_tiebreak.stv_first_round_tiebreak", + "tally_pipes.pipes.pdf.configure_pdf", + "tally_pipes.pipes.withdraw_candidates.withdraw_candidates", + #"tally_pipes.pipes.ballot_boxes.count_tally_sheets" ] @@ -129,7 +129,7 @@ def print_csv(data, separator, output_func=print): str(answer['winner_position'])])) def pretty_print(data, output_func=print): - from agora_results.pipes.pretty_print import pretty_print_not_iterative + from tally_pipes.pipes.pretty_print import pretty_print_not_iterative pretty_print_not_iterative([data], output_func=output_func) def print_results( @@ -158,7 +158,7 @@ def print_results( elif "pretty" == output_format: pretty_print(data, output_func=output_func) elif "pdf" == output_format: - from agora_results.pipes.pdf import pdf_print + from tally_pipes.pipes.pdf import pdf_print try: pdf_print(data, election_config, election_id) except Exception: @@ -173,7 +173,7 @@ def func_path_sanity_checks(func_path, pipes_whitelist): values = func_path.split(".") if " " in func_path or len(values) == 0 or len(values) > 4 or\ - values[0] != "agora_results" or values[1] != "pipes": + values[0] != "tally_pipes" or values[1] != "pipes": raise Exception() for val in values: @@ -473,7 +473,7 @@ def ballots_printer(vote, question, question_num, exception): if pargs.tar and len(data_list) > 0 and 'results' in data_list[0]: data_list[0]['results']['results_dirname'] = priv_results_dirname - from agora_results.utils.tallies import tar_tallies + from tally_pipes.utils.tallies import tar_tallies tar_tallies(data_list, pipeline_info, pargs.tally, pargs.tar, pargs.election_id) # dump the results in CSV,JSON and PRETTY format in the diff --git a/agora_results/pipes/__init__.py b/tally_pipes/pipes/__init__.py similarity index 100% rename from agora_results/pipes/__init__.py rename to tally_pipes/pipes/__init__.py diff --git a/agora_results/pipes/ballot_boxes.py b/tally_pipes/pipes/ballot_boxes.py similarity index 97% rename from agora_results/pipes/ballot_boxes.py rename to tally_pipes/pipes/ballot_boxes.py index ab237bb..bf1d33c 100644 --- a/agora_results/pipes/ballot_boxes.py +++ b/tally_pipes/pipes/ballot_boxes.py @@ -1,19 +1,19 @@ # -*- coding:utf-8 -*- -# This file is part of agora-results. -# Copyright (C) 2014-2016 Agora Voting SL +# This file is part of tally-pipes. +# Copyright (C) 2014-2016 Sequent Tech Inc -# agora-results is free software: you can redistribute it and/or modify +# tally-pipes is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License. -# agora-results is distributed in the hope that it will be useful, +# tally-pipes is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License -# along with agora-results. If not, see . +# along with tally-pipes. If not, see . import re import os diff --git a/agora_results/pipes/bcnencomu.py b/tally_pipes/pipes/bcnencomu.py similarity index 79% rename from agora_results/pipes/bcnencomu.py rename to tally_pipes/pipes/bcnencomu.py index 1064b98..b28bd8b 100644 --- a/agora_results/pipes/bcnencomu.py +++ b/tally_pipes/pipes/bcnencomu.py @@ -1,19 +1,19 @@ # -*- coding:utf-8 -*- -# This file is part of agora-results. -# Copyright (C) 2014-2016 Agora Voting SL +# This file is part of tally-pipes. +# Copyright (C) 2014-2016 Sequent Tech Inc -# agora-results is free software: you can redistribute it and/or modify +# tally-pipes is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License. -# agora-results is distributed in the hope that it will be useful, +# tally-pipes is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License -# along with agora-results. If not, see . +# along with tally-pipes. If not, see . from collections import defaultdict diff --git a/agora_results/pipes/desborda.py b/tally_pipes/pipes/desborda.py similarity index 88% rename from agora_results/pipes/desborda.py rename to tally_pipes/pipes/desborda.py index f12d5ed..2bba4da 100644 --- a/agora_results/pipes/desborda.py +++ b/tally_pipes/pipes/desborda.py @@ -1,19 +1,19 @@ # -*- coding:utf-8 -*- -# This file is part of agora-results. -# Copyright (C) 2017 Agora Voting SL +# This file is part of tally-pipes. +# Copyright (C) 2017 Sequent Tech Inc -# agora-results is free software: you can redistribute it and/or modify +# tally-pipes is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License. -# agora-results is distributed in the hope that it will be useful, +# tally-pipes is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License -# along with agora-results. If not, see . +# along with tally-pipes. If not, see . # Definition of this system: # http://pabloechenique.info/wp-content/uploads/2016/12/DesBorda-sistema-Echenique.pdf @@ -80,7 +80,7 @@ def podemos_desborda(data_list, women_names=None, question_indexes=None): ''' Definition of this system: http://pabloechenique.info/wp-content/uploads/2016/12/DesBorda-sistema-Echenique.pdf - It is assumed that the desborda method in agora-tally has been already applied + It is assumed that the desborda method in tally-methods has been already applied ''' desborda = Desborda() desborda.desborda(data_list, women_names, question_indexes) diff --git a/agora_results/pipes/desborda2.py b/tally_pipes/pipes/desborda2.py similarity index 93% rename from agora_results/pipes/desborda2.py rename to tally_pipes/pipes/desborda2.py index ea37b6c..a34d242 100644 --- a/agora_results/pipes/desborda2.py +++ b/tally_pipes/pipes/desborda2.py @@ -1,25 +1,25 @@ # -*- coding:utf-8 -*- -# This file is part of agora-results. -# Copyright (C) 2017 Agora Voting SL +# This file is part of tally-pipes. +# Copyright (C) 2017 Sequent Tech Inc -# agora-results is free software: you can redistribute it and/or modify +# tally-pipes is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License. -# agora-results is distributed in the hope that it will be useful, +# tally-pipes is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License -# along with agora-results. If not, see . +# along with tally-pipes. If not, see . # Definition of this system: # Desborda 2 is a modification/generalization of desborda. # Desborda is defined here: # http://pabloechenique.info/wp-content/uploads/2016/12/DesBorda-sistema-Echenique.pdf -# It is assumed that the desborda2 method in agora-tally has been already applied +# It is assumed that the desborda2 method in tally-methods has been already applied # If N is the number of winners, then the maximum points for a candidate per # ballot will be: @@ -70,7 +70,7 @@ #for url in answer['urls']: #if url['title'] != 'Gender': #continue - #if url['url'] == 'https://agoravoting.com/api/gender/M': + #if url['url'] == 'https://sequentech.io/api/gender/M': #women_names.append(answer['text']) #break #return women_names @@ -138,7 +138,7 @@ def podemos_desborda2(data_list, women_names=None, question_indexes=None): Desborda 2 is a modification/generalization of desborda. Desborda is defined here: http://pabloechenique.info/wp-content/uploads/2016/12/DesBorda-sistema-Echenique.pdf - It is assumed that the desborda2 method in agora-tally has been already applied + It is assumed that the desborda2 method in tally-methods has been already applied If N is the number of winners, then the maximum points for a candidate per ballot will be: diff --git a/agora_results/pipes/desborda3.py b/tally_pipes/pipes/desborda3.py similarity index 79% rename from agora_results/pipes/desborda3.py rename to tally_pipes/pipes/desborda3.py index d586d03..30791c7 100644 --- a/agora_results/pipes/desborda3.py +++ b/tally_pipes/pipes/desborda3.py @@ -1,19 +1,19 @@ # -*- coding:utf-8 -*- -# This file is part of agora-results. -# Copyright (C) 2017 Agora Voting SL +# This file is part of tally-pipes. +# Copyright (C) 2017 Sequent Tech Inc -# agora-results is free software: you can redistribute it and/or modify +# tally-pipes is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License. -# agora-results is distributed in the hope that it will be useful, +# tally-pipes is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License -# along with agora-results. If not, see . +# along with tally-pipes. If not, see . # Definition of this system: # Desborda 3 is a modification/generalization of desborda 2. diff --git a/agora_results/pipes/desborda4.py b/tally_pipes/pipes/desborda4.py similarity index 96% rename from agora_results/pipes/desborda4.py rename to tally_pipes/pipes/desborda4.py index aadf744..d579417 100644 --- a/agora_results/pipes/desborda4.py +++ b/tally_pipes/pipes/desborda4.py @@ -1,23 +1,23 @@ # -*- coding:utf-8 -*- -# This file is part of agora-results. -# Copyright (C) 2018 Agora Voting SL +# This file is part of tally-pipes. +# Copyright (C) 2018 Sequent Tech Inc -# agora-results is free software: you can redistribute it and/or modify +# tally-pipes is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License. -# agora-results is distributed in the hope that it will be useful, +# tally-pipes is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License -# along with agora-results. If not, see . +# along with tally-pipes. If not, see . # Definition of this system: # Desborda 4 is a modification of desborda 2. -# It is assumed that the desborda2 method in agora-tally has been already applied +# It is assumed that the desborda2 method in tally-methods has been already applied # # The algorithm is: # A. Elección del/de la cabeza de lista. Para ello, se presentarán candidaturas @@ -59,8 +59,8 @@ # independientemente de su colocación en dicho tramo. # # La visión general es: -# 1. Cálculo de puntos por candidato (agora-tally) -# 2. Ordenado por puntos de candidatos (agora-tally) +# 1. Cálculo de puntos por candidato (tally-methods) +# 2. Ordenado por puntos de candidatos (tally-methods) # 3. Cálculo de puntos por equipos # 4. Reserva de puntos a los equipos minoritarios en los últimos puestos de los # primeros 25 (lista A). diff --git a/agora_results/pipes/desborda_base.py b/tally_pipes/pipes/desborda_base.py similarity index 96% rename from agora_results/pipes/desborda_base.py rename to tally_pipes/pipes/desborda_base.py index 2a5c56a..e29487d 100644 --- a/agora_results/pipes/desborda_base.py +++ b/tally_pipes/pipes/desborda_base.py @@ -1,19 +1,19 @@ # -*- coding:utf-8 -*- -# This file is part of agora-results. -# Copyright (C) 2017 Agora Voting SL +# This file is part of tally-pipes. +# Copyright (C) 2017 Sequent Tech Inc -# agora-results is free software: you can redistribute it and/or modify +# tally-pipes is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License. -# agora-results is distributed in the hope that it will be useful, +# tally-pipes is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License -# along with agora-results. If not, see . +# along with tally-pipes. If not, see . # Definition of this system: # Desborda 3 is a modification/generalization of desborda 2. @@ -49,7 +49,7 @@ def __get_women_names_from_question(self, question): for url in answer['urls']: if url['title'] != 'Gender': continue - if url['url'] == 'https://agoravoting.com/api/gender/M': + if url['url'] == 'https://sequentech.io/api/gender/M': women_names.append(answer['text']) break return women_names diff --git a/agora_results/pipes/duplicate_questions.py b/tally_pipes/pipes/duplicate_questions.py similarity index 93% rename from agora_results/pipes/duplicate_questions.py rename to tally_pipes/pipes/duplicate_questions.py index 4793055..c3daf2f 100644 --- a/agora_results/pipes/duplicate_questions.py +++ b/tally_pipes/pipes/duplicate_questions.py @@ -1,19 +1,19 @@ # -*- coding:utf-8 -*- -# This file is part of agora-results. -# Copyright (C) 2014-2016 Agora Voting SL +# This file is part of tally-pipes. +# Copyright (C) 2014-2016 Sequent Tech Inc -# agora-results is free software: you can redistribute it and/or modify +# tally-pipes is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License. -# agora-results is distributed in the hope that it will be useful, +# tally-pipes is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License -# along with agora-results. If not, see . +# along with tally-pipes. If not, see . import json import copy diff --git a/agora_results/pipes/locale/ca/LC_MESSAGES/pipes.mo b/tally_pipes/pipes/locale/ca/LC_MESSAGES/pipes.mo similarity index 100% rename from agora_results/pipes/locale/ca/LC_MESSAGES/pipes.mo rename to tally_pipes/pipes/locale/ca/LC_MESSAGES/pipes.mo diff --git a/agora_results/pipes/locale/ca/LC_MESSAGES/pipes.po b/tally_pipes/pipes/locale/ca/LC_MESSAGES/pipes.po similarity index 73% rename from agora_results/pipes/locale/ca/LC_MESSAGES/pipes.po rename to tally_pipes/pipes/locale/ca/LC_MESSAGES/pipes.po index e22fc0a..932a00a 100644 --- a/agora_results/pipes/locale/ca/LC_MESSAGES/pipes.po +++ b/tally_pipes/pipes/locale/ca/LC_MESSAGES/pipes.po @@ -17,7 +17,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.9.1\n" -#: agora_results/pipes/pdf.py:129 +#: tally_pipes/pipes/pdf.py:129 msgid "" "Detailed and question by question results of the election {election_id} " "titled \"{election_title}\"." @@ -25,136 +25,136 @@ msgstr "" "A continuació es detallen, pregunta per pregunta, els resultats " "de la votació {election_id} titulada \"{election_title}\"." -#: agora_results/pipes/pdf.py:187 +#: tally_pipes/pipes/pdf.py:187 msgid "Results of the election tally {election_id} - {election_title}" msgstr "Resultats de l'escrutini de la votació {election_id} - {election_title}" -#: agora_results/pipes/pdf.py:263 +#: tally_pipes/pipes/pdf.py:263 msgid "Question {question_index}: {question_title}" msgstr "Pregunta {question_index}: {question_title}" -#: agora_results/pipes/pdf.py:266 +#: tally_pipes/pipes/pdf.py:266 msgid "Configuration Data" msgstr "Dades de configuració" -#: agora_results/pipes/pdf.py:280 +#: tally_pipes/pipes/pdf.py:280 msgid "First past the post, Plurality or Plurality at Large" msgstr "Vot en bloc o Escrutini Majoritari Plurinominal" -#: agora_results/pipes/pdf.py:284 +#: tally_pipes/pipes/pdf.py:284 msgid "Cumulative voting" msgstr "Vot acumulatiu" -#: agora_results/pipes/pdf.py:286 +#: tally_pipes/pipes/pdf.py:286 msgid "Borda Nauru or Borda Dowdall (1/n)" msgstr "Borda de Nauru o Borda Dowdall (1/n)" -#: agora_results/pipes/pdf.py:290 +#: tally_pipes/pipes/pdf.py:290 msgid "Pairwise comparison (beta distribution)" msgstr "Comparació de parells (distribució beta)" -#: agora_results/pipes/pdf.py:291 +#: tally_pipes/pipes/pdf.py:291 msgid "Desborda3" msgstr "Desborda3" -#: agora_results/pipes/pdf.py:292 +#: tally_pipes/pipes/pdf.py:292 msgid "Desborda2" msgstr "Desborda2" -#: agora_results/pipes/pdf.py:293 +#: tally_pipes/pipes/pdf.py:293 msgid "Desborda" msgstr "Desborda" -#: agora_results/pipes/pdf.py:301 +#: tally_pipes/pipes/pdf.py:301 msgid "Tally system" msgstr "Sistema de recompte" -#: agora_results/pipes/pdf.py:308 +#: tally_pipes/pipes/pdf.py:308 msgid "Minimum number of options a voter can select" msgstr "Nombre mínim d'opcions que pots escollir un votant" -#: agora_results/pipes/pdf.py:315 +#: tally_pipes/pipes/pdf.py:315 msgid "Maximum number of options a voter can select" msgstr "Nombre màxim d'opcions que pots escollir un votant" -#: agora_results/pipes/pdf.py:322 +#: tally_pipes/pipes/pdf.py:322 msgid "Number of winning options" msgstr "Nombre d'opcions guanyadores" -#: agora_results/pipes/pdf.py:329 +#: tally_pipes/pipes/pdf.py:329 msgid "Options appear in the voting booth in random order" msgstr "Les opcions apareixen a la cabina de votació en ordre aleatori" -#: agora_results/pipes/pdf.py:333 +#: tally_pipes/pipes/pdf.py:333 msgid "Yes" msgstr "Sí" -#: agora_results/pipes/pdf.py:338 +#: tally_pipes/pipes/pdf.py:338 msgid "No" msgstr "No" -#: agora_results/pipes/pdf.py:360 +#: tally_pipes/pipes/pdf.py:360 msgid "Participation in question {question_index}" msgstr "Participació en pregunta {question_index}" -#: agora_results/pipes/pdf.py:379 +#: tally_pipes/pipes/pdf.py:379 msgid "Total number of votes cast" msgstr "Nombre total de vots emesos" -#: agora_results/pipes/pdf.py:384 +#: tally_pipes/pipes/pdf.py:384 msgid "Blank votes" msgstr "Vots en blanc" -#: agora_results/pipes/pdf.py:387 +#: tally_pipes/pipes/pdf.py:387 msgid "{blank_votes} ({percentage:.2%} over the total number of votes)" msgstr "{blank_votes} ({percentage:.2%} sobre el nombre total de vots)" -#: agora_results/pipes/pdf.py:399 +#: tally_pipes/pipes/pdf.py:399 msgid "Null votes" msgstr "Votos nulos" -#: agora_results/pipes/pdf.py:401 +#: tally_pipes/pipes/pdf.py:401 msgid "{null_votes} ({percentage:.2%} over the total number of votes)" msgstr "{null_votes} ({percentage:.2%} sobre el nombre total de vots)" -#: agora_results/pipes/pdf.py:414 +#: tally_pipes/pipes/pdf.py:414 msgid "Total number of votes for options" msgstr "Nombre total de vots a opcions" -#: agora_results/pipes/pdf.py:418 +#: tally_pipes/pipes/pdf.py:418 msgid "{valid_votes} ({percentage:.2%} over the total number of votes)" msgstr "{valid_votes} ({percentage:.2%} sobre el nombre total de vots)" -#: agora_results/pipes/pdf.py:431 +#: tally_pipes/pipes/pdf.py:431 msgid "Voting period start date" msgstr "Data d'inici de el període de vot" -#: agora_results/pipes/pdf.py:446 +#: tally_pipes/pipes/pdf.py:446 msgid "Voting period end date" msgstr "Data de fi de el període de vot" -#: agora_results/pipes/pdf.py:460 +#: tally_pipes/pipes/pdf.py:460 msgid "Tally end date" msgstr "Data de finalització de l'recompte" -#: agora_results/pipes/pdf.py:487 +#: tally_pipes/pipes/pdf.py:487 msgid "Candidate results" msgstr "resultats dels candidats" -#: agora_results/pipes/pdf.py:524 +#: tally_pipes/pipes/pdf.py:524 msgid "Name" msgstr "Nom" -#: agora_results/pipes/pdf.py:529 +#: tally_pipes/pipes/pdf.py:529 msgid "Points" msgstr "Punts" -#: agora_results/pipes/pdf.py:534 +#: tally_pipes/pipes/pdf.py:534 msgid "Winning position" msgstr "Posició guanyadora" -#: agora_results/pipes/pdf.py:540 agora_results/pipes/pretty_print.py:114 -#: agora_results/pipes/pretty_print.py:141 -#: agora_results/pipes/pretty_print.py:164 +#: tally_pipes/pipes/pdf.py:540 tally_pipes/pipes/pretty_print.py:114 +#: tally_pipes/pipes/pretty_print.py:141 +#: tally_pipes/pipes/pretty_print.py:164 msgid "{candidate_text} (Write-in)" msgstr "{candidate_text} (Write-in)" diff --git a/agora_results/pipes/locale/es/LC_MESSAGES/pipes.mo b/tally_pipes/pipes/locale/es/LC_MESSAGES/pipes.mo similarity index 100% rename from agora_results/pipes/locale/es/LC_MESSAGES/pipes.mo rename to tally_pipes/pipes/locale/es/LC_MESSAGES/pipes.mo diff --git a/agora_results/pipes/locale/es/LC_MESSAGES/pipes.po b/tally_pipes/pipes/locale/es/LC_MESSAGES/pipes.po similarity index 73% rename from agora_results/pipes/locale/es/LC_MESSAGES/pipes.po rename to tally_pipes/pipes/locale/es/LC_MESSAGES/pipes.po index 27d4e0d..cb70481 100644 --- a/agora_results/pipes/locale/es/LC_MESSAGES/pipes.po +++ b/tally_pipes/pipes/locale/es/LC_MESSAGES/pipes.po @@ -17,7 +17,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.9.1\n" -#: agora_results/pipes/pdf.py:129 +#: tally_pipes/pipes/pdf.py:129 msgid "" "Detailed and question by question results of the election {election_id} " "titled \"{election_title}\"." @@ -25,136 +25,136 @@ msgstr "" "A continuación se detallan, pregunta por pregunta, los resultados " "de la votación {election_id} titulada \"{election_title}\"." -#: agora_results/pipes/pdf.py:187 +#: tally_pipes/pipes/pdf.py:187 msgid "Results of the election tally {election_id} - {election_title}" msgstr "Resultados del escrutinio de la votación {election_id} - {election_title}" -#: agora_results/pipes/pdf.py:263 +#: tally_pipes/pipes/pdf.py:263 msgid "Question {question_index}: {question_title}" msgstr "Pregunta {question_index}: {question_title}" -#: agora_results/pipes/pdf.py:266 +#: tally_pipes/pipes/pdf.py:266 msgid "Configuration Data" msgstr "Datos de configuración" -#: agora_results/pipes/pdf.py:280 +#: tally_pipes/pipes/pdf.py:280 msgid "First past the post, Plurality or Plurality at Large" msgstr "Voto en bloque o Escrutinio Mayoritario Plurinominal" -#: agora_results/pipes/pdf.py:284 +#: tally_pipes/pipes/pdf.py:284 msgid "Cumulative voting" msgstr "Voto acumulativo" -#: agora_results/pipes/pdf.py:286 +#: tally_pipes/pipes/pdf.py:286 msgid "Borda Nauru or Borda Dowdall (1/n)" msgstr "Borda de Nauru o Borda Dowdall (1/n)" -#: agora_results/pipes/pdf.py:290 +#: tally_pipes/pipes/pdf.py:290 msgid "Pairwise comparison (beta distribution)" msgstr "Comparación de pares (distribución beta)" -#: agora_results/pipes/pdf.py:291 +#: tally_pipes/pipes/pdf.py:291 msgid "Desborda3" msgstr "Desborda3" -#: agora_results/pipes/pdf.py:292 +#: tally_pipes/pipes/pdf.py:292 msgid "Desborda2" msgstr "Desborda2" -#: agora_results/pipes/pdf.py:293 +#: tally_pipes/pipes/pdf.py:293 msgid "Desborda" msgstr "Desborda" -#: agora_results/pipes/pdf.py:301 +#: tally_pipes/pipes/pdf.py:301 msgid "Tally system" msgstr "Sistema de recuento" -#: agora_results/pipes/pdf.py:308 +#: tally_pipes/pipes/pdf.py:308 msgid "Minimum number of options a voter can select" msgstr "Número mínimo de opciones que puede seleccionar un votante" -#: agora_results/pipes/pdf.py:315 +#: tally_pipes/pipes/pdf.py:315 msgid "Maximum number of options a voter can select" msgstr "Número máximo de opciones que puede seleccionar un votante" -#: agora_results/pipes/pdf.py:322 +#: tally_pipes/pipes/pdf.py:322 msgid "Number of winning options" msgstr "Número de opciones ganadoras" -#: agora_results/pipes/pdf.py:329 +#: tally_pipes/pipes/pdf.py:329 msgid "Options appear in the voting booth in random order" msgstr "Las opciones aparecen en la cabina de votación en orden aleatorio" -#: agora_results/pipes/pdf.py:333 +#: tally_pipes/pipes/pdf.py:333 msgid "Yes" msgstr "Sí" -#: agora_results/pipes/pdf.py:338 +#: tally_pipes/pipes/pdf.py:338 msgid "No" msgstr "No" -#: agora_results/pipes/pdf.py:360 +#: tally_pipes/pipes/pdf.py:360 msgid "Participation in question {question_index}" msgstr "Participación en pregunta {question_index}" -#: agora_results/pipes/pdf.py:379 +#: tally_pipes/pipes/pdf.py:379 msgid "Total number of votes cast" msgstr "Número total de votos emitidos" -#: agora_results/pipes/pdf.py:384 +#: tally_pipes/pipes/pdf.py:384 msgid "Blank votes" msgstr "Votos en blanco" -#: agora_results/pipes/pdf.py:387 +#: tally_pipes/pipes/pdf.py:387 msgid "{blank_votes} ({percentage:.2%} over the total number of votes)" msgstr "{blank_votes} ({percentage:.2%} sobre el número total de votos)" -#: agora_results/pipes/pdf.py:399 +#: tally_pipes/pipes/pdf.py:399 msgid "Null votes" msgstr "Votos nulos" -#: agora_results/pipes/pdf.py:401 +#: tally_pipes/pipes/pdf.py:401 msgid "{null_votes} ({percentage:.2%} over the total number of votes)" msgstr "{null_votes} ({percentage:.2%} sobre el número total de votos)" -#: agora_results/pipes/pdf.py:414 +#: tally_pipes/pipes/pdf.py:414 msgid "Total number of votes for options" msgstr "Número total de votos a opciones" -#: agora_results/pipes/pdf.py:418 +#: tally_pipes/pipes/pdf.py:418 msgid "{valid_votes} ({percentage:.2%} over the total number of votes)" msgstr "{valid_votes} ({percentage:.2%} sobre el número total de votos)" -#: agora_results/pipes/pdf.py:431 +#: tally_pipes/pipes/pdf.py:431 msgid "Voting period start date" msgstr "Fecha de inicio del período de voto" -#: agora_results/pipes/pdf.py:446 +#: tally_pipes/pipes/pdf.py:446 msgid "Voting period end date" msgstr "Fecha de fin del período de voto" -#: agora_results/pipes/pdf.py:460 +#: tally_pipes/pipes/pdf.py:460 msgid "Tally end date" msgstr "Fecha de finalización del recuento" -#: agora_results/pipes/pdf.py:487 +#: tally_pipes/pipes/pdf.py:487 msgid "Candidate results" msgstr "Resultados de las candidaturas" -#: agora_results/pipes/pdf.py:524 +#: tally_pipes/pipes/pdf.py:524 msgid "Name" msgstr "Nombre" -#: agora_results/pipes/pdf.py:529 +#: tally_pipes/pipes/pdf.py:529 msgid "Points" msgstr "Puntos" -#: agora_results/pipes/pdf.py:534 +#: tally_pipes/pipes/pdf.py:534 msgid "Winning position" msgstr "Posición ganadora" -#: agora_results/pipes/pdf.py:540 agora_results/pipes/pretty_print.py:114 -#: agora_results/pipes/pretty_print.py:141 -#: agora_results/pipes/pretty_print.py:164 +#: tally_pipes/pipes/pdf.py:540 tally_pipes/pipes/pretty_print.py:114 +#: tally_pipes/pipes/pretty_print.py:141 +#: tally_pipes/pipes/pretty_print.py:164 msgid "{candidate_text} (Write-in)" msgstr "{candidate_text} (Write-in)" diff --git a/agora_results/pipes/locale/pipes.pot b/tally_pipes/pipes/locale/pipes.pot similarity index 59% rename from agora_results/pipes/locale/pipes.pot rename to tally_pipes/pipes/locale/pipes.pot index 21507b1..c01660f 100644 --- a/agora_results/pipes/locale/pipes.pot +++ b/tally_pipes/pipes/locale/pipes.pot @@ -1,13 +1,13 @@ -# Translations template for agora-results. +# Translations template for tally-pipes. # Copyright (C) 2021 ORGANIZATION -# This file is distributed under the same license as the agora-results +# This file is distributed under the same license as the tally-pipes # project. # FIRST AUTHOR , 2021. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: agora-results master\n" +"Project-Id-Version: tally-pipes master\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2021-10-15 09:00+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" @@ -18,144 +18,144 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.9.1\n" -#: agora_results/pipes/pdf.py:175 +#: tally_pipes/pipes/pdf.py:175 msgid "" "Detailed and question by question results of the election {election_id} " "titled \"{election_title}\"." msgstr "" -#: agora_results/pipes/pdf.py:182 +#: tally_pipes/pipes/pdf.py:182 msgid "Results of the election tally {election_id} - {election_title}" msgstr "" -#: agora_results/pipes/pdf.py:262 +#: tally_pipes/pipes/pdf.py:262 msgid "Question {question_index}: {question_title}" msgstr "" -#: agora_results/pipes/pdf.py:274 +#: tally_pipes/pipes/pdf.py:274 msgid "Configuration Data" msgstr "" -#: agora_results/pipes/pdf.py:287 +#: tally_pipes/pipes/pdf.py:287 msgid "First past the post, Plurality or Plurality at Large" msgstr "" -#: agora_results/pipes/pdf.py:290 +#: tally_pipes/pipes/pdf.py:290 msgid "Cumulative voting" msgstr "" -#: agora_results/pipes/pdf.py:291 +#: tally_pipes/pipes/pdf.py:291 msgid "Borda Nauru or Borda Dowdall (1/n)" msgstr "" -#: agora_results/pipes/pdf.py:293 +#: tally_pipes/pipes/pdf.py:293 msgid "Pairwise comparison (beta distribution)" msgstr "" -#: agora_results/pipes/pdf.py:294 +#: tally_pipes/pipes/pdf.py:294 msgid "Desborda3" msgstr "" -#: agora_results/pipes/pdf.py:295 +#: tally_pipes/pipes/pdf.py:295 msgid "Desborda2" msgstr "" -#: agora_results/pipes/pdf.py:296 +#: tally_pipes/pipes/pdf.py:296 msgid "Desborda" msgstr "" -#: agora_results/pipes/pdf.py:301 +#: tally_pipes/pipes/pdf.py:301 msgid "Tally system" msgstr "" -#: agora_results/pipes/pdf.py:308 +#: tally_pipes/pipes/pdf.py:308 msgid "Minimum number of options a voter can select" msgstr "" -#: agora_results/pipes/pdf.py:315 +#: tally_pipes/pipes/pdf.py:315 msgid "Maximum number of options a voter can select" msgstr "" -#: agora_results/pipes/pdf.py:322 +#: tally_pipes/pipes/pdf.py:322 msgid "Number of winning options" msgstr "" -#: agora_results/pipes/pdf.py:329 +#: tally_pipes/pipes/pdf.py:329 msgid "Options appear in the voting booth in random order" msgstr "" -#: agora_results/pipes/pdf.py:333 +#: tally_pipes/pipes/pdf.py:333 msgid "Yes" msgstr "" -#: agora_results/pipes/pdf.py:338 +#: tally_pipes/pipes/pdf.py:338 msgid "No" msgstr "" -#: agora_results/pipes/pdf.py:359 +#: tally_pipes/pipes/pdf.py:359 msgid "Participation in question {question_index}" msgstr "" -#: agora_results/pipes/pdf.py:377 +#: tally_pipes/pipes/pdf.py:377 msgid "Total number of votes cast" msgstr "" -#: agora_results/pipes/pdf.py:381 +#: tally_pipes/pipes/pdf.py:381 msgid "Blank votes" msgstr "" -#: agora_results/pipes/pdf.py:383 +#: tally_pipes/pipes/pdf.py:383 msgid "{blank_votes} ({percentage:.2%} over the total number of votes)" msgstr "" -#: agora_results/pipes/pdf.py:394 +#: tally_pipes/pipes/pdf.py:394 msgid "Null votes" msgstr "" -#: agora_results/pipes/pdf.py:396 +#: tally_pipes/pipes/pdf.py:396 msgid "{null_votes} ({percentage:.2%} over the total number of votes)" msgstr "" -#: agora_results/pipes/pdf.py:408 +#: tally_pipes/pipes/pdf.py:408 msgid "Total number of votes for options" msgstr "" -#: agora_results/pipes/pdf.py:412 +#: tally_pipes/pipes/pdf.py:412 msgid "{valid_votes} ({percentage:.2%} over the total number of votes)" msgstr "" -#: agora_results/pipes/pdf.py:424 +#: tally_pipes/pipes/pdf.py:424 msgid "Voting period start date" msgstr "" -#: agora_results/pipes/pdf.py:439 +#: tally_pipes/pipes/pdf.py:439 msgid "Voting period end date" msgstr "" -#: agora_results/pipes/pdf.py:453 +#: tally_pipes/pipes/pdf.py:453 msgid "Tally end date" msgstr "" -#: agora_results/pipes/pdf.py:479 +#: tally_pipes/pipes/pdf.py:479 msgid "Candidate results" msgstr "" -#: agora_results/pipes/pdf.py:515 +#: tally_pipes/pipes/pdf.py:515 msgid "Name" msgstr "" -#: agora_results/pipes/pdf.py:519 +#: tally_pipes/pipes/pdf.py:519 msgid "Points" msgstr "" -#: agora_results/pipes/pdf.py:523 +#: tally_pipes/pipes/pdf.py:523 msgid "Winning position" msgstr "" -#: agora_results/pipes/pdf.py:540 agora_results/pipes/pdf.py:561 -#: agora_results/pipes/pretty_print.py:126 -#: agora_results/pipes/pretty_print.py:153 -#: agora_results/pipes/pretty_print.py:176 +#: tally_pipes/pipes/pdf.py:540 tally_pipes/pipes/pdf.py:561 +#: tally_pipes/pipes/pretty_print.py:126 +#: tally_pipes/pipes/pretty_print.py:153 +#: tally_pipes/pipes/pretty_print.py:176 msgid "{candidate_text} (Write-in)" msgstr "" diff --git a/agora_results/pipes/modifications.py b/tally_pipes/pipes/modifications.py similarity index 96% rename from agora_results/pipes/modifications.py rename to tally_pipes/pipes/modifications.py index 7424cfb..d4c0427 100644 --- a/agora_results/pipes/modifications.py +++ b/tally_pipes/pipes/modifications.py @@ -1,19 +1,19 @@ # -*- coding:utf-8 -*- -# This file is part of agora-results. -# Copyright (C) 2014-2016 Agora Voting SL +# This file is part of tally-pipes. +# Copyright (C) 2014-2016 Sequent Tech Inc -# agora-results is free software: you can redistribute it and/or modify +# tally-pipes is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License. -# agora-results is distributed in the hope that it will be useful, +# tally-pipes is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License -# along with agora-results. If not, see . +# along with tally-pipes. If not, see . import re import os diff --git a/agora_results/pipes/multipart.py b/tally_pipes/pipes/multipart.py similarity index 97% rename from agora_results/pipes/multipart.py rename to tally_pipes/pipes/multipart.py index 38615bb..30296b9 100644 --- a/agora_results/pipes/multipart.py +++ b/tally_pipes/pipes/multipart.py @@ -1,17 +1,17 @@ -# This file is part of agora-results. -# Copyright (C) 2014-2016 Agora Voting SL +# This file is part of tally-pipes. +# Copyright (C) 2014-2016 Sequent Tech Inc -# agora-results is free software: you can redistribute it and/or modify +# tally-pipes is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License. -# agora-results is distributed in the hope that it will be useful, +# tally-pipes is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License -# along with agora-results. If not, see . +# along with tally-pipes. If not, see . import os import json @@ -23,7 +23,7 @@ import copy import types from glob import glob -import agora_tally.tally +import tally_methods.tally def curate_text(text): text = text.replace(""", '"') @@ -41,7 +41,7 @@ def remove_accents(text): def make_multipart(data_list, election_ids, help=""): ''' - check that the agora-results is being correctly invoked + check that the tally-pipes is being correctly invoked ''' for election_id, data in zip(election_ids, data_list): data['id'] = election_id @@ -242,7 +242,7 @@ def multipart_tally_plaintexts_joiner(data_list, mappings, silent=False, ''' Converts ballots (plaintexts) from different election tallies that share some candidates, into a common "final" ballots format, then saves it to be tallied - later by agora-tally. + later by tally-methods. Similar to reduce answers with corrections, but the technique used here is to append the list of ballots from different elections into the plaintexts @@ -351,13 +351,13 @@ def translate_ballot(line, dindex, qindex, src_question, dst_question): Reads a ballot string, decodes it, translate it from source tally numbering to dest tally numbering, then encodes it again and returns it. - Works with all the voting systems in agora-tally, including + Works with all the voting systems in tally-methods, including pairwise-beta. ''' # 1. DECODE # - # copied from agora_tally/tally.py and - # agora_tally/voting_systems/plurality_at_large.py: + # copied from tally_methods/tally.py and + # tally_methods/voting_systems/plurality_at_large.py: # Note line starts with " (1 character) and ends with # "\n (2 characters). It contains the index of the diff --git a/agora_results/pipes/parity.py b/tally_pipes/pipes/parity.py similarity index 97% rename from agora_results/pipes/parity.py rename to tally_pipes/pipes/parity.py index 05a1d76..69fab08 100644 --- a/agora_results/pipes/parity.py +++ b/tally_pipes/pipes/parity.py @@ -1,19 +1,19 @@ # -*- coding:utf-8 -*- -# This file is part of agora-results. -# Copyright (C) 2014-2016 Agora Voting SL +# This file is part of tally-pipes. +# Copyright (C) 2014-2016 Sequent Tech Inc -# agora-results is free software: you can redistribute it and/or modify +# tally-pipes is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License. -# agora-results is distributed in the hope that it will be useful, +# tally-pipes is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License -# along with agora-results. If not, see . +# along with tally-pipes. If not, see . from itertools import zip_longest from operator import itemgetter @@ -45,7 +45,7 @@ def __get_women_names_from_question(question): for url in answer['urls']: if url['title'] != 'Gender': continue - if url['url'] == 'https://agoravoting.com/api/gender/M': + if url['url'] == 'https://sequentech.io/api/gender/M': women_names.append(answer['text']) break return women_names @@ -177,7 +177,7 @@ def mapped(el): is_phantom=True, urls=[dict( title="Gender", - url="https://agoravoting.com/api/gender/" + phantom[-1])], + url="https://sequentech.io/api/gender/" + phantom[-1])], total_count=__BIGGEST_COUNT - i)) women = filter_women(question['answers'], women_names) @@ -507,7 +507,7 @@ def generate_test_data(sexes): "urls": [ { "title": "Gender", - "url": "https://agoravoting.com/api/gender/" + sex + "url": "https://sequentech.io/api/gender/" + sex } ] } diff --git a/agora_results/pipes/pdf.py b/tally_pipes/pipes/pdf.py similarity index 98% rename from agora_results/pipes/pdf.py rename to tally_pipes/pipes/pdf.py index 9bc46be..35541f5 100644 --- a/agora_results/pipes/pdf.py +++ b/tally_pipes/pipes/pdf.py @@ -1,19 +1,19 @@ # -*- coding:utf-8 -*- -# This file is part of agora-results. -# Copyright (C) 2016-2021 Agora Voting SL +# This file is part of tally-pipes. +# Copyright (C) 2016-2021 Sequent Tech Inc -# agora-results is free software: you can redistribute it and/or modify +# tally-pipes is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License. -# agora-results is distributed in the hope that it will be useful, +# tally-pipes is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License -# along with agora-results. If not, see . +# along with tally-pipes. If not, see . import os import re @@ -142,7 +142,7 @@ def _header_footer(canvas, doc, hide_logo): # Header header = Image( - '/home/agoraelections/agora-results/img/nvotes_logo.jpg', + '/home/ballotbox/tally-pipes/img/sequent_logo.jpg', height=20, width=80 ) diff --git a/agora_results/pipes/podemos.py b/tally_pipes/pipes/podemos.py similarity index 95% rename from agora_results/pipes/podemos.py rename to tally_pipes/pipes/podemos.py index 00d8b62..956a39c 100644 --- a/agora_results/pipes/podemos.py +++ b/tally_pipes/pipes/podemos.py @@ -1,19 +1,19 @@ # -*- coding:utf-8 -*- -# This file is part of agora-results. -# Copyright (C) 2014-2016 Agora Voting SL +# This file is part of tally-pipes. +# Copyright (C) 2014-2016 Sequent Tech Inc -# agora-results is free software: you can redistribute it and/or modify +# tally-pipes is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License. -# agora-results is distributed in the hope that it will be useful, +# tally-pipes is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License -# along with agora-results. If not, see . +# along with tally-pipes. If not, see . import json from itertools import groupby, chain diff --git a/agora_results/pipes/pretty_print.py b/tally_pipes/pipes/pretty_print.py similarity index 95% rename from agora_results/pipes/pretty_print.py rename to tally_pipes/pipes/pretty_print.py index 3e3a7cd..a71bf0d 100644 --- a/agora_results/pipes/pretty_print.py +++ b/tally_pipes/pipes/pretty_print.py @@ -1,19 +1,19 @@ # -*- coding:utf-8 -*- -# This file is part of agora-results. -# Copyright (C) 2014-2016 Agora Voting SL +# This file is part of tally-pipes. +# Copyright (C) 2014-2016 Sequent Tech Inc -# agora-results is free software: you can redistribute it and/or modify +# tally-pipes is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License. -# agora-results is distributed in the hope that it will be useful, +# tally-pipes is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License -# along with agora-results. If not, see . +# along with tally-pipes. If not, see . import os import subprocess diff --git a/agora_results/pipes/results.py b/tally_pipes/pipes/results.py similarity index 87% rename from agora_results/pipes/results.py rename to tally_pipes/pipes/results.py index 558dc45..eb36e3a 100644 --- a/agora_results/pipes/results.py +++ b/tally_pipes/pipes/results.py @@ -1,24 +1,24 @@ # -*- coding:utf-8 -*- -# This file is part of agora-results. -# Copyright (C) 2014-2016 Agora Voting SL +# This file is part of tally-pipes. +# Copyright (C) 2014-2016 Sequent Tech Inc -# agora-results is free software: you can redistribute it and/or modify +# tally-pipes is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License. -# agora-results is distributed in the hope that it will be useful, +# tally-pipes is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License -# along with agora-results. If not, see . +# along with tally-pipes. If not, see . import os import json -import agora_tally.tally -from agora_tally.voting_systems.base import BlankVoteException +import tally_methods.tally +from tally_methods.voting_systems.base import BlankVoteException from collections import defaultdict def do_tallies( @@ -35,7 +35,7 @@ def do_tallies( fprint = print monkey_patcher=None - # ballots_fprint is indicated by agora-results to write ballots.csv and + # ballots_fprint is indicated by tally-pipes to write ballots.csv and # ballots.json if 'ballots_printer' in data_list[0]: ballots_printer = data_list[0]['ballots_printer'] @@ -63,7 +63,7 @@ def parse_vote_wrapper(number, question, q_withdrawals): tally.parse_vote = parse_vote_wrapper - # ballots_printer is indicated by agora-results to write ballots.csv and + # ballots_printer is indicated by tally-pipes to write ballots.csv and # ballots.json if 'ballots_printer' in data_list[0]: monkey_patcher = __patcher @@ -98,7 +98,7 @@ def parse_vote_wrapper(number, question, q_withdrawals): for question in questions_json: withdrawals = data.get('withdrawals', []) - results = agora_tally.tally.do_tally( + results = tally_methods.tally.do_tally( data['extract_dir'], questions_json, tallies, diff --git a/agora_results/pipes/sort.py b/tally_pipes/pipes/sort.py similarity index 95% rename from agora_results/pipes/sort.py rename to tally_pipes/pipes/sort.py index 593be12..0720e14 100644 --- a/agora_results/pipes/sort.py +++ b/tally_pipes/pipes/sort.py @@ -1,19 +1,19 @@ # -*- coding:utf-8 -*- -# This file is part of agora-results. -# Copyright (C) 2014-2016 Agora Voting SL +# This file is part of tally-pipes. +# Copyright (C) 2014-2016 Sequent Tech Inc -# agora-results is free software: you can redistribute it and/or modify +# tally-pipes is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License. -# agora-results is distributed in the hope that it will be useful, +# tally-pipes is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License -# along with agora-results. If not, see . +# along with tally-pipes. If not, see . import json from itertools import groupby, chain diff --git a/agora_results/pipes/stv_tiebreak.py b/tally_pipes/pipes/stv_tiebreak.py similarity index 93% rename from agora_results/pipes/stv_tiebreak.py rename to tally_pipes/pipes/stv_tiebreak.py index 6b50aea..7bf8bca 100644 --- a/agora_results/pipes/stv_tiebreak.py +++ b/tally_pipes/pipes/stv_tiebreak.py @@ -1,25 +1,25 @@ # -*- coding:utf-8 -*- -# This file is part of agora-results. -# Copyright (C) 2014-2016 Agora Voting SL +# This file is part of tally-pipes. +# Copyright (C) 2014-2016 Sequent Tech Inc -# agora-results is free software: you can redistribute it and/or modify +# tally-pipes is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License. -# agora-results is distributed in the hope that it will be useful, +# tally-pipes is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License -# along with agora-results. If not, see . +# along with tally-pipes. If not, see . import os import copy import json import subprocess -import agora_tally.tally +import tally_methods.tally from itertools import groupby, chain # TODO OUTDATED @@ -36,7 +36,7 @@ def stv_first_round_tiebreak(data_list): data = data_list[0] # get the log to get the rounds tallies = [] - result = agora_tally.tally.do_tally(data['extract_dir'], + result = tally_methods.tally.do_tally(data['extract_dir'], data['result']['counts'], tallies) diff --git a/agora_results/pipes/withdraw_candidates.py b/tally_pipes/pipes/withdraw_candidates.py similarity index 86% rename from agora_results/pipes/withdraw_candidates.py rename to tally_pipes/pipes/withdraw_candidates.py index 19449f5..3d37347 100644 --- a/agora_results/pipes/withdraw_candidates.py +++ b/tally_pipes/pipes/withdraw_candidates.py @@ -1,19 +1,19 @@ # -*- coding:utf-8 -*- -# This file is part of agora-results. -# Copyright (C) 2017 Agora Voting SL +# This file is part of tally-pipes. +# Copyright (C) 2017 Sequent Tech Inc -# agora-results is free software: you can redistribute it and/or modify +# tally-pipes is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License. -# agora-results is distributed in the hope that it will be useful, +# tally-pipes is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License -# along with agora-results. If not, see . +# along with tally-pipes. If not, see . import math diff --git a/agora_results/utils/deterministic_tar.py b/tally_pipes/utils/deterministic_tar.py similarity index 95% rename from agora_results/utils/deterministic_tar.py rename to tally_pipes/utils/deterministic_tar.py index 90662e6..4fedeec 100644 --- a/agora_results/utils/deterministic_tar.py +++ b/tally_pipes/utils/deterministic_tar.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # -# This file is part of agora-tools. -# Copyright (C) 2013-2016 Eduardo Robles Elvira +# This file is part of misc-tools. +# Copyright (C) 2013-2016 Eduardo Robles Elvira # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by diff --git a/agora_results/utils/file_helpers.py b/tally_pipes/utils/file_helpers.py similarity index 74% rename from agora_results/utils/file_helpers.py rename to tally_pipes/utils/file_helpers.py index 363caa4..d4ae3cb 100644 --- a/agora_results/utils/file_helpers.py +++ b/tally_pipes/utils/file_helpers.py @@ -1,20 +1,20 @@ #!/usr/bin/env python3 # -*- coding:utf-8 -*- -# This file is part of agora-tally. -# Copyright (C) 2017 Agora Voting SL +# This file is part of tally-methods. +# Copyright (C) 2017 Sequent Tech Inc -# agora-tally is free software: you can redistribute it and/or modify +# tally-methods is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License. -# agora-tally is distributed in the hope that it will be useful, +# tally-methods is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License -# along with agora-tally. If not, see . +# along with tally-methods. If not, see . import codecs import json diff --git a/agora_results/utils/join_by_name.py b/tally_pipes/utils/join_by_name.py similarity index 86% rename from agora_results/utils/join_by_name.py rename to tally_pipes/utils/join_by_name.py index 26cb85a..7ecc39c 100644 --- a/agora_results/utils/join_by_name.py +++ b/tally_pipes/utils/join_by_name.py @@ -1,19 +1,19 @@ #!/usr/bin/env python3 -# This file is part of agora-results. -# Copyright (C) 2014-2016 Agora Voting SL +# This file is part of tally-pipes. +# Copyright (C) 2014-2016 Sequent Tech Inc -# agora-results is free software: you can redistribute it and/or modify +# tally-pipes is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License. -# agora-results is distributed in the hope that it will be useful, +# tally-pipes is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License -# along with agora-results. If not, see . +# along with tally-pipes. If not, see . import argparse import json diff --git a/agora_results/utils/tallies.py b/tally_pipes/utils/tallies.py similarity index 78% rename from agora_results/utils/tallies.py rename to tally_pipes/utils/tallies.py index 16c1a17..c30e40c 100644 --- a/agora_results/utils/tallies.py +++ b/tally_pipes/utils/tallies.py @@ -1,23 +1,23 @@ -# This file is part of agora-results. -# Copyright (C) 2014-2016 Agora Voting SL +# This file is part of tally-pipes. +# Copyright (C) 2014-2016 Sequent Tech Inc -# agora-results is free software: you can redistribute it and/or modify +# tally-pipes is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License. -# agora-results is distributed in the hope that it will be useful, +# tally-pipes is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License -# along with agora-results. If not, see . +# along with tally-pipes. If not, see . import os import json import tempfile import shutil -from agora_results.utils.deterministic_tar import deterministic_tar_open, deterministic_tar_add +from tally_pipes.utils.deterministic_tar import deterministic_tar_open, deterministic_tar_add def tar_tallies(data_list, config, tar_list, destdir, eid): diff --git a/test/desborda4_tests/test_0 b/test/desborda4_tests/test_0 index ef5b8cb..9109770 100644 --- a/test/desborda4_tests/test_0 +++ b/test/desborda4_tests/test_0 @@ -50,7 +50,7 @@ Config results: "version": "1.0", "pipes": [ { - "type": "agora_results.pipes.duplicate_questions.duplicate_questions", + "type": "tally_pipes.pipes.duplicate_questions.duplicate_questions", "params": { "duplications": [ { @@ -62,7 +62,7 @@ Config results: } }, { - "type": "agora_results.pipes.modifications.apply_modifications", + "type": "tally_pipes.pipes.modifications.apply_modifications", "params": { "modifications": [ { @@ -80,19 +80,19 @@ Config results: } }, { - "type": "agora_results.pipes.results.do_tallies", + "type": "tally_pipes.pipes.results.do_tallies", "params": { "ignore_invalid_votes": true } }, { - "type": "agora_results.pipes.sort.sort_non_iterative", + "type": "tally_pipes.pipes.sort.sort_non_iterative", "params": { "question_indexes": [0] } }, { - "type": "agora_results.pipes.desborda4.podemos_desborda4", + "type": "tally_pipes.pipes.desborda4.podemos_desborda4", "params": { "question_index": 1, "first_winner_question_index": 0 diff --git a/test/desborda4_tests/test_1 b/test/desborda4_tests/test_1 index 451e6d8..9ebdae8 100644 --- a/test/desborda4_tests/test_1 +++ b/test/desborda4_tests/test_1 @@ -50,7 +50,7 @@ Config results: "version": "1.0", "pipes": [ { - "type": "agora_results.pipes.duplicate_questions.duplicate_questions", + "type": "tally_pipes.pipes.duplicate_questions.duplicate_questions", "params": { "duplications": [ { @@ -62,7 +62,7 @@ Config results: } }, { - "type": "agora_results.pipes.modifications.apply_modifications", + "type": "tally_pipes.pipes.modifications.apply_modifications", "params": { "modifications": [ { @@ -87,19 +87,19 @@ Config results: } }, { - "type": "agora_results.pipes.results.do_tallies", + "type": "tally_pipes.pipes.results.do_tallies", "params": { "ignore_invalid_votes": true } }, { - "type": "agora_results.pipes.sort.sort_non_iterative", + "type": "tally_pipes.pipes.sort.sort_non_iterative", "params": { "question_indexes": [0] } }, { - "type": "agora_results.pipes.desborda4.podemos_desborda4", + "type": "tally_pipes.pipes.desborda4.podemos_desborda4", "params": { "question_index": 1, "first_winner_question_index": 0 diff --git a/test/desborda4_tests/test_2 b/test/desborda4_tests/test_2 index 5925eda..1f6c7dc 100644 --- a/test/desborda4_tests/test_2 +++ b/test/desborda4_tests/test_2 @@ -50,7 +50,7 @@ Config results: "version": "1.0", "pipes": [ { - "type": "agora_results.pipes.duplicate_questions.duplicate_questions", + "type": "tally_pipes.pipes.duplicate_questions.duplicate_questions", "params": { "duplications": [ { @@ -62,7 +62,7 @@ Config results: } }, { - "type": "agora_results.pipes.modifications.apply_modifications", + "type": "tally_pipes.pipes.modifications.apply_modifications", "params": { "modifications": [ { @@ -87,26 +87,26 @@ Config results: } }, { - "type": "agora_results.pipes.results.do_tallies", + "type": "tally_pipes.pipes.results.do_tallies", "params": { "ignore_invalid_votes": true } }, { - "type": "agora_results.pipes.sort.sort_non_iterative", + "type": "tally_pipes.pipes.sort.sort_non_iterative", "params": { "question_indexes": [0] } }, { - "type": "agora_results.pipes.desborda4.podemos_desborda4", + "type": "tally_pipes.pipes.desborda4.podemos_desborda4", "params": { "question_index": 1, "first_winner_question_index": 0 } }, { - "type": "agora_results.pipes.parity.parity_zip_non_iterative", + "type": "tally_pipes.pipes.parity.parity_zip_non_iterative", "params": { "question_indexes": [0, 1] } diff --git a/test/desborda4_tests/test_3 b/test/desborda4_tests/test_3 index 367978e..0328f82 100644 --- a/test/desborda4_tests/test_3 +++ b/test/desborda4_tests/test_3 @@ -48,7 +48,7 @@ Config results: "version": "1.0", "pipes": [ { - "type": "agora_results.pipes.duplicate_questions.duplicate_questions", + "type": "tally_pipes.pipes.duplicate_questions.duplicate_questions", "params": { "duplications": [ { @@ -60,7 +60,7 @@ Config results: } }, { - "type": "agora_results.pipes.modifications.apply_modifications", + "type": "tally_pipes.pipes.modifications.apply_modifications", "params": { "modifications": [ { @@ -85,19 +85,19 @@ Config results: } }, { - "type": "agora_results.pipes.results.do_tallies", + "type": "tally_pipes.pipes.results.do_tallies", "params": { "ignore_invalid_votes": true } }, { - "type": "agora_results.pipes.sort.sort_non_iterative", + "type": "tally_pipes.pipes.sort.sort_non_iterative", "params": { "question_indexes": [0] } }, { - "type": "agora_results.pipes.desborda4.podemos_desborda4", + "type": "tally_pipes.pipes.desborda4.podemos_desborda4", "params": { "question_index": 1, "first_winner_question_index": 0 diff --git a/test/desborda4_tests/test_4 b/test/desborda4_tests/test_4 index 67f76fa..e05dc7d 100644 --- a/test/desborda4_tests/test_4 +++ b/test/desborda4_tests/test_4 @@ -50,7 +50,7 @@ Config results: "version": "1.0", "pipes": [ { - "type": "agora_results.pipes.duplicate_questions.duplicate_questions", + "type": "tally_pipes.pipes.duplicate_questions.duplicate_questions", "params": { "duplications": [ { @@ -62,7 +62,7 @@ Config results: } }, { - "type": "agora_results.pipes.modifications.apply_modifications", + "type": "tally_pipes.pipes.modifications.apply_modifications", "params": { "modifications": [ { @@ -87,32 +87,32 @@ Config results: } }, { - "type": "agora_results.pipes.results.do_tallies", + "type": "tally_pipes.pipes.results.do_tallies", "params": { "ignore_invalid_votes": true } }, { - "type": "agora_results.pipes.sort.sort_non_iterative", + "type": "tally_pipes.pipes.sort.sort_non_iterative", "params": { "question_indexes": [0] } }, { - "type": "agora_results.pipes.desborda4.podemos_desborda4", + "type": "tally_pipes.pipes.desborda4.podemos_desborda4", "params": { "question_index": 1, "first_winner_question_index": 0 } }, { - "type": "agora_results.pipes.parity.parity_zip_non_iterative", + "type": "tally_pipes.pipes.parity.parity_zip_non_iterative", "params": { "question_indexes": [0, 1] } }, { - "type": "agora_results.pipes.parity.podemos_parity2_loreg_zip_non_iterative", + "type": "tally_pipes.pipes.parity.podemos_parity2_loreg_zip_non_iterative", "params": { "question_index": 1, "proportions": [3, 2], diff --git a/test/desborda_test.py b/test/desborda_test.py index 7ebb7c0..2e3b54e 100644 --- a/test/desborda_test.py +++ b/test/desborda_test.py @@ -1,20 +1,20 @@ #!/usr/bin/env python3 # -*- coding:utf-8 -*- -# This file is part of agora-results. -# Copyright (C) 2017-2021 Agora Voting SL +# This file is part of tally-pipes. +# Copyright (C) 2017-2021 Sequent Tech Inc -# agora-results is free software: you can redistribute it and/or modify +# tally-pipes is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License. -# agora-results is distributed in the hope that it will be useful, +# tally-pipes is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License -# along with agora-results. If not, see . +# along with tally-pipes. If not, see . import string import re @@ -22,9 +22,9 @@ import json import os from os import urandom -from agora_results.utils import file_helpers -from agora_results.main import main, VERSION -from agora_tally.ballot_codec.nvotes_codec import NVotesCodec +from tally_pipes.utils import file_helpers +from tally_pipes.main import main, VERSION +from tally_methods.ballot_codec.sequent_codec import NVotesCodec import tempfile import uuid import tarfile @@ -317,9 +317,9 @@ def create_desborda_test( candidate_is_woman = candidate in women_names gender_url = { "title": "Gender", - "url": ("https://agoravoting.com/api/gender/M" \ + "url": ("https://sequentech.io/api/gender/M" \ if candidate_is_woman \ - else "https://agoravoting.com/api/gender/H") + else "https://sequentech.io/api/gender/H") } answer["urls"].append(gender_url) question["answers"].append(answer) diff --git a/test/output_tests/test_output_1 b/test/output_tests/test_output_1 index fe9d75f..a0cf214 100644 --- a/test/output_tests/test_output_1 +++ b/test/output_tests/test_output_1 @@ -14,6 +14,6 @@ Ballots CSV: 0,"3. C1f","0. A1f","2. D1m" Ballots JSON: -{"answer_total_votes_percentage": "over-total-valid-votes", "answers": [{"Gender": "https://agoravoting.com/api/gender/M", "ballot_marks": 0, "category": "A", "details": "A1f", "id": 0, "text": "A1f", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/H", "ballot_marks": 1, "category": "B", "details": "B1m", "id": 1, "text": "B1m", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/H", "category": "D", "details": "D1m", "id": 2, "text": "D1m", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/M", "category": "C", "details": "C1f", "id": 3, "text": "C1f", "total_count": 0, "urls": []}], "ballot_flags": {"blank_vote": false, "null_vote": false}, "description": "Desborda question", "election_index": 0, "layout": "simple", "max": 3, "min": 0, "num_winners": 3, "question_num": 0, "randomize_answer_order": true, "tally_type": "borda", "title": "Desborda question"} -{"answer_total_votes_percentage": "over-total-valid-votes", "answers": [{"Gender": "https://agoravoting.com/api/gender/M", "ballot_marks": 0, "category": "A", "details": "A1f", "id": 0, "text": "A1f", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/H", "ballot_marks": 1, "category": "B", "details": "B1m", "id": 1, "text": "B1m", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/H", "ballot_marks": 2, "category": "D", "details": "D1m", "id": 2, "text": "D1m", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/M", "category": "C", "details": "C1f", "id": 3, "text": "C1f", "total_count": 0, "urls": []}], "ballot_flags": {"blank_vote": false, "null_vote": false}, "description": "Desborda question", "election_index": 0, "layout": "simple", "max": 3, "min": 0, "num_winners": 3, "question_num": 0, "randomize_answer_order": true, "tally_type": "borda", "title": "Desborda question"} -{"answer_total_votes_percentage": "over-total-valid-votes", "answers": [{"Gender": "https://agoravoting.com/api/gender/M", "ballot_marks": 1, "category": "A", "details": "A1f", "id": 0, "text": "A1f", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/H", "category": "B", "details": "B1m", "id": 1, "text": "B1m", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/H", "ballot_marks": 2, "category": "D", "details": "D1m", "id": 2, "text": "D1m", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/M", "ballot_marks": 0, "category": "C", "details": "C1f", "id": 3, "text": "C1f", "total_count": 0, "urls": []}], "ballot_flags": {"blank_vote": false, "null_vote": false}, "description": "Desborda question", "election_index": 0, "layout": "simple", "max": 3, "min": 0, "num_winners": 3, "question_num": 0, "randomize_answer_order": true, "tally_type": "borda", "title": "Desborda question"} +{"answer_total_votes_percentage": "over-total-valid-votes", "answers": [{"Gender": "https://sequentech.io/api/gender/M", "ballot_marks": 0, "category": "A", "details": "A1f", "id": 0, "text": "A1f", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/H", "ballot_marks": 1, "category": "B", "details": "B1m", "id": 1, "text": "B1m", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/H", "category": "D", "details": "D1m", "id": 2, "text": "D1m", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/M", "category": "C", "details": "C1f", "id": 3, "text": "C1f", "total_count": 0, "urls": []}], "ballot_flags": {"blank_vote": false, "null_vote": false}, "description": "Desborda question", "election_index": 0, "layout": "simple", "max": 3, "min": 0, "num_winners": 3, "question_num": 0, "randomize_answer_order": true, "tally_type": "borda", "title": "Desborda question"} +{"answer_total_votes_percentage": "over-total-valid-votes", "answers": [{"Gender": "https://sequentech.io/api/gender/M", "ballot_marks": 0, "category": "A", "details": "A1f", "id": 0, "text": "A1f", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/H", "ballot_marks": 1, "category": "B", "details": "B1m", "id": 1, "text": "B1m", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/H", "ballot_marks": 2, "category": "D", "details": "D1m", "id": 2, "text": "D1m", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/M", "category": "C", "details": "C1f", "id": 3, "text": "C1f", "total_count": 0, "urls": []}], "ballot_flags": {"blank_vote": false, "null_vote": false}, "description": "Desborda question", "election_index": 0, "layout": "simple", "max": 3, "min": 0, "num_winners": 3, "question_num": 0, "randomize_answer_order": true, "tally_type": "borda", "title": "Desborda question"} +{"answer_total_votes_percentage": "over-total-valid-votes", "answers": [{"Gender": "https://sequentech.io/api/gender/M", "ballot_marks": 1, "category": "A", "details": "A1f", "id": 0, "text": "A1f", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/H", "category": "B", "details": "B1m", "id": 1, "text": "B1m", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/H", "ballot_marks": 2, "category": "D", "details": "D1m", "id": 2, "text": "D1m", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/M", "ballot_marks": 0, "category": "C", "details": "C1f", "id": 3, "text": "C1f", "total_count": 0, "urls": []}], "ballot_flags": {"blank_vote": false, "null_vote": false}, "description": "Desborda question", "election_index": 0, "layout": "simple", "max": 3, "min": 0, "num_winners": 3, "question_num": 0, "randomize_answer_order": true, "tally_type": "borda", "title": "Desborda question"} diff --git a/test/output_tests/test_output_2 b/test/output_tests/test_output_2 index d7c61b4..ef0e3e4 100644 --- a/test/output_tests/test_output_2 +++ b/test/output_tests/test_output_2 @@ -16,7 +16,7 @@ Ballots CSV: 0,"2. C1f" Ballots JSON: -{"answer_total_votes_percentage": "over-total-valid-votes", "answers": [{"Gender": "https://agoravoting.com/api/gender/H", "ballot_marks": 1, "category": "A", "details": "A1m", "id": 0, "text": "A1m", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/H", "category": "B", "details": "B1m", "id": 1, "text": "B1m", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/M", "category": "C", "details": "C1f", "id": 2, "text": "C1f", "total_count": 0, "urls": []}], "ballot_flags": {"blank_vote": false, "null_vote": false}, "description": "Desborda question", "election_index": 0, "layout": "simple", "max": 1, "min": 0, "num_winners": 3, "question_num": 0, "randomize_answer_order": true, "tally_type": "plurality-at-large", "title": "Desborda question"} -{"answer_total_votes_percentage": "over-total-valid-votes", "answers": [{"Gender": "https://agoravoting.com/api/gender/H", "ballot_marks": 1, "category": "A", "details": "A1m", "id": 0, "text": "A1m", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/H", "category": "B", "details": "B1m", "id": 1, "text": "B1m", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/M", "category": "C", "details": "C1f", "id": 2, "text": "C1f", "total_count": 0, "urls": []}], "ballot_flags": {"blank_vote": false, "null_vote": false}, "description": "Desborda question", "election_index": 0, "layout": "simple", "max": 1, "min": 0, "num_winners": 3, "question_num": 0, "randomize_answer_order": true, "tally_type": "plurality-at-large", "title": "Desborda question"} -{"answer_total_votes_percentage": "over-total-valid-votes", "answers": [{"Gender": "https://agoravoting.com/api/gender/H", "category": "A", "details": "A1m", "id": 0, "text": "A1m", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/H", "ballot_marks": 1, "category": "B", "details": "B1m", "id": 1, "text": "B1m", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/M", "category": "C", "details": "C1f", "id": 2, "text": "C1f", "total_count": 0, "urls": []}], "ballot_flags": {"blank_vote": false, "null_vote": false}, "description": "Desborda question", "election_index": 0, "layout": "simple", "max": 1, "min": 0, "num_winners": 3, "question_num": 0, "randomize_answer_order": true, "tally_type": "plurality-at-large", "title": "Desborda question"} -{"answer_total_votes_percentage": "over-total-valid-votes", "answers": [{"Gender": "https://agoravoting.com/api/gender/H", "category": "A", "details": "A1m", "id": 0, "text": "A1m", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/H", "category": "B", "details": "B1m", "id": 1, "text": "B1m", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/M", "ballot_marks": 1, "category": "C", "details": "C1f", "id": 2, "text": "C1f", "total_count": 0, "urls": []}], "ballot_flags": {"blank_vote": false, "null_vote": false}, "description": "Desborda question", "election_index": 0, "layout": "simple", "max": 1, "min": 0, "num_winners": 3, "question_num": 0, "randomize_answer_order": true, "tally_type": "plurality-at-large", "title": "Desborda question"} \ No newline at end of file +{"answer_total_votes_percentage": "over-total-valid-votes", "answers": [{"Gender": "https://sequentech.io/api/gender/H", "ballot_marks": 1, "category": "A", "details": "A1m", "id": 0, "text": "A1m", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/H", "category": "B", "details": "B1m", "id": 1, "text": "B1m", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/M", "category": "C", "details": "C1f", "id": 2, "text": "C1f", "total_count": 0, "urls": []}], "ballot_flags": {"blank_vote": false, "null_vote": false}, "description": "Desborda question", "election_index": 0, "layout": "simple", "max": 1, "min": 0, "num_winners": 3, "question_num": 0, "randomize_answer_order": true, "tally_type": "plurality-at-large", "title": "Desborda question"} +{"answer_total_votes_percentage": "over-total-valid-votes", "answers": [{"Gender": "https://sequentech.io/api/gender/H", "ballot_marks": 1, "category": "A", "details": "A1m", "id": 0, "text": "A1m", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/H", "category": "B", "details": "B1m", "id": 1, "text": "B1m", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/M", "category": "C", "details": "C1f", "id": 2, "text": "C1f", "total_count": 0, "urls": []}], "ballot_flags": {"blank_vote": false, "null_vote": false}, "description": "Desborda question", "election_index": 0, "layout": "simple", "max": 1, "min": 0, "num_winners": 3, "question_num": 0, "randomize_answer_order": true, "tally_type": "plurality-at-large", "title": "Desborda question"} +{"answer_total_votes_percentage": "over-total-valid-votes", "answers": [{"Gender": "https://sequentech.io/api/gender/H", "category": "A", "details": "A1m", "id": 0, "text": "A1m", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/H", "ballot_marks": 1, "category": "B", "details": "B1m", "id": 1, "text": "B1m", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/M", "category": "C", "details": "C1f", "id": 2, "text": "C1f", "total_count": 0, "urls": []}], "ballot_flags": {"blank_vote": false, "null_vote": false}, "description": "Desborda question", "election_index": 0, "layout": "simple", "max": 1, "min": 0, "num_winners": 3, "question_num": 0, "randomize_answer_order": true, "tally_type": "plurality-at-large", "title": "Desborda question"} +{"answer_total_votes_percentage": "over-total-valid-votes", "answers": [{"Gender": "https://sequentech.io/api/gender/H", "category": "A", "details": "A1m", "id": 0, "text": "A1m", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/H", "category": "B", "details": "B1m", "id": 1, "text": "B1m", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/M", "ballot_marks": 1, "category": "C", "details": "C1f", "id": 2, "text": "C1f", "total_count": 0, "urls": []}], "ballot_flags": {"blank_vote": false, "null_vote": false}, "description": "Desborda question", "election_index": 0, "layout": "simple", "max": 1, "min": 0, "num_winners": 3, "question_num": 0, "randomize_answer_order": true, "tally_type": "plurality-at-large", "title": "Desborda question"} \ No newline at end of file diff --git a/test/output_tests/test_output_3 b/test/output_tests/test_output_3 index 8c6d478..fe67fd4 100644 --- a/test/output_tests/test_output_3 +++ b/test/output_tests/test_output_3 @@ -17,7 +17,7 @@ Ballots CSV: 0,"3. C1f" Ballots JSON: -{"answer_total_votes_percentage": "over-total-valid-votes", "answers": [{"Gender": "https://agoravoting.com/api/gender/H", "ballot_marks": 1, "category": "A", "details": "A1m", "id": 0, "text": "A1m", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/H", "ballot_marks": 1, "category": "A", "details": "A2m", "id": 1, "text": "A2m", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/H", "category": "B", "details": "B1m", "id": 2, "text": "B1m", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/M", "category": "C", "details": "C1f", "id": 3, "text": "C1f", "total_count": 0, "urls": []}], "ballot_flags": {"blank_vote": false, "null_vote": false}, "description": "Desborda question", "election_index": 0, "layout": "simple", "max": 2, "min": 0, "num_winners": 4, "question_num": 0, "randomize_answer_order": true, "tally_type": "plurality-at-large", "title": "Desborda question"} -{"answer_total_votes_percentage": "over-total-valid-votes", "answers": [{"Gender": "https://agoravoting.com/api/gender/H", "ballot_marks": 1, "category": "A", "details": "A1m", "id": 0, "text": "A1m", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/H", "category": "A", "details": "A2m", "id": 1, "text": "A2m", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/H", "category": "B", "details": "B1m", "id": 2, "text": "B1m", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/M", "category": "C", "details": "C1f", "id": 3, "text": "C1f", "total_count": 0, "urls": []}], "ballot_flags": {"blank_vote": false, "null_vote": false}, "description": "Desborda question", "election_index": 0, "layout": "simple", "max": 2, "min": 0, "num_winners": 4, "question_num": 0, "randomize_answer_order": true, "tally_type": "plurality-at-large", "title": "Desborda question"} -{"answer_total_votes_percentage": "over-total-valid-votes", "answers": [{"Gender": "https://agoravoting.com/api/gender/H", "category": "A", "details": "A1m", "id": 0, "text": "A1m", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/H", "category": "A", "details": "A2m", "id": 1, "text": "A2m", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/H", "ballot_marks": 1, "category": "B", "details": "B1m", "id": 2, "text": "B1m", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/M", "category": "C", "details": "C1f", "id": 3, "text": "C1f", "total_count": 0, "urls": []}], "ballot_flags": {"blank_vote": false, "null_vote": false}, "description": "Desborda question", "election_index": 0, "layout": "simple", "max": 2, "min": 0, "num_winners": 4, "question_num": 0, "randomize_answer_order": true, "tally_type": "plurality-at-large", "title": "Desborda question"} -{"answer_total_votes_percentage": "over-total-valid-votes", "answers": [{"Gender": "https://agoravoting.com/api/gender/H", "category": "A", "details": "A1m", "id": 0, "text": "A1m", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/H", "category": "A", "details": "A2m", "id": 1, "text": "A2m", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/H", "category": "B", "details": "B1m", "id": 2, "text": "B1m", "total_count": 0, "urls": []}, {"Gender": "https://agoravoting.com/api/gender/M", "ballot_marks": 1, "category": "C", "details": "C1f", "id": 3, "text": "C1f", "total_count": 0, "urls": []}], "ballot_flags": {"blank_vote": false, "null_vote": false}, "description": "Desborda question", "election_index": 0, "layout": "simple", "max": 2, "min": 0, "num_winners": 4, "question_num": 0, "randomize_answer_order": true, "tally_type": "plurality-at-large", "title": "Desborda question"} \ No newline at end of file +{"answer_total_votes_percentage": "over-total-valid-votes", "answers": [{"Gender": "https://sequentech.io/api/gender/H", "ballot_marks": 1, "category": "A", "details": "A1m", "id": 0, "text": "A1m", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/H", "ballot_marks": 1, "category": "A", "details": "A2m", "id": 1, "text": "A2m", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/H", "category": "B", "details": "B1m", "id": 2, "text": "B1m", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/M", "category": "C", "details": "C1f", "id": 3, "text": "C1f", "total_count": 0, "urls": []}], "ballot_flags": {"blank_vote": false, "null_vote": false}, "description": "Desborda question", "election_index": 0, "layout": "simple", "max": 2, "min": 0, "num_winners": 4, "question_num": 0, "randomize_answer_order": true, "tally_type": "plurality-at-large", "title": "Desborda question"} +{"answer_total_votes_percentage": "over-total-valid-votes", "answers": [{"Gender": "https://sequentech.io/api/gender/H", "ballot_marks": 1, "category": "A", "details": "A1m", "id": 0, "text": "A1m", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/H", "category": "A", "details": "A2m", "id": 1, "text": "A2m", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/H", "category": "B", "details": "B1m", "id": 2, "text": "B1m", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/M", "category": "C", "details": "C1f", "id": 3, "text": "C1f", "total_count": 0, "urls": []}], "ballot_flags": {"blank_vote": false, "null_vote": false}, "description": "Desborda question", "election_index": 0, "layout": "simple", "max": 2, "min": 0, "num_winners": 4, "question_num": 0, "randomize_answer_order": true, "tally_type": "plurality-at-large", "title": "Desborda question"} +{"answer_total_votes_percentage": "over-total-valid-votes", "answers": [{"Gender": "https://sequentech.io/api/gender/H", "category": "A", "details": "A1m", "id": 0, "text": "A1m", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/H", "category": "A", "details": "A2m", "id": 1, "text": "A2m", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/H", "ballot_marks": 1, "category": "B", "details": "B1m", "id": 2, "text": "B1m", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/M", "category": "C", "details": "C1f", "id": 3, "text": "C1f", "total_count": 0, "urls": []}], "ballot_flags": {"blank_vote": false, "null_vote": false}, "description": "Desborda question", "election_index": 0, "layout": "simple", "max": 2, "min": 0, "num_winners": 4, "question_num": 0, "randomize_answer_order": true, "tally_type": "plurality-at-large", "title": "Desborda question"} +{"answer_total_votes_percentage": "over-total-valid-votes", "answers": [{"Gender": "https://sequentech.io/api/gender/H", "category": "A", "details": "A1m", "id": 0, "text": "A1m", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/H", "category": "A", "details": "A2m", "id": 1, "text": "A2m", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/H", "category": "B", "details": "B1m", "id": 2, "text": "B1m", "total_count": 0, "urls": []}, {"Gender": "https://sequentech.io/api/gender/M", "ballot_marks": 1, "category": "C", "details": "C1f", "id": 3, "text": "C1f", "total_count": 0, "urls": []}], "ballot_flags": {"blank_vote": false, "null_vote": false}, "description": "Desborda question", "election_index": 0, "layout": "simple", "max": 2, "min": 0, "num_winners": 4, "question_num": 0, "randomize_answer_order": true, "tally_type": "plurality-at-large", "title": "Desborda question"} \ No newline at end of file diff --git a/test/pipes-whitelist.txt b/test/pipes-whitelist.txt index 4c9be76..641a8ad 100644 --- a/test/pipes-whitelist.txt +++ b/test/pipes-whitelist.txt @@ -1,30 +1,30 @@ -agora_results.pipes.desborda.podemos_desborda -agora_results.pipes.desborda2.podemos_desborda2 -agora_results.pipes.desborda3.podemos_desborda3 -agora_results.pipes.desborda4.podemos_desborda4 -agora_results.pipes.duplicate_questions.duplicate_questions -agora_results.pipes.modifications.apply_modifications -agora_results.pipes.multipart.make_multipart -agora_results.pipes.multipart.election_max_size_corrections -agora_results.pipes.multipart.question_totals_with_corrections -agora_results.pipes.multipart.reduce_answers_with_corrections -agora_results.pipes.multipart.multipart_tally_plaintexts_append_joiner -agora_results.pipes.multipart.data_list_reverse -agora_results.pipes.multipart.multipart_tally_plaintexts_joiner -agora_results.pipes.multipart.append_ballots -agora_results.pipes.parity.proportion_rounded -agora_results.pipes.parity.parity_zip_non_iterative -agora_results.pipes.parity.reorder_winners -agora_results.pipes.parity.podemos_parity_loreg_zip_non_iterative -agora_results.pipes.parity.podemos_parity2_loreg_zip_non_iterative -agora_results.pipes.podemos.podemos_proportion_rounded_and_duplicates -agora_results.pipes.pretty_print.pretty_print_stv_winners -agora_results.pipes.pretty_print.pretty_print_not_iterative -agora_results.pipes.results.do_tallies -agora_results.pipes.results.to_files -agora_results.pipes.results.apply_removals -agora_results.pipes.sort.sort_non_iterative -agora_results.pipes.stv_tiebreak.stv_first_round_tiebreak -agora_results.pipes.pdf.configure_pdf -agora_results.pipes.withdraw_candidates.withdraw_candidates -agora_results.pipes.ballot_boxes.count_tally_sheets +tally_pipes.pipes.desborda.podemos_desborda +tally_pipes.pipes.desborda2.podemos_desborda2 +tally_pipes.pipes.desborda3.podemos_desborda3 +tally_pipes.pipes.desborda4.podemos_desborda4 +tally_pipes.pipes.duplicate_questions.duplicate_questions +tally_pipes.pipes.modifications.apply_modifications +tally_pipes.pipes.multipart.make_multipart +tally_pipes.pipes.multipart.election_max_size_corrections +tally_pipes.pipes.multipart.question_totals_with_corrections +tally_pipes.pipes.multipart.reduce_answers_with_corrections +tally_pipes.pipes.multipart.multipart_tally_plaintexts_append_joiner +tally_pipes.pipes.multipart.data_list_reverse +tally_pipes.pipes.multipart.multipart_tally_plaintexts_joiner +tally_pipes.pipes.multipart.append_ballots +tally_pipes.pipes.parity.proportion_rounded +tally_pipes.pipes.parity.parity_zip_non_iterative +tally_pipes.pipes.parity.reorder_winners +tally_pipes.pipes.parity.podemos_parity_loreg_zip_non_iterative +tally_pipes.pipes.parity.podemos_parity2_loreg_zip_non_iterative +tally_pipes.pipes.podemos.podemos_proportion_rounded_and_duplicates +tally_pipes.pipes.pretty_print.pretty_print_stv_winners +tally_pipes.pipes.pretty_print.pretty_print_not_iterative +tally_pipes.pipes.results.do_tallies +tally_pipes.pipes.results.to_files +tally_pipes.pipes.results.apply_removals +tally_pipes.pipes.sort.sort_non_iterative +tally_pipes.pipes.stv_tiebreak.stv_first_round_tiebreak +tally_pipes.pipes.pdf.configure_pdf +tally_pipes.pipes.withdraw_candidates.withdraw_candidates +tally_pipes.pipes.ballot_boxes.count_tally_sheets diff --git a/test/plurality_tally_sheets/test_0 b/test/plurality_tally_sheets/test_0 index 11c6d24..be57e91 100644 --- a/test/plurality_tally_sheets/test_0 +++ b/test/plurality_tally_sheets/test_0 @@ -13,7 +13,7 @@ Config results: "version": "1.0", "pipes": [ { - "type": "agora_results.pipes.ballot_boxes.count_tally_sheets", + "type": "tally_pipes.pipes.ballot_boxes.count_tally_sheets", "params": { "tally_sheets": [ { @@ -45,7 +45,7 @@ Config results: } }, { - "type": "agora_results.pipes.sort.sort_non_iterative", + "type": "tally_pipes.pipes.sort.sort_non_iterative", "params": { "question_indexes": [0] } diff --git a/test/plurality_tally_sheets/test_1 b/test/plurality_tally_sheets/test_1 index 7120af2..3b980fb 100644 --- a/test/plurality_tally_sheets/test_1 +++ b/test/plurality_tally_sheets/test_1 @@ -13,13 +13,13 @@ Config results: "version": "1.0", "pipes": [ { - "type": "agora_results.pipes.results.do_tallies", + "type": "tally_pipes.pipes.results.do_tallies", "params": { "ignore_invalid_votes": true } }, { - "type": "agora_results.pipes.ballot_boxes.count_tally_sheets", + "type": "tally_pipes.pipes.ballot_boxes.count_tally_sheets", "params": { "tally_sheets": [ { @@ -51,7 +51,7 @@ Config results: } }, { - "type": "agora_results.pipes.sort.sort_non_iterative", + "type": "tally_pipes.pipes.sort.sort_non_iterative", "params": { "question_indexes": [0] } diff --git a/test/plurality_tally_sheets/test_2 b/test/plurality_tally_sheets/test_2 index a9ddbcb..3765d2b 100644 --- a/test/plurality_tally_sheets/test_2 +++ b/test/plurality_tally_sheets/test_2 @@ -14,13 +14,13 @@ Config results: "version": "1.0", "pipes": [ { - "type": "agora_results.pipes.results.do_tallies", + "type": "tally_pipes.pipes.results.do_tallies", "params": { "ignore_invalid_votes": true } }, { - "type": "agora_results.pipes.ballot_boxes.count_tally_sheets", + "type": "tally_pipes.pipes.ballot_boxes.count_tally_sheets", "params": { "tally_sheets": [ { @@ -86,7 +86,7 @@ Config results: } }, { - "type": "agora_results.pipes.sort.sort_non_iterative", + "type": "tally_pipes.pipes.sort.sort_non_iterative", "params": { "question_indexes": [0] } diff --git a/test/plurality_tally_sheets/test_3 b/test/plurality_tally_sheets/test_3 index 8cfa871..38ed1ca 100644 --- a/test/plurality_tally_sheets/test_3 +++ b/test/plurality_tally_sheets/test_3 @@ -13,7 +13,7 @@ Config results: "version": "1.0", "pipes": [ { - "type": "agora_results.pipes.ballot_boxes.count_tally_sheets", + "type": "tally_pipes.pipes.ballot_boxes.count_tally_sheets", "params": { "tally_sheets": [ ], @@ -28,7 +28,7 @@ Config results: } }, { - "type": "agora_results.pipes.sort.sort_non_iterative", + "type": "tally_pipes.pipes.sort.sort_non_iterative", "params": { "question_indexes": [0] } diff --git a/test/tests.py b/test/tests.py index 4272325..ad601c6 100644 --- a/test/tests.py +++ b/test/tests.py @@ -1,26 +1,26 @@ #!/usr/bin/env python3 # -*- coding:utf-8 -*- -# This file is part of agora-results. -# Copyright (C) 2017 Agora Voting SL +# This file is part of tally-pipes. +# Copyright (C) 2017 Sequent Tech Inc -# agora-results is free software: you can redistribute it and/or modify +# tally-pipes is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License. -# agora-results is distributed in the hope that it will be useful, +# tally-pipes is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License -# along with agora-results. If not, see . +# along with tally-pipes. If not, see . import unittest from unittest.mock import patch import json -from agora_results.utils import file_helpers -from agora_results.main import main, VERSION +from tally_pipes.utils import file_helpers +from tally_pipes.main import main, VERSION import test.desborda_test import os import sys @@ -68,9 +68,9 @@ def default(self, key): tally_config_desborda1 = dict( version=VERSION, pipes=[ - dict(type="agora_results.pipes.results.do_tallies", params={}), + dict(type="tally_pipes.pipes.results.do_tallies", params={}), dict( - type="agora_results.pipes.desborda.podemos_desborda", + type="tally_pipes.pipes.desborda.podemos_desborda", params={ "women_names": [] } @@ -81,9 +81,9 @@ def default(self, key): tally_config_desborda2 = dict( version=VERSION, pipes=[ - dict(type="agora_results.pipes.results.do_tallies", params={}), + dict(type="tally_pipes.pipes.results.do_tallies", params={}), dict( - type="agora_results.pipes.desborda2.podemos_desborda2", + type="tally_pipes.pipes.desborda2.podemos_desborda2", params={ "women_names": [ ] @@ -95,9 +95,9 @@ def default(self, key): tally_config_desborda3 = dict( version=VERSION, pipes=[ - dict(type="agora_results.pipes.results.do_tallies", params={}), + dict(type="tally_pipes.pipes.results.do_tallies", params={}), dict( - type="agora_results.pipes.desborda3.podemos_desborda3", + type="tally_pipes.pipes.desborda3.podemos_desborda3", params={ "women_names": [] } @@ -108,9 +108,9 @@ def default(self, key): tally_config_borda = dict( version=VERSION, pipes=[ - dict(type="agora_results.pipes.results.do_tallies", params={}), + dict(type="tally_pipes.pipes.results.do_tallies", params={}), dict( - type="agora_results.pipes.withdraw_candidates.withdraw_candidates", + type="tally_pipes.pipes.withdraw_candidates.withdraw_candidates", params={ "questions": [ { @@ -121,14 +121,14 @@ def default(self, key): ] } ), - dict(type="agora_results.pipes.sort.sort_non_iterative", params={}) + dict(type="tally_pipes.pipes.sort.sort_non_iterative", params={}) ] ) tally_config_cumulative = dict( version=VERSION, pipes=[ - dict(type="agora_results.pipes.results.do_tallies", params={}), + dict(type="tally_pipes.pipes.results.do_tallies", params={}), ] ) @@ -167,7 +167,7 @@ def do_test(self, test_data=None, num_questions=1, women_in_urls=False): if test_data is None: return print("\nTest name: %s" % test_data["name"]) - agora_results_bin_path = "python3 agora-results" + tally_pipes_bin_path = "python3 tally-pipes" tally_path = test.desborda_test.create_desborda_test(test_data, tally_type = "plurality-at-large", num_questions = num_questions, @@ -178,7 +178,7 @@ def do_test(self, test_data=None, num_questions=1, women_in_urls=False): pipes_whitelist = os.path.join("test", "pipes-whitelist.txt") results_path = os.path.join(tally_path, "12345.results.json") cmd = "%s -t %s -c %s -p %s -s -o json" % ( - agora_results_bin_path, + tally_pipes_bin_path, tally_targz_path, config_results_path, pipes_whitelist) @@ -233,7 +233,7 @@ def do_test(self, test_data=None, num_questions=1, women_in_urls=False): if test_data is None: return print("\nTest name: %s" % test_data["name"]) - agora_results_bin_path = "python3 agora-results" + tally_pipes_bin_path = "python3 tally-pipes" tally_path = test.desborda_test.create_desborda_test(test_data, tally_type = "borda", num_questions = num_questions, @@ -246,7 +246,7 @@ def do_test(self, test_data=None, num_questions=1, women_in_urls=False): tally_results_dir_path = os.path.join(tally_path, 'results-1') os.mkdir(tally_results_dir_path) cmd = "%s -t %s -c %s -x %s -eid 12345 -s -o json" % ( - agora_results_bin_path, + tally_pipes_bin_path, tally_targz_path, config_results_path, tally_path @@ -309,7 +309,7 @@ def do_test(self, test_data=None, num_questions=1, women_in_urls=True): if test_data is None: return print("\nTest name: %s" % test_data["name"]) - agora_results_bin_path = "python3 agora-results" + tally_pipes_bin_path = "python3 tally-pipes" tally_path = test.desborda_test.create_desborda_test(test_data, tally_type = "desborda2", num_questions = num_questions, @@ -320,7 +320,7 @@ def do_test(self, test_data=None, num_questions=1, women_in_urls=True): pipes_whitelist = os.path.join("test", "pipes-whitelist.txt") results_path = os.path.join(tally_path, "12345.results.json") cmd = "%s -t %s -c %s -p %s -s -o json" % ( - agora_results_bin_path, + tally_pipes_bin_path, tally_targz_path, config_results_path, pipes_whitelist) @@ -373,7 +373,7 @@ def do_test(self, test_data=None, num_questions=1, women_in_urls=False): if test_data is None: return print("\nTest name: %s" % test_data["name"]) - agora_results_bin_path = "python3 agora-results" + tally_pipes_bin_path = "python3 tally-pipes" tally_path = test.desborda_test.create_desborda_test(test_data, tally_type = "desborda3", num_questions = num_questions, @@ -384,7 +384,7 @@ def do_test(self, test_data=None, num_questions=1, women_in_urls=False): pipes_whitelist = os.path.join("test", "pipes-whitelist.txt") results_path = os.path.join(tally_path, "12345.results.json") cmd = "%s -t %s -c %s -p %s -s -o json" % ( - agora_results_bin_path, + tally_pipes_bin_path, tally_targz_path, config_results_path, pipes_whitelist) @@ -452,7 +452,7 @@ def do_test(self, test_data=None, num_questions=1, women_in_urls=False): if test_data is None: return print("\nTest name: %s" % test_data["name"]) - agora_results_bin_path = "python3 agora-results" + tally_pipes_bin_path = "python3 tally-pipes" tally_path = test.desborda_test.create_desborda_test(test_data, tally_type = "desborda2", num_questions = num_questions, @@ -463,7 +463,7 @@ def do_test(self, test_data=None, num_questions=1, women_in_urls=False): pipes_whitelist = os.path.join("test", "pipes-whitelist.txt") results_path = os.path.join(tally_path, "12345.results.json") cmd = "%s -t %s -c %s -p %s -s -o json" % ( - agora_results_bin_path, + tally_pipes_bin_path, tally_targz_path, config_results_path, pipes_whitelist) @@ -530,7 +530,7 @@ def do_test(self, test_data=None): if test_data is None: return print("\nTest name: %s" % test_data["name"]) - agora_results_bin_path = "python3 agora-results" + tally_pipes_bin_path = "python3 tally-pipes" tally_path = test.desborda_test.create_desborda_test(test_data) try: tally_targz_path = os.path.join(tally_path, "tally.tar.gz") @@ -538,7 +538,7 @@ def do_test(self, test_data=None): pipes_whitelist = os.path.join("test", "pipes-whitelist.txt") results_path = os.path.join(tally_path, "12345.results.json") cmd = "%s -t %s -c %s -p %s -s -o json" % ( - agora_results_bin_path, + tally_pipes_bin_path, tally_targz_path, config_results_path, pipes_whitelist) @@ -685,7 +685,7 @@ def do_test( results_path = os.path.join(tally_path, "12345.results.json") tally_results_dir_path = os.path.join(tally_path, 'results-1') os.mkdir(tally_results_dir_path) - cmd = "agora-results -t %s -c %s -x %s -eid 12345 -s -o json" % ( + cmd = "tally-pipes -t %s -c %s -x %s -eid 12345 -s -o json" % ( tally_targz_path, config_results_path, tally_path @@ -749,7 +749,7 @@ def do_test( return print("\nTest name: %s" % test_data["name"]) - agora_results_bin_path = "python3 agora-results" + tally_pipes_bin_path = "python3 tally-pipes" tally_path = test.desborda_test.create_desborda_test( test_data, extra_options=dict(cumulative_number_of_checkboxes=checks), @@ -765,7 +765,7 @@ def do_test( tally_results_dir_path = os.path.join(tally_path, 'results-1') os.mkdir(tally_results_dir_path) cmd = "%s -t %s -c %s -x %s -p %s -eid 12345 -s -o json" % ( - agora_results_bin_path, + tally_pipes_bin_path, tally_targz_path, config_results_path, tally_path,