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