7 Commits

Author SHA1 Message Date
Jeremy Stanley
b4809462aa Omit leaderless list from TC election results
The close_election command treats TC elections as a single-team PTL
election, essentially. The leaderless list, however, is generated
from the full list of projects included in an election which, in a
parallel TC/PTL election will include more projects than just the
TC. Rather than heavily refactor the utility function where that
data is summarized, just delete the leaderless list from the
election results when reporting for the TC round in a parallel
TC/PTL election.

Change-Id: Ia8bb11addb9f70283b3e676d90e5e7b48494b8e1
2021-03-10 19:51:44 +00:00
Hervé Beraud
d113fc7087 Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: I2f9d4c9a760bd9a9dbb9cde5bcb8af24fd4b34b9
2020-07-24 13:44:46 +02:00
Tony Breeds
6a1e43a8b4 Use election_type from the configuration
We have this information now so let's just use it.

Change-Id: I89ee1b88e89c23e9f6aeaa9547e7afc80816a2a8
2018-08-08 09:36:53 +10:00
Tristan Cacqueray
d45c1f340b Remove the past_elections configuration
The original implementation of archived election results doesn't
work well for publishing the result of the PTL round of the current
election. Instead of relying on an (explicit) list of past elections,
this change moves the archive to a results directory and render
all the results present (implicit).

Change-Id: Ia78988bced1cc07e2a44dde46b793f106857af94
2017-02-02 01:55:53 +00:00
Tristan Cacqueray
df232c3074 Refactor all parameters to configuration.yaml
This change moves parameter from utils.py and index.rst to the
configuration.yaml. Moreover this change does:

* Use ISO 8601 dateformat in configuration
* Change events extension to use datetime instead of calendar
* Add a configuration extension to render doc substitutions

Change-Id: Ie35cb9ae2c334814afaa36b3afd606c8bcf62616
2016-11-09 03:24:26 +00:00
Tony Breeds
7da752110a Switch to hacking and fix errors
./doc/source/_exts/candidates.py:20:1: H306  imports not in alphabetical order (jinja2.filesystemloader, jinja2.environment.environment)
./doc/source/_exts/events.py:17:1: H306  imports not in alphabetical order (os, calendar)
./doc/source/_exts/events.py:21:1: H306  imports not in alphabetical order (jinja2.filesystemloader, jinja2.environment.environment)
./openstack_election/check_candidacy.py:62:29: E126 continuation line over-indented for hanging indent
./openstack_election/utils.py:27:1: H306  imports not in alphabetical order (yaml, re)
./openstack_election/cmds/close_election.py:90:9: H232  Python 3.x incompatible octal 755 should be written as 0o755
./openstack_election/tests/test_utils.py:25:21: E126 continuation line over-indented for hanging indent
./tools/new-election.py:18:31: H301  one import per line
./tools/new-election.py:27:5: H233  Python 3.x incompatible use of print operator
./tools/new-election.py:31:5: H233  Python 3.x incompatible use of print operator
./tools/new-election.py:41:5: H233  Python 3.x incompatible use of print operator

Co-Authored-By: Nguyen Hung Phuong <phuongnh@vn.fujitsu.com>
Change-Id: Idd9bc1f1f92da1658e6da2af588c575ee0ba2cb0
2016-10-07 13:35:46 +11:00
Tristan Cacqueray
72e0775ae7 Add close-election utility and archive rendering
* close-election [ptl|tc] generate a yaml archive in doc/source
* docs render the results pages based on the archive
* add documentation about the whole election officials process

Change-Id: I8f737f33befc1e8af52dac9c059f73e2874eb5f8
2016-09-30 01:41:47 +00:00