Commit Graph

38 Commits

Author SHA1 Message Date
Ian Y. Choi 058634bd0c Update tc-election-summary.py: reflect results
Reflect election results to tc-election-summary.py election tool

Change-Id: I2cee6a3959907256503bc00bfba85882919bb81f
2024-03-22 00:50:35 +09:00
Jeremy Stanley fe5fe24926 Add Wallaby election stats
Update the election stats data for Wallaby TC and Telemetry PTL
polls. Also add the missing train PTL poll stats.

Change-Id: I6a08a1109cb0fe0efd898ed9f9c8c54364fbff21
2020-10-14 16:33:18 +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 b6c0376837 Close the Victoria TC election
Change-Id: I58cd5cfbfcac748e44526f8df1479511bcf2f075
2020-04-15 00:27:20 +00:00
Zuul 6abfd87e6c Merge "Train TC Election Statistics" 2019-03-06 21:49:37 +00:00
Jeremy Stanley 8764b28070 Train TC Election Statistics
Change-Id: Ia9c4ecaf055f37f87a35f201b4ea0a0ad037f33a
2019-03-06 02:06:31 +00:00
Jeremy Stanley 7c7da155e5 Consistent HTTPS for URLs in non-historical files
Update the URLs in various templates and generated content to
consistently use https:// instead of a mix of that and http://, and
while we're at it set the homepage for the Python package of this
repo to the election site rather than the OpenStack Foundation site.

Change-Id: I4fa53076ed9bcdf1545d9c4aa5e80dc5dad95210
2019-03-04 16:36:46 +00:00
Kendall Nelson e63b890a11 Stein TC Election Statistics
Change-Id: Ib13abf998366b81ebe0b5cfe5b253d4f5306b0c7
2018-09-28 22:57:57 +00:00
Tony Breeds b6a183ca3f Add PTL election stats and tool to display them
Change-Id: Idb0459599707597c18545ac45bb0f24d33608602
2018-08-08 10:42:45 +10:00
Tony Breeds 6cc733f164 Add Summary data
Change-Id: I8de8bdbf4007047c4f08805a4c0c111540951875
2018-05-15 14:26:58 +10:00
Tony Breeds 8d7c46a02b Updates stats with Pike and Queens election summary
Change-Id: I003d431f377b79f3dffecc94a31060e645731222
2017-10-21 10:57:12 +11:00
Tristan Cacqueray fe2ac4be95 Rewrite generate-rolls in python
Change-Id: I20de88a41eaf1d1bfba1e82f487ec508900f9494
Depends-On: Ie3b602237625e11651825abc8feb38caa73e9632
2017-02-01 01:19:13 +00:00
Tristan Cacqueray f6507b695d Import the new-election tool as create-directories
Change-Id: I9a1dc9f22683852af1527449b2b46c2eaf78ad9c
2016-11-09 03:24:18 +00:00
Jenkins f1f6f75101 Merge "[tools] Render historical stats for TC elections" 2016-11-07 01:53:41 +00:00
Tony Breeds 544bcd41a3 [tools] Render historical stats for TC elections
Right now this script includes the data and needs to be updated after
each election.

We could factor out the data in the future

Change-Id: I60ba91efabb280e91b2481d20df0b16ec5471036
2016-10-09 23:56:34 +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
Tony Breeds 15ee429ee4 Tool to generate electorate rolls
This is a shell wrapper around 'owners.py' from the system-config repo

Change-Id: I35b089ed9c1f5d8e05d7fc361e002117d145b95e
2016-09-21 10:28:58 +10:00
Tristan Cacqueray 2de5874c6c Remove unused tool
Change-Id: I02d84ed52092c972ee4bfcc2fb251ab02529f554
2016-09-12 06:31:06 +00:00
Tony Breeds b285d3dd9c Make openstack_election look more like a python module
Currently the code in this repo is half modular have series of scripts.
Migrate the code to be more modular.  The main benefit to this is
testing is easier.

Testing is added in a followup patch

Change-Id: Ic1262436147ecdb818ee259e2e85fca8df09d722
2016-09-12 15:35:40 +10:00
Tony Breeds df4eb69e66 Add a linters tox environment
The linters tox environment will run yamllint and flake8.

Also fix a few trivial issues so the new target passes

Change-Id: Ifa1e9379f7d1d1996f2cfb84233bce8b502979bb
2016-09-12 15:12:55 +10:00
Tristan Cacqueray 3e3e2e7868 Fix --tag argument usage
The argument is currently omited and validation is currently using
un-tagged governance projects list. This change adds the --tag
argument with the correct default value to check-new-candidacy too

Change-Id: I2a4a33f7c105365800d95055195c2584c1130575
2016-09-12 00:26:06 +00:00
Tony Breeds cb6504e9af Refactor candidacy checking tools
This is a large change as it does several things

1. Moves to using the gerrit REST API to collecting open reviews (as
   opposed to ssh)
2. Moves the selection of validating commits from scraping git logs to
   the gerrit REST API
3. Uses the new utils.py function for getting the project data
4. Avoids any git checkouts/downloads during the validation process
5. tools/check-new-candidacy still checks all open changes
6. tools/check-ptl-candidacy.py checks a single change, now specified as
   a change ID rather then a file path

Work to be done in follow-up commits

1. Add testing, now that this is more modular we can mock json blobs to
   test code and avoid regressions
2. Add a manual toll to specify a project and community member and check
   that, even if it doesn't match data in an open review
3. Add quality tools such as flake8 / yamllint to keep code/data neat
4. Modify the docs generation to understand that files are now IRC nicks
   and to get the change author as the candidate.

Change-Id: Ibd7fad3eb4d39f1edca624b981fa602d2b4c4d40
2016-09-09 21:04:16 +10:00
Tristan Cacqueray be2a3afc4c Prepare Ocata election
This change also includes a new tool to automate election preparation

Change-Id: I98049db7c0b665992d408c78e62e99f4a36e3a60
2016-09-02 07:36:29 +00:00
Tristan Cacqueray c0f7aade5a Fix project list match with directory name
This change reverse the directory name creation to find
projects name back from projects.yaml.

Directories were created using:
for project in projects.keys():
  os.mkdir(project.title().replace(' ', '_'))

Also fix DATE_MAX to match Liberty-Mitaka timeframe.

Change-Id: I51cb272807e2b68f794b939319c198736722f340
2016-03-13 10:37:14 -04:00
Tony Breeds 5fdebb419c render-wiki-list: Only remove the TC if needed
If the TC election hasn't been opened then render-wiki-list will fail with:
---
 Traceback (most recent call last):
   File "tools/render-wiki-list.py", line 31, in <module>
     main(sys.argv)
   File "tools/render-wiki-list.py", line 17, in main
     candidates_list['projects'].remove('TC')
 ValueError: list.remove(x): x not in list
---

Fix that

Change-Id: I5292655d14871b2b3047be0d2720423acfdab9e3
2016-03-11 16:52:38 +11:00
Tony Breeds f013acfaa0 Use yaml keys to locate the project deliverables
Due to the election setup and we can't trivially map the directory
names to project keys.  This wasn't caught during creation of the
election.  Rather then rename directories while the election is in
progress reverse the look up direction to map project keys =>
directories.

Change-Id: Ib9595d20202328f111bb9cce3c97147cd393f7b7
2016-03-11 16:30:39 +11:00
Tony Breeds 7c72cd4444 Protect extra-atcs acces
Not all projects have an extra-atcs entry.  CHeck it's in the yaml
befoer access the data.

Change-Id: I5883f4a141cd5226d5caf188f026671d23f58522
2016-03-11 16:09:27 +11:00
Tony Breeds 154bedd5bd Fix PEP8 Errors
Change-Id: Ieb831fbb2c27e0b6428227845dfa9b7a7c7fa2bf
2016-03-11 13:45:16 +11:00
Tony Breeds cdbc906dc9 Validate extra-atcs
Change-Id: I7c3324d73a4fc18329270f845aba6904d3f9a539
2016-03-11 13:45:10 +11:00
Tony Breeds 912a9424eb Match path on disk to projects.yaml keys
Ensure that we translate '_' characters to ' ' for matchin the keys in
projects.yaml

Change-Id: Ibfe24e2cdadc773fb69bdd4dd52df2bc0de6cb27
2016-03-11 12:52:03 +11:00
Tony Breeds f894edb16d Update check-candidacy.py with Newton dates and tag
Change-Id: Ida91b757e7c5840634651359e9e902557eba456e
2016-03-11 12:51:02 +11:00
Tristan Cacqueray 7b3f1e73ef Prepare Newton election
Change-Id: I848039ab206c270f5dfa07e534900393467e0a47
2016-03-03 16:32:53 -05:00
Tony Breeds 2e63708862 Update path to 'env' so tool works on MacOS
Change-Id: If89a832fb2041bf617c8d733febd284de5f25b51
2015-09-15 09:18:30 +10:00
Tristan Cacqueray 9a27a781a3 Adds tool to collect and check new candidacies
Change-Id: I0d91a7290dd678cf6e49139c5aed27713d4aac98
2015-09-14 09:33:18 +10:00
Tristan Cacqueray 1fbae32077 Make sure candidate names are properly capitalized
Change-Id: I3f7ef0571f0b598739dea22d9a9bfd37603bd7af
2015-09-11 11:03:11 -04:00
Tristan Cacqueray 3f3a30a819 Fix candidate name's space
Change-Id: Iea4f6feb0af64e078c37e8c957ca7c0ea4b8adef
2015-09-10 21:26:31 -04:00
Tony Breeds a5695b2027 check-candidacy: Allow '_' in filenames
Change-Id: I3831318a71073b3d92f006b570270b4eed8bef50
2015-09-11 10:48:03 +10:00
Tristan Cacqueray fe3378c68f Cargo-culting doc building from openstack/ossa
* Directories tree for mitaka projects
* Tools to check candidacy
* Generate candidates lists

Change-Id: I784bc4a3a06d3d7506df6d2ef7e6b0362f7696b9
2015-09-10 13:32:36 -04:00