Hello Milimetric,

I'd like you to do a code review.  Please visit

    https://gerrit.wikimedia.org/r/100740

to review the following change.

Change subject: Split files into public and private
......................................................................

Split files into public and private

Card: Analytics 1253
Change-Id: Ib5e50b8281992c19bfb95d77bbafc3629cf50924
---
M scripts/check_web_page.sh
1 file changed, 101 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/geowiki 
refs/changes/40/100740/1

diff --git a/scripts/check_web_page.sh b/scripts/check_web_page.sh
index a33a302..a4bf819 100755
--- a/scripts/check_web_page.sh
+++ b/scripts/check_web_page.sh
@@ -1355,7 +1355,7 @@
 }
 
 #---------------------------------------------------
-# Checks that geowiki's dashboards are ok.
+# Checks that geowiki's public dashboards are ok.
 #
 # Input:
 #   -
@@ -1363,12 +1363,12 @@
 # Output:
 #   -
 #
-check_dashboards() {
+check_public_dashboards() {
     check_dashboard reportcard
 }
 
 #---------------------------------------------------
-# Checks that geowiki's graphs are ok.
+# Checks that geowiki's public graphs are ok.
 #
 # Input:
 #   -
@@ -1376,11 +1376,10 @@
 # Output:
 #   -
 #
-check_graphs() {
+check_public_graphs() {
     check_graph active_editors_by_region
     check_graph active_editors_total
     check_graph global_north_south_active_editors
-    check_graph global_south_editor_fractions
     check_graph grants_count_by_global_south
     check_graph grants_count_by_program
     check_graph grants_spending_by_country
@@ -1390,7 +1389,7 @@
 }
 
 #---------------------------------------------------
-# Checks that geowiki's datasources are ok.
+# Checks that geowiki's public datasources are ok.
 #
 # Input:
 #   -
@@ -1398,19 +1397,15 @@
 # Output:
 #   -
 #
-check_datasources() {
+check_public_datasources() {
     check_datasource_json active_editors_total csv
-    check_datasource_json global_south        csv
     check_datasource_json map-world_countries json
-    check_datasource_json pt_top10            csv
-    check_datasource_json region              csv
 
     # The following datasources somewhat belong to geowiki, but are
     # not part of the geowiki, so they have to be generated by
     # hand. We monitor them to avoid data loss, but geowiki does not
     # allow to keep the up-to-date. So we cannot check that they are
     # up-to-date.
-    check_datasource_json global_south_editor_fractions   csv
     check_datasource_json grants_count_by_global_south    csv
     check_datasource_json grants_count_by_program         csv
     check_datasource_json grants_spending_by_country      json
@@ -1419,7 +1414,7 @@
 }
 
 #---------------------------------------------------
-# Checks that geowiki's datafiles are ok.
+# Checks that geowiki's public datafiles are ok.
 #
 # Input:
 #   -
@@ -1427,8 +1422,66 @@
 # Output:
 #   -
 #
-check_datafiles() {
+check_public_datafiles() {
     check_csv_active_editors_total
+}
+
+#---------------------------------------------------
+# Checks that geowiki's private dashboards are ok.
+#
+# Input:
+#   -
+#
+# Output:
+#   -
+#
+check_private_dashboards() {
+    # Empty placeholder.
+    #
+    # This function just exists, so the check_* functions structure is
+    # nice and symmetrical between public and private checks
+    :
+}
+
+#---------------------------------------------------
+# Checks that geowiki's private graphs are ok.
+#
+# Input:
+#   -
+#
+# Output:
+#   -
+#
+check_private_graphs() {
+    check_graph global_south_editor_fractions
+}
+
+#---------------------------------------------------
+# Checks that geowiki's private datasources are ok.
+#
+# Input:
+#   -
+#
+# Output:
+#   -
+#
+check_private_datasources() {
+    check_datasource_json global_south        csv
+    check_datasource_json pt_top10            csv
+    check_datasource_json region              csv
+    check_datasource_json global_south_editor_fractions   csv
+}
+
+#---------------------------------------------------
+# Checks that geowiki's private datafiles are ok.
+#
+# Input:
+#   -
+#
+# Output:
+#   -
+#
+check_private_datafiles() {
     check_csv_global_south
     check_csv_global_south_editor_fractions
     check_csv_region
@@ -1437,7 +1490,39 @@
 }
 
 #---------------------------------------------------
-# Checks that geowiki's files are ok.
+# Checks that geowiki's public files are ok.
+#
+# Input:
+#   -
+#
+# Output:
+#   -
+#
+check_public_data() {
+    check_public_dashboards
+    check_public_graphs
+    check_public_datasources
+    check_public_datafiles
+}
+
+#---------------------------------------------------
+# Checks that geowiki's private files are ok.
+#
+# Input:
+#   -
+#
+# Output:
+#   -
+#
+check_private_data() {
+    check_private_dashboards
+    check_private_graphs
+    check_private_datasources
+    check_private_datafiles
+}
+
+#---------------------------------------------------
+# Checks that geowiki's public, and private files are ok.
 #
 # Input:
 #   -
@@ -1446,10 +1531,8 @@
 #   -
 #
 check() {
-    check_dashboards
-    check_graphs
-    check_datasources
-    check_datafiles
+    check_public_data
+    check_private_data
 }
 
 

-- 
To view, visit https://gerrit.wikimedia.org/r/100740
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib5e50b8281992c19bfb95d77bbafc3629cf50924
Gerrit-PatchSet: 1
Gerrit-Project: analytics/geowiki
Gerrit-Branch: master
Gerrit-Owner: QChris <[email protected]>
Gerrit-Reviewer: Milimetric <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to