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
This commit is contained in:
parent
3191762ef8
commit
2c297994e0
@ -43,6 +43,14 @@ Election Results
|
|||||||
No elections were necessary.
|
No elections were necessary.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if leaderless|length %}
|
||||||
|
Leaderless Projects
|
||||||
|
===================
|
||||||
|
{% for project in leaderless|sort %}
|
||||||
|
|
||||||
|
* {{ project }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
PTL Candidates
|
PTL Candidates
|
||||||
==============
|
==============
|
||||||
|
@ -392,6 +392,16 @@ election_statistics:
|
|||||||
- Tacker:
|
- Tacker:
|
||||||
electorate: 54
|
electorate: 54
|
||||||
votes_cast: 20
|
votes_cast: 20
|
||||||
|
leaderless:
|
||||||
|
- Dragonflow
|
||||||
|
- Freezer
|
||||||
|
- Loci
|
||||||
|
- Packaging_Rpm
|
||||||
|
- RefStack
|
||||||
|
- Searchlight
|
||||||
|
- Security
|
||||||
|
- Trove
|
||||||
|
- Winstackers
|
||||||
projects:
|
projects:
|
||||||
- Adjutant
|
- Adjutant
|
||||||
- Barbican
|
- Barbican
|
||||||
|
@ -373,6 +373,10 @@ election: train
|
|||||||
elections_results:
|
elections_results:
|
||||||
Nova: https://civs.cs.cornell.edu/cgi-bin/results.pl?id=E_b03df704c3012e18
|
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
|
OpenStack_Charms: https://civs.cs.cornell.edu/cgi-bin/results.pl?id=E_ca2c11f0f83ce84d
|
||||||
|
leaderless:
|
||||||
|
- PowerVMStackers
|
||||||
|
- Telemetry
|
||||||
|
- Zaqar
|
||||||
projects:
|
projects:
|
||||||
- Ec2_Api
|
- Ec2_Api
|
||||||
- Sahara
|
- Sahara
|
||||||
|
@ -336,6 +336,14 @@ candidates:
|
|||||||
ircname: null
|
ircname: null
|
||||||
url: https://git.openstack.org/cgit/openstack/election/plain/candidates/ussuri/Zun/feng.shengqin%40zte.com.cn
|
url: https://git.openstack.org/cgit/openstack/election/plain/candidates/ussuri/Zun/feng.shengqin%40zte.com.cn
|
||||||
election: ussuri
|
election: ussuri
|
||||||
|
leaderless:
|
||||||
|
- Cyborg
|
||||||
|
- Designate
|
||||||
|
- I18n
|
||||||
|
- OpenStackSDK
|
||||||
|
- Placement
|
||||||
|
- PowerVMStackers
|
||||||
|
- Winstackers
|
||||||
projects:
|
projects:
|
||||||
- Adjutant
|
- Adjutant
|
||||||
- Rally
|
- Rally
|
||||||
|
@ -264,6 +264,23 @@ candidates:
|
|||||||
ircname: ''
|
ircname: ''
|
||||||
url: https://opendev.org/openstack/election/raw/branch/master/candidates/victoria/Zun/feng.shengqin%40zte.com.cn
|
url: https://opendev.org/openstack/election/raw/branch/master/candidates/victoria/Zun/feng.shengqin%40zte.com.cn
|
||||||
election: victoria
|
election: victoria
|
||||||
|
leaderless:
|
||||||
|
- Congress
|
||||||
|
- Barbican
|
||||||
|
- Cloudkitty
|
||||||
|
- I18n
|
||||||
|
- Adjutant
|
||||||
|
- Loci
|
||||||
|
- Masakari
|
||||||
|
- Zaqar
|
||||||
|
- Swift
|
||||||
|
- Rally
|
||||||
|
- Tricircle
|
||||||
|
- Packaging_Rpm
|
||||||
|
- Oslo
|
||||||
|
- Infrastructure
|
||||||
|
- Tacker
|
||||||
|
- Placement
|
||||||
projects:
|
projects:
|
||||||
- Telemetry
|
- Telemetry
|
||||||
- Kolla
|
- Kolla
|
||||||
|
@ -97,6 +97,7 @@ class TestBuildCandidatesList(base.ElectionTestCase):
|
|||||||
mock_lookup_member.return_value = dict(data=[member])
|
mock_lookup_member.return_value = dict(data=[member])
|
||||||
|
|
||||||
expected = dict(candidates=mock.ANY, election='fake',
|
expected = dict(candidates=mock.ANY, election='fake',
|
||||||
|
leaderless=mock.ANY,
|
||||||
projects=['SomeProject'])
|
projects=['SomeProject'])
|
||||||
observed = utils.build_candidates_list('fake')
|
observed = utils.build_candidates_list('fake')
|
||||||
self.assertEqual(expected, observed)
|
self.assertEqual(expected, observed)
|
||||||
|
@ -304,14 +304,19 @@ def election_is_running():
|
|||||||
return False
|
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_path = os.path.join(CANDIDATE_PATH, election)
|
||||||
election_type = conf.get('election_type', '').lower()
|
|
||||||
if os.path.exists(election_path):
|
if os.path.exists(election_path):
|
||||||
project_list = os.listdir(election_path)
|
project_list = os.listdir(election_path)
|
||||||
else:
|
else:
|
||||||
project_list = []
|
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':
|
if election_type == 'tc':
|
||||||
project_list = list(filter(
|
project_list = list(filter(
|
||||||
lambda p: p in ['TC'],
|
lambda p: p in ['TC'],
|
||||||
@ -323,6 +328,7 @@ def find_candidate_files(election=conf['release']):
|
|||||||
project_list
|
project_list
|
||||||
))
|
))
|
||||||
|
|
||||||
|
election_path = os.path.join(CANDIDATE_PATH, election)
|
||||||
candidate_files = []
|
candidate_files = []
|
||||||
for project in project_list:
|
for project in project_list:
|
||||||
project_prefix = os.path.join(election_path, project)
|
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)
|
'fullname': get_fullname(member, filepath=filepath)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
leaderless = set(find_all_projects(election)) - projects
|
||||||
return {'election': election,
|
return {'election': election,
|
||||||
'projects': list(projects),
|
'projects': list(projects),
|
||||||
|
'leaderless': list(leaderless),
|
||||||
'candidates': candidates_lists}
|
'candidates': candidates_lists}
|
||||||
|
Loading…
Reference in New Issue
Block a user