<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -110,14 +110,6 @@ class People &lt; Array
   # End of methods that return Period objects
   
   # Facade for readers and writers
-  def People.read_members_csv(people_filename, members_filename)
-    PeopleCSVReader.read_members(people_filename, members_filename)
-  end
-  
-  def read_ministers_csv(filename)
-    PeopleCSVReader.read_ministers(filename, self)
-  end
-    
   def write_xml(people_filename, members_filename, senators_filename, ministers_filename)
     PeopleXMLWriter.write(self, people_filename, members_filename, senators_filename, ministers_filename)
   end</diff>
      <filename>lib/people.rb</filename>
    </modified>
    <modified>
      <diff>@@ -15,7 +15,8 @@ class PeopleCSVReader
     data
   end
   
-  def PeopleCSVReader.read_members(people_filename, members_filename)
+  def PeopleCSVReader.read_members(people_filename = &quot;#{File.dirname(__FILE__)}/../data/people.csv&quot;,
+      members_filename = &quot;#{File.dirname(__FILE__)}/../data/members.csv&quot;)
     data = read_raw_csv(people_filename)
     data.shift
     data.shift
@@ -81,7 +82,7 @@ class PeopleCSVReader
   end
   
   # Attaches ministerial information to people
-  def PeopleCSVReader.read_ministers(filename, people)
+  def PeopleCSVReader.read_ministers(people, filename)
     data = CSV.readlines(filename)
     # Remove the first two rows
     data.shift
@@ -101,6 +102,12 @@ class PeopleCSVReader
     end
   end
   
+  def PeopleCSVReader.read_all_ministers(people, ministers_filename = &quot;#{File.dirname(__FILE__)}/../data/ministers.csv&quot;,
+    shadow_ministers_filename = &quot;#{File.dirname(__FILE__)}/../data/shadow-ministers.csv&quot;)
+    read_ministers(people, ministers_filename)
+    read_ministers(people, shadow_ministers_filename)
+  end
+  
   private
   
   def PeopleCSVReader.parse_party(party)</diff>
      <filename>lib/people_csv_reader.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,6 +7,6 @@ require 'people'
 
 conf = Configuration.new
 
-people = People.read_members_csv(&quot;data/people.csv&quot;, &quot;data/members.csv&quot;)
+people = PeopleCSVReader.read_members
 puts &quot;Downloading person images...&quot;
 people.download_images(&quot;#{conf.file_image_path}/mps&quot;, &quot;#{conf.file_image_path}/mpsL&quot;)</diff>
      <filename>member-images.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,7 +13,7 @@ agent = MechanizeProxy.new
 agent.cache_subdirectory = &quot;parse-member-links&quot;
 
 puts &quot;Reading member data...&quot;
-people = People.read_members_csv(&quot;data/people.csv&quot;, &quot;data/members.csv&quot;)
+people = PeopleCSVReader.read_members
 
 puts &quot;Personal home page &amp; Contact Details (Gov website)...&quot;
 </diff>
      <filename>parse-member-links.rb</filename>
    </modified>
    <modified>
      <diff>@@ -20,9 +20,8 @@ system(&quot;mkdir -p #{conf.members_xml_path}&quot;)
 end
 
 puts &quot;Reading members data...&quot;
-people = People.read_members_csv(&quot;data/people.csv&quot;, &quot;data/members.csv&quot;)
-people.read_ministers_csv(&quot;data/ministers.csv&quot;)
-people.read_ministers_csv(&quot;data/shadow-ministers.csv&quot;)
+people = PeopleCSVReader.read_members
+PeopleCSVReader.read_all_ministers(people)
 puts &quot;Running consistency checks...&quot;
 # First check that each constituency is showing a continuous period of members with there never being more than one member at any time.
 # Collect all the division names</diff>
      <filename>parse-members.rb</filename>
    </modified>
    <modified>
      <diff>@@ -72,7 +72,7 @@ system(&quot;mkdir -p #{conf.xml_path}/scrapedxml/debates #{conf.xml_path}/scrapedxml
 system(&quot;cp #{File.dirname(__FILE__)}/data/empty-template.xml #{conf.xml_path}/scrapedxml/regmem/regmem2000-01-01.xml&quot;)
 
 # First load people back in so that we can look up member id's
-people = People.read_members_csv(&quot;#{File.dirname(__FILE__)}/data/people.csv&quot;, &quot;#{File.dirname(__FILE__)}/data/members.csv&quot;)
+people = PeopleCSVReader.read_members
 
 parser = HansardParser.new(people)
 </diff>
      <filename>parse-speeches.rb</filename>
    </modified>
    <modified>
      <diff>@@ -21,7 +21,7 @@ data.shift
 data.shift
 
 puts &quot;Reading members data...&quot;
-people = People.read_members_csv(&quot;data/people.csv&quot;, &quot;data/members.csv&quot;)
+people = PeopleCSVReader.read_members
 all_members = people.all_periods_in_house(House.representatives)
 
 # First check that all the constituencies are valid</diff>
      <filename>postcodes.rb</filename>
    </modified>
    <modified>
      <diff>@@ -29,9 +29,8 @@ system(&quot;mkdir -p #{conf.members_xml_path}&quot;)
 
 puts &quot;Reading CSV data...&quot;
 data_path = &quot;#{File.dirname(__FILE__)}/../data&quot;
-people = People.read_members_csv(&quot;#{data_path}/people.csv&quot;, &quot;#{data_path}/members.csv&quot;)
-people.read_ministers_csv(&quot;#{data_path}/ministers.csv&quot;)
-people.read_ministers_csv(&quot;#{data_path}/shadow-ministers.csv&quot;)
+people = PeopleCSVReader.read_members
+PeopleCSVReader.read_all_ministers(people)
 puts &quot;Writing XML...&quot;
 people.write_xml(&quot;#{conf.members_xml_path}/people.xml&quot;, &quot;#{conf.members_xml_path}/all-members.xml&quot;,
   &quot;#{conf.members_xml_path}/peers-ucl.xml&quot;, &quot;#{conf.members_xml_path}/ministers.xml&quot;)</diff>
      <filename>tests-regression/test_parse_members.rb</filename>
    </modified>
    <modified>
      <diff>@@ -31,7 +31,7 @@ skip_dates = []
 conf = Configuration.new
 
 # First load people back in so that we can look up member id's
-people = People.read_members_csv(&quot;#{File.dirname(__FILE__)}/../data/people.csv&quot;, &quot;#{File.dirname(__FILE__)}/../data/members.csv&quot;)
+people = PeopleCSVReader.read_members
 
 parser = HansardParser.new(people)
 </diff>
      <filename>tests-regression/test_parse_speeches.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,8 +5,8 @@ require 'people'
 
 class TestPeople &lt; Test::Unit::TestCase
   def test_speaker
-    people = People.read_members_csv(&quot;#{File.dirname(__FILE__)}/../data/people.csv&quot;, &quot;#{File.dirname(__FILE__)}/../data/members.csv&quot;)
-    people.read_ministers_csv(&quot;#{File.dirname(__FILE__)}/../data/ministers.csv&quot;)
+    people = PeopleCSVReader.read_members
+    PeopleCSVReader.read_all_ministers(people)
     member = people.house_speaker(Date.new(2007, 10, 1))
     assert_equal(&quot;David Peter Maxwell Hawker&quot;, member.person.name.full_name)
     assert(member.house_speaker?)</diff>
      <filename>tests/test_people.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,9 +13,8 @@ class TestPeopleCSVReader &lt; Test::Unit::TestCase
     ref.add_minister_position(:count =&gt; 790, :from_date =&gt; Date.new(2007,12,6), :to_date =&gt; DateWithFuture.future,
       :position =&gt; &quot;Shadow Parliamentary Secretary for Local Government&quot;)
 
-    people = People.read_members_csv(&quot;#{File.dirname(__FILE__)}/../data/people.csv&quot;, &quot;#{File.dirname(__FILE__)}/../data/members.csv&quot;)
-    people.read_ministers_csv(&quot;#{File.dirname(__FILE__)}/../data/ministers.csv&quot;)
-    people.read_ministers_csv(&quot;#{File.dirname(__FILE__)}/../data/shadow-ministers.csv&quot;)
+    people = PeopleCSVReader.read_members
+    PeopleCSVReader.read_all_ministers(people)
     sophie_mirabella = people.find_person_by_name(Name.new(:first =&gt; &quot;Sophie&quot;, :last =&gt; &quot;Mirabella&quot;))
     
     assert_equal(ref, sophie_mirabella)</diff>
      <filename>tests/test_people_csv_reader.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c58e1997047caa50d22c64396e2e0c963aba2f9d</id>
    </parent>
  </parents>
  <author>
    <name>Matthew Landauer</name>
    <email>matthew@openaustralia.org</email>
  </author>
  <url>http://github.com/mlandauer/openaustralia-parser/commit/bdc6a5685b3a1f74857ca8b42e0bf4031170f83b</url>
  <id>bdc6a5685b3a1f74857ca8b42e0bf4031170f83b</id>
  <committed-date>2008-07-15T20:51:02-07:00</committed-date>
  <authored-date>2008-07-15T20:51:02-07:00</authored-date>
  <message>Got rid of duplication of paths to all the csv files</message>
  <tree>a274a8526d2299182e6d8d194b03d71616a52e93</tree>
  <committer>
    <name>Matthew Landauer</name>
    <email>matthew@openaustralia.org</email>
  </committer>
</commit>
