s/liasons/liaisons/
Change-Id: I34a39a8ce7c3dcb80248422b3e56a56951fac774 Signed-off-by: Graham Hayes <gr@ham.ie>
This commit is contained in:
parent
964608bb17
commit
a9ea7e1c5f
|
@ -24,7 +24,7 @@ from openstack_governance import projects
|
|||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class TCLiasonsTable(tables.Table):
|
||||
class TCLiaisonsTable(tables.Table):
|
||||
"""Insert the members table using the referenced file as source.
|
||||
"""
|
||||
|
||||
|
@ -69,18 +69,18 @@ class TCLiasonsTable(tables.Table):
|
|||
|
||||
# Build the table node using the parsed file
|
||||
data_iter = projects.load_project_file(filename)
|
||||
liasons = {}
|
||||
liaisons = {}
|
||||
for project_name, project in data_iter.items():
|
||||
|
||||
for liason in project.get('liasons', []):
|
||||
for liaison in project.get('liaisons', []):
|
||||
try:
|
||||
liasons[liason].extend([project_name])
|
||||
liaisons[liaison].extend([project_name])
|
||||
except KeyError:
|
||||
liasons[liason] = []
|
||||
liasons[liason].extend([project_name])
|
||||
liaisons[liaison] = []
|
||||
liaisons[liaison].extend([project_name])
|
||||
|
||||
table_node = self.build_table(
|
||||
liasons,
|
||||
liaisons,
|
||||
col_widths,
|
||||
)
|
||||
table_node['classes'] += self.options.get('class', [])
|
||||
|
@ -138,5 +138,5 @@ class TCLiasonsTable(tables.Table):
|
|||
|
||||
|
||||
def setup(app):
|
||||
LOG.info('loading tc liasons extension')
|
||||
app.add_directive('liasonstable', TCLiasonsTable)
|
||||
LOG.info('loading tc liaisons extension')
|
||||
app.add_directive('liaisonstable', TCLiaisonsTable)
|
|
@ -51,9 +51,9 @@ def _team_to_rst(name, info):
|
|||
service = info.get('service')
|
||||
if service:
|
||||
yield ':Service: ' + service
|
||||
liasons = info.get('liasons')
|
||||
if liasons:
|
||||
yield ':Liasons: ' + ", ".join(liasons)
|
||||
liaisons = info.get('liaisons')
|
||||
if liaisons:
|
||||
yield ':Liaisons: ' + ", ".join(liaisons)
|
||||
yield ''
|
||||
mission = info.get('mission', '').rstrip()
|
||||
if mission:
|
||||
|
|
|
@ -39,7 +39,7 @@ extensions = [
|
|||
'projects',
|
||||
'teams',
|
||||
'tags',
|
||||
'tc_liasons',
|
||||
'tc_liaisons',
|
||||
'badges',
|
||||
'page_context',
|
||||
]
|
||||
|
|
|
@ -53,7 +53,7 @@ class Team(object):
|
|||
dn: Deliverable(dn, di, self)
|
||||
for dn, di in self.data.get('deliverables', {}).items()
|
||||
}
|
||||
self.liasons = data.get('liasons', [])
|
||||
self.liaisons = data.get('liaisons', [])
|
||||
|
||||
@property
|
||||
def tags(self):
|
||||
|
|
|
@ -31,7 +31,7 @@ Release Management:
|
|||
versioning rules and tools, then enabling project teams to produce
|
||||
their own releases.
|
||||
url: https://wiki.openstack.org/wiki/Release_Management
|
||||
liasons:
|
||||
liaisons:
|
||||
- zaneb
|
||||
- ttx
|
||||
tags:
|
||||
|
|
|
@ -11,7 +11,7 @@ Reference documents which need to be revised over time.
|
|||
principles
|
||||
charter
|
||||
projects/index
|
||||
tc-liasons
|
||||
tc-liaisons
|
||||
popup-teams
|
||||
technical-vision
|
||||
upstream-investment-opportunities/index
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
===========
|
||||
TC Liaisons
|
||||
===========
|
||||
|
||||
OpenStack Project Team TC Liasons
|
||||
=================================
|
||||
|
||||
.. liaisonstable::
|
||||
:datafile: ../reference/projects.yaml
|
|
@ -1,9 +0,0 @@
|
|||
==========
|
||||
TC Liasons
|
||||
==========
|
||||
|
||||
OpenStack Project Team TC Liasons
|
||||
=================================
|
||||
|
||||
.. liasonstable::
|
||||
:datafile: ../reference/projects.yaml
|
|
@ -35,12 +35,12 @@ def main():
|
|||
parser.add_argument(
|
||||
'--replace-all',
|
||||
action='store_true',
|
||||
help='Replace all assigned liasons (%(default)s)',
|
||||
help='Replace all assigned liaisons (%(default)s)',
|
||||
)
|
||||
parser.add_argument(
|
||||
'--remove-all',
|
||||
action='store_true',
|
||||
help='Remove all assigned liasons (%(default)s)',
|
||||
help='Remove all assigned liaisons (%(default)s)',
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
|
@ -59,7 +59,7 @@ def main():
|
|||
for nic in member_nics
|
||||
})
|
||||
for _, team in project_data.items():
|
||||
for member in team.get('liasons', []):
|
||||
for member in team.get('liaisons', []):
|
||||
member_counts.update({member: 1})
|
||||
|
||||
choices = []
|
||||
|
@ -70,20 +70,20 @@ def main():
|
|||
# person to a team twice.
|
||||
|
||||
for name, team in project_data.items():
|
||||
liasons = team.get('liasons', [])
|
||||
liaisons = team.get('liaisons', [])
|
||||
if args.remove_all:
|
||||
team['liasons'] = []
|
||||
team['liaisons'] = []
|
||||
continue
|
||||
if args.replace_all:
|
||||
liasons = []
|
||||
while len(liasons) < 2:
|
||||
liaisons = []
|
||||
while len(liaisons) < 2:
|
||||
random.shuffle(choices)
|
||||
next_choice = choices.pop()
|
||||
while next_choice in liasons:
|
||||
while next_choice in liaisons:
|
||||
choices.insert(0, next_choice)
|
||||
next_choice = choices.pop()
|
||||
liasons.append(next_choice)
|
||||
team['liasons'] = liasons
|
||||
liaisons.append(next_choice)
|
||||
team['liaisons'] = liaisons
|
||||
|
||||
projects.write_project_file(project_data, args.projects_file)
|
||||
|
||||
|
|
Loading…
Reference in New Issue