whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From curc...@apache.org
Subject [whimsy] branch master updated: Allow parsing of pre-2007 agendas
Date Fri, 06 Apr 2018 13:58:20 GMT
This is an automated email from the ASF dual-hosted git repository.

curcuru pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new ca802a2  Allow parsing of pre-2007 agendas
ca802a2 is described below

commit ca802a2d018931a133afd54eb429f09cb68b40c7
Author: Shane Curcuru <asf@shanecurcuru.org>
AuthorDate: Fri Apr 6 09:58:14 2018 -0400

    Allow parsing of pre-2007 agendas
    
    Note that summary data isn’t always available earlier than 2007, but
    partial data works.  Improve error/skip reporting.
---
 tools/agenda_summary.rb      |  5 +----
 www/officers/board-stats.cgi | 10 ++++++----
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/tools/agenda_summary.rb b/tools/agenda_summary.rb
index 43dc29e..147d7c2 100644
--- a/tools/agenda_summary.rb
+++ b/tools/agenda_summary.rb
@@ -15,10 +15,7 @@ STATS_ROLLUP = 'stats'
 # @return stats hash of of various statistics from minutes
 def summarize_all(dir = BOARD)
   summaries = Hash.new{|h,k| h[k] = {} }
-  Dir[File.join(dir, 'archived_agendas', "board_agenda_2007*.txt"), 
-    File.join(dir, 'archived_agendas', "board_agenda_2008*.txt"), 
-    File.join(dir, 'archived_agendas', "board_agenda_2009*.txt"), 
-    File.join(dir, 'archived_agendas', "board_agenda_201*.txt")].each do |f|
+  Dir[File.join(dir, 'archived_agendas', "board_agenda_2*.txt")].each do |f|
       summaries[File.basename(f, '.*')] = ASF::Board::Agenda.summarize(f)
   end
   allpmcs = Set.new()
diff --git a/www/officers/board-stats.cgi b/www/officers/board-stats.cgi
index 22cad1b..d04a9f0 100755
--- a/www/officers/board-stats.cgi
+++ b/www/officers/board-stats.cgi
@@ -43,6 +43,7 @@ _html do
           _strong.text_warning "PRIVATE DATA: "
           _ "The numbers of Average Preapprovals and Report Comments Length are private,
and must not be shared outside the Membership."
         end
+        _p "Note: the text format of board minutes changed over time.  Summaries before 2008
may not accurately reflect actual meeting actions due to parsing issues."
       }
       ) do
       _table.table.table_hover.table_striped do
@@ -93,13 +94,13 @@ _html do
                   _ agenda[PMCS].length
                 end
                 _td.text_center do
-                  _ agenda['stats']['avgreportlen'].round(0)
+                  _ agenda['stats']['avgreportlen'].round(0) if agenda['stats'].has_key?('avgreportlen')
                 end
                 _td.text_center do
-                  _ agenda['stats']['avgcommentlen'].round(0)
+                  _ agenda['stats']['avgcommentlen'].round(0) if agenda['stats'].has_key?('avgcommentlen')
                 end
                 _td.text_center do
-                  _ agenda['stats']['avgapprovals'].round(1)
+                  _ agenda['stats']['avgapprovals'].round(1) if agenda['stats'].has_key?('avgapprovals')
                 end
                 _td.text_center do
                   _ agenda['stats']['discusstextlen']
@@ -111,12 +112,13 @@ _html do
       end
     end
     _h3.skips! 'Note: Some Months Are Skipped'
-    _p "Some month's agendas aren't easily parsed, and are skipped (i.e. not counted here).
Current skip list:"
+    _p "Some month's agendas aren't easily parsed due to different formatting, and are skipped
(i.e. not counted here). Current skip list:"
     _ul do
       datums.select{ |k,v| v.is_a?(Hash) && v.has_key?(ERRORS) }.each do |month,
agenda|
         _li do
           _a href: "#{REPO}/archived_agendas/#{month}.txt" do
             _span.text_warning month
+            _ " - #{agenda[ERRORS].partition(')').last}"
           end
         end
       end

-- 
To stop receiving notification emails like this one, please contact
curcuru@apache.org.

Mime
View raw message