Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
torque-sites
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ots
MediaWiki
torque-sites
Commits
4a15ba4f
Commit
4a15ba4f
authored
3 years ago
by
Frank Duncan
Browse files
Options
Downloads
Patches
Plain Diff
Add global view SDG table of contents
parent
c792c264
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
competitions/GlobalView/etl/populate-wiki
+38
-0
38 additions, 0 deletions
competitions/GlobalView/etl/populate-wiki
with
38 additions
and
0 deletions
competitions/GlobalView/etl/populate-wiki
+
38
−
0
View file @
4a15ba4f
...
...
@@ -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
"
),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment