Skip to content
Snippets Groups Projects
Commit 4a15ba4f authored by Frank Duncan's avatar Frank Duncan
Browse files

Add global view SDG table of contents

parent c792c264
No related branches found
No related tags found
No related merge requests found
......@@ -70,6 +70,7 @@ competition_configs = {
"rank": "Wise Head Overall Score Rank Normalized",
"score": "Wise Head Sum of Scores Normalized",
"status": "Valid",
"sdg": "Sustainable Development Goals",
},
"100Change2017": {
"key": "Review_Number",
......@@ -102,6 +103,7 @@ competition_configs = {
"rank": "Peer to Peer Overall Score Rank Normalized",
"score": "Peer to Peer Sum of Scores Normalized",
"status": "Admin Review Status",
"sdg": "Sustainable Development Goals",
},
"Climate2030": {
"key": "Application #",
......@@ -252,6 +254,7 @@ def main():
"Wiki Key",
"Sheet Name",
"Priority Populations",
"Sustainable Development Goals",
"Annual Operating Budget",
"Status",
]
......@@ -282,6 +285,9 @@ def main():
score = ""
if "score" in competition_configs[name]:
score = proposal.cell(competition_configs[name]["score"])
sdgs = ""
if "sdg" in competition_configs[name]:
sdgs = proposal.cell(competition_configs[name]["sdg"])
csv_writer.writerow(
[
......@@ -301,6 +307,7 @@ def main():
competition_configs[name]["wiki_key"],
competition_configs[name]["sheet_name"],
priority_populations,
sdgs,
annual_operating_budget,
# We mark as valid in the case that there is no status so things get included
(
......@@ -315,6 +322,9 @@ def main():
comp.process_cells_special(
"Priority Populations", competition.ColumnTypeUpdater("list")
)
comp.process_cells_special(
"Sustainable Development Goals", competition.ColumnTypeUpdater("list")
)
comp.process_cells_special("Project Title", competition.RemoveHTMLBRsProcessor())
# Replacing BRs with spaces for this one, because of the data having new lines in
......@@ -408,6 +418,33 @@ def main():
)
comp.add_toc(toc.AnnualBudgetToc("Annual Operating Budget"))
comp.add_toc(GroupedScoreToc())
comp.add_toc(
toc.GenericMultiLineToc(
"Sustainable_Development_Goals",
"Sustainable Development Goals",
[
"No Poverty",
"Zero Hunger",
"Good Health and Well-being",
"Quality Education",
"Gender Equality",
"Clean Water and Sanitation",
"Affordable and Clean Energy",
"Decent Work and Economic Growth",
"Industry, Innovation and Infrastructure",
"Reduced Inequality",
"Sustainable Cities and Communities",
"Responsible Consumption and Production",
"Climate Action",
"Life Below Water",
"Life on Land",
"Peace and Justice Strong Institutions",
"Partnerships for the Goals",
],
)
)
comp.sort("Organization Name")
comp.process_tocs()
......@@ -424,6 +461,7 @@ def main():
my_wiki.csv_only = True
my_wiki.upload_sheet(comp)
for proposal in comp.proposals.values():
my_wiki.create_page(
proposal.cell("MediaWiki Title"),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment