Browse Source

Include Leaderless projects in the PTL series results

Now that we allow an election to close with one or more leaderless
projects it's worth tracking that on the results page.

Change-Id: Ie6a5ae8302dcd3ef9645067ba5d7f7bbd1c451f7
changes/17/718317/1
Tony Breeds 1 year ago
parent
commit
2c297994e0
  1. 8
      doc/source/_exts/ptl_archive.jinja
  2. 10
      doc/source/results/stein/ptl.yaml
  3. 4
      doc/source/results/train/ptl.yaml
  4. 8
      doc/source/results/ussuri/ptl.yaml
  5. 17
      doc/source/results/victoria/ptl.yaml
  6. 1
      openstack_election/tests/test_utils.py
  7. 12
      openstack_election/utils.py

8
doc/source/_exts/ptl_archive.jinja

@ -43,6 +43,14 @@ Election Results
No elections were necessary.
{% endif %}
{% if leaderless|length %}
Leaderless Projects
===================
{% for project in leaderless|sort %}
* {{ project }}
{% endfor %}
{% endif %}
PTL Candidates
==============

10
doc/source/results/stein/ptl.yaml

@ -392,6 +392,16 @@ election_statistics:
- Tacker:
electorate: 54
votes_cast: 20
leaderless:
- Dragonflow
- Freezer
- Loci
- Packaging_Rpm
- RefStack
- Searchlight
- Security
- Trove
- Winstackers
projects:
- Adjutant
- Barbican

4
doc/source/results/train/ptl.yaml

@ -373,6 +373,10 @@ election: train
elections_results:
Nova: https://civs.cs.cornell.edu/cgi-bin/results.pl?id=E_b03df704c3012e18
OpenStack_Charms: https://civs.cs.cornell.edu/cgi-bin/results.pl?id=E_ca2c11f0f83ce84d
leaderless:
- PowerVMStackers
- Telemetry
- Zaqar
projects:
- Ec2_Api
- Sahara

8
doc/source/results/ussuri/ptl.yaml

@ -336,6 +336,14 @@ candidates:
ircname: null
url: https://git.openstack.org/cgit/openstack/election/plain/candidates/ussuri/Zun/feng.shengqin%40zte.com.cn
election: ussuri
leaderless:
- Cyborg
- Designate
- I18n
- OpenStackSDK
- Placement
- PowerVMStackers
- Winstackers
projects:
- Adjutant
- Rally

17
doc/source/results/victoria/ptl.yaml

@ -264,6 +264,23 @@ candidates:
ircname: ''
url: https://opendev.org/openstack/election/raw/branch/master/candidates/victoria/Zun/feng.shengqin%40zte.com.cn
election: victoria
leaderless:
- Congress
- Barbican
- Cloudkitty
- I18n
- Adjutant
- Loci
- Masakari
- Zaqar
- Swift
- Rally
- Tricircle
- Packaging_Rpm
- Oslo
- Infrastructure
- Tacker
- Placement
projects:
- Telemetry
- Kolla

1
openstack_election/tests/test_utils.py

@ -97,6 +97,7 @@ class TestBuildCandidatesList(base.ElectionTestCase):
mock_lookup_member.return_value = dict(data=[member])
expected = dict(candidates=mock.ANY, election='fake',
leaderless=mock.ANY,
projects=['SomeProject'])
observed = utils.build_candidates_list('fake')
self.assertEqual(expected, observed)

12
openstack_election/utils.py

@ -304,14 +304,19 @@ def election_is_running():
return False
def find_candidate_files(election=conf['release']):
def find_all_projects(election=conf['release']):
election_path = os.path.join(CANDIDATE_PATH, election)
election_type = conf.get('election_type', '').lower()
if os.path.exists(election_path):
project_list = os.listdir(election_path)
else:
project_list = []
return project_list
def find_candidate_files(election=conf['release']):
project_list = find_all_projects(election)
election_type = conf.get('election_type', '').lower()
if election_type == 'tc':
project_list = list(filter(
lambda p: p in ['TC'],
@ -323,6 +328,7 @@ def find_candidate_files(election=conf['release']):
project_list
))
election_path = os.path.join(CANDIDATE_PATH, election)
candidate_files = []
for project in project_list:
project_prefix = os.path.join(election_path, project)
@ -361,6 +367,8 @@ def build_candidates_list(election=conf['release']):
'fullname': get_fullname(member, filepath=filepath)
})
leaderless = set(find_all_projects(election)) - projects
return {'election': election,
'projects': list(projects),
'leaderless': list(leaderless),
'candidates': candidates_lists}
Loading…
Cancel
Save