13 Commits

Author SHA1 Message Date
Tony Breeds
ee7ae43b71 Update render-statistics to include TC seats
Change-Id: Id0528f6fae7946e96391c4c06e0c520f984b25a9
2023-08-29 08:37:29 -07: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
c6406fdbd5 Add new combined election type
This type is for when TC and PTL elections must overlap.  There is a
built in assumption that each "phase" of an election:
 - Nominations
 - Campaigning
 - Election

are completely synchronous

NOTE: This change leaves the template-emails broken, as I do not add new
functions for combined_$email.  This is because I'd like to
If64c075b4a799574bc51ccd13019d472ee9a4b0e merge first, and I'd also like
to avoid to many rebases

Change-Id: Id39c50e71dc91bea8034ce443287463094e2f37f
2019-05-28 15:43:35 +10:00
Tony Breeds
ffe1aa3c8b Add ptl_nominations_last_day email template
This consumes (and modifies) render-statistics.  Factoring this out will
be done at the end of the series

Change-Id: I878de8288f1ac047d844085f05261a6d3b1daac1
2019-02-19 15:23:57 +11:00
Doug Hellmann
f568fac15b tweak formatting of candidates listed for each team
Show the number of candidates and then cleanly show the email
addresses separated by commas and without the Python formatting markup
indicating that they are unicode strings.

Change-Id: I6df888115ce556e2b029dcde0494a95a17d98abd
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-08-01 10:11:41 +10:00
Doug Hellmann
e692cba581 sort the teams in verbose output
Process the teams in sorted order so that the verbose output is easier
to scan for details.

Change-Id: I1fc93924733831033fcf97606eca4b8638fee646
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-08-01 10:11:41 +10:00
Tony Breeds
c093c12bce Add the ability to account for projects in progress
From time to time we have project that have a candidate that has shown
the intent to nominate, mostly likely with a review, but that candidate
isn't fully validated.

Add a hack to list those projects on the command line so they're
accounted for in the stats.

Change-Id: Ica6e416433cab1232b4b41ccc609bdf29add065c
2018-08-01 10:11:41 +10:00
Tony Breeds
68652703d6 Update render-statistics for new election style
* Fix candidate detection to look for files containing an '@' rather
  than ending in '.txt'
* Clarify the tool description
* Exit early if it's a TC election
* This election cycle used a slightly different label for the nomination
  phase :/ my bad

Change-Id: I8250952341850e0d58cc3910a20931060d670e88
2018-07-27 14:24:18 +10:00
Tristan Cacqueray
fdf0a40318 Minor fix to follow-up last refactor
This change fix the render-statistics command to use the new
timeline structure. It also update the name of the
check-all-candidacy command in the README.rst file

Change-Id: Iacf98655ce74880410125229cea623485a8d5e09
2017-01-05 03:17:34 +00:00
Tony Breeds
a3ac4a90f8 Support for running tools under python3
If we run the tools (create-directories or check-all-candidacies) under
python3 they'll fail with silly errors (like[1]).  This is because we
have a number of assumptions they we'll be running under python2 like:

 - pickle.protocol: we done specify one so if we write a pickle file
   from python3 we can't read it in python2.
 - urllib and urlparse: those modules change paths in python 2 or 3 so
   use the six helpers to get the bits we want.
 - Explicitly write files in binary format
 - Various str vs bytes issues
 - dict().keys() returns dict_keys under python3 explictly cast that to
   list()

After addressing these issues we can run the tools under either python2
or python3.  To make this easy to check create explicit ven2 and venv3
test environments, leaving all other testenvs to use the system default.

[1] http://paste.openstack.org/show/593823/
Change-Id: I20334a52500847c810b486c9c8b108e75a5d6303
2017-01-05 12:57:03 +11: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
Tristan Cacqueray
26df434d13 Improve render statistics utility
* Remove TC from project list (there are only 59 project, not 60)
* Display project without_candidate and that need_election

Change-Id: I7d66d4e5ed1ab5af0950428d55062b772c32d58a
2016-09-25 23:03:27 +00:00
Tristan Cacqueray
45f3c5d005 Add statistics rendering tool
Change-Id: I5ef2bd5361385ab203b5ea093603fd91d16661fd
2016-09-14 11:25:20 +00:00