typingpool 0.8.13 → 0.8.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b7f1162da9010eea09066f72b78c40eacc342d34
4
- data.tar.gz: 4243222ed91a427012291a3be392ca5de6d5bc70
3
+ metadata.gz: 928624f4083c4e62e07f7dda152e4c7e23f3092b
4
+ data.tar.gz: b6ba151430fec154bd4d1ddecef4c108154e33a0
5
5
  SHA512:
6
- metadata.gz: 982e426847cad2182163ab13d8832e70f64c84ee6f2ffe3bdcc712c346d8655cda67eb8c116fe22a761010f0e780f0c62c9fe9e76eacffe4d2abf8517ee50686
7
- data.tar.gz: 063621305ccb40f636fd1f8234bf5f97d7584ff81d62220bc47c64ce30e259be8e6278ed773828c078f8980f9d88c8ef074adbe645c0e916eff34cdfb99d7d4d
6
+ metadata.gz: f62939bbac1f46397b3130b5d7e1fac88f2446d56b44135d321fcde02dd30126281eec61eb359bfb48d2e8f039aede7fcb50a111274d20b48cb1f0b88bd8a103
7
+ data.tar.gz: ccf093a7d5402071a6544c9e7999fb9169f5e43a462705c449a05d5500811fcbd7c775eb08c339ddfe4a69ff1160c96ca34a3ae3aae5a56d896799403aceba3a
data/bin/tp-finish CHANGED
@@ -3,8 +3,12 @@
3
3
  require 'optparse'
4
4
  require 'typingpool'
5
5
  require 'fileutils'
6
- require 'typingpool/utility/test'
7
- include Typingpool::Utility::Test
6
+ require 'typingpool/utility/test/script'
7
+ require 'typingpool/app/cli/formatter'
8
+ require 'highline/import'
9
+
10
+ include Typingpool::Utility::Test::Script
11
+ include Typingpool::App::CLI::Formatter
8
12
 
9
13
  options = {}
10
14
  OptionParser.new do |commands|
@@ -19,6 +23,14 @@ OptionParser.new do |commands|
19
23
  options[:dead] = true
20
24
  end
21
25
 
26
+ commands.on('--force',
27
+ "Do not prompt for confirmation.",
28
+ "Will delete HITs even if they're approved but not in the transcript yet and",
29
+ "will silently skip HITs even if they're submitted and not reviewed") do
30
+
31
+ options[:force] = true
32
+ end
33
+
22
34
  commands.on('--sandbox',
23
35
  "Test in Mechanical Turk's sandbox") do
24
36
  options[:sandbox] = true
@@ -85,6 +97,58 @@ results = if project
85
97
  end
86
98
  end
87
99
 
100
+ #Check for potential data loss -- submitted HITs not yet reviewed,
101
+ #approved HITs not yet in the local transcript
102
+ submitted_count = results.select{|r| r.submitted? }.count
103
+ if submitted_count > 0
104
+ unless options[:force]
105
+ are, submissions, them = if submitted_count == 1
106
+ ['is', 'submission', 'it']
107
+ else
108
+ ['are', 'submissions', 'them']
109
+ end
110
+ STDERR.puts "There #{are} #{submitted_count} unreviewed #{submissions} that cannot be finished."
111
+ choices = ["skip them", "quit"]
112
+ choice = ask_for_selection(choices, 0, prompt_from_choices(choices, 0) + cli_reverse('? '))
113
+ case choice
114
+ when 'quit'
115
+ exit
116
+ when 'skip them'
117
+ STDERR.puts "Skipping unreviewed #{submissions}..."
118
+ end #case choice
119
+ end #unless options[:force]
120
+ results.reject!{|r| r.submitted? }
121
+ end
122
+
123
+ unless options[:force]
124
+ Typingpool::App.find_projects_waiting_for_hits(results.select{|r| r.approved? }, config) do |project, hits|
125
+ assignments = Typingpool::App.assignments_file_for_sandbox_status(options[:sandbox], project)
126
+ unrecorded_approved_hits_in_project = []
127
+ Typingpool::App.with_hits_in_assignments_file(assignments, hits) do |hit, assignment|
128
+ next if assignment['transcript']
129
+ unrecorded_approved_hits_in_project.push(hit)
130
+ end
131
+ if unrecorded_approved_hits_in_project.count > 0
132
+ are, submissions, them, have = if unrecorded_approved_hits_in_project.count == 1
133
+ ['is', 'submission', 'it', 'has']
134
+ else
135
+ ['are', 'submissions', 'them', 'have']
136
+ end
137
+
138
+ STDERR.puts "There #{are} #{unrecorded_approved_hits_in_project.count} approved #{submissions} that #{have} not been added\nto the transcript for #{project.name}."
139
+ choices = ['add to transcript', 'delete without adding', 'quit']
140
+ choice = ask_for_selection(choices, 0, prompt_from_choices(choices, 0) + cli_reverse('? '))
141
+ case choice
142
+ when 'quit'
143
+ exit
144
+ when 'add to transcript'
145
+ Typingpool::App.record_approved_hits_in_assignments_file(assignments, unrecorded_approved_hits_in_project)
146
+ Typingpool::App.create_transcript(project, assignments)
147
+ end #case choice
148
+ end #if unrecorded_approved_hits_in_project_count > 0
149
+ end #App.find_projects_waiting_for_hits do
150
+ end #unless options[:force]
151
+
88
152
  #Remove the results from Mechanical Turk
89
153
  fails = []
90
154
  results.each do |result|
@@ -120,8 +184,8 @@ if project
120
184
  STDERR.puts "Removing #{file} from #{project.remote.host}"
121
185
  end
122
186
  if options[:sandbox]
123
- #delete sandbox-assignment.csv so we know it's safe to delete
187
+ #move sandbox-assignment.csv so we know it's safe to delete
124
188
  #audio files when we finish using regular assignment.csv
125
- FileUtils.remove_entry_secure project.local.file('data', 'sandbox-assignment.csv')
189
+ File.rename project.local.file('data', 'sandbox-assignment.csv').to_s, project.local.file('data', 'old-sandbox-assignment.csv').to_s
126
190
  end
127
191
  end #if project
data/bin/tp-review CHANGED
@@ -125,25 +125,11 @@ catch :quitting do
125
125
  cli_bold(" by ") +
126
126
  hit.assignment.worker_id)
127
127
  say(cli_encode(hit.transcript.body_as_text(4, 68)))
128
- prompt = choices.map do |c|
129
- cli_reverse('(') +
130
- cli_reverse(cli_bold(c.slice(0).upcase)) +
131
- cli_reverse(")#{c.slice(1, c.size)}")
132
- end
133
- prompt << cli_reverse('[') + prompt.pop + cli_reverse(']')
134
- prompt = prompt.join(cli_reverse(', '))
128
+ prompt = prompt_from_choices(choices, -1)
135
129
  prompt += cli_reverse('? ')
136
130
  prompt += cli_reverse("(#{hits_decided_count}/#{hits_needing_decision_count}) ")
137
131
 
138
- choice=nil
139
- until choice
140
- input = ask(prompt)
141
- if input.to_s.match(/^\s*$/)
142
- choice = choices.last
143
- elsif not(choice = choices.detect{|possible| possible[0] == input.downcase[0] })
144
- say("Invalid selection '#{input}'.")
145
- end
146
- end #until choice
132
+ choice = ask_for_selection(choices, -1, prompt)
147
133
 
148
134
  case choice
149
135
  when 'approve'
@@ -284,7 +284,11 @@ module Typingpool
284
284
  #assignments -- hit.full.assignments_completed == 0. This check
285
285
  #is only performed when hit.full has already been loaded.)
286
286
  def approved?
287
- assignment_status_match?('Approved')
287
+ if @full
288
+ return false if full.assignments_completed == 0
289
+ return false if full.status != 'Reviewable'
290
+ end
291
+ assignment.status == 'Approved'
288
292
  end
289
293
 
290
294
  #Returns true if this HIT has a rejected assignment associated
@@ -292,7 +296,11 @@ module Typingpool
292
296
  #Typingpool::Amazon::HIT::Assignment, see the documentation for
293
297
  #approved?.)
294
298
  def rejected?
295
- assignment_status_match?('Rejected')
299
+ if @full
300
+ return false if full.assignments_completed == 0
301
+ return false if full.status != 'Reviewable'
302
+ end
303
+ assignment.status == 'Rejected'
296
304
  end
297
305
 
298
306
  #Returns true if this HIT has a submitted assignment associated
@@ -300,7 +308,10 @@ module Typingpool
300
308
  #Typingpool::Amazon::HIT::Assignment, see the documentation for
301
309
  #approved?.)
302
310
  def submitted?
303
- assignment_status_match?('Submitted')
311
+ if @full
312
+ return false if full.status != 'Reviewable'
313
+ end
314
+ assignment.status == 'Submitted'
304
315
  end
305
316
 
306
317
 
@@ -396,18 +407,7 @@ module Typingpool
396
407
  #this is called, an Amazon HTTP request is typically (but not
397
408
  #always) sent.
398
409
  def assignment
399
- if @assignment.nil?
400
- if @full && full.assignments_completed == 0
401
- #It would be dangerous to do this if the HIT were to be
402
- #cached, since we would then never check for the
403
- #assignment again. But we know this HIT won't be cached
404
- #while it is active, since we only cache approved and
405
- #rejected HITs.
406
- @assignment = Assignment::Empty.new
407
- else
408
- @assignment = Assignment.new(at_amazon) #expensive
409
- end
410
- end
410
+ @assignment ||= Assignment.new(at_amazon) #expensive
411
411
  @assignment
412
412
  end
413
413
 
@@ -449,15 +449,6 @@ module Typingpool
449
449
  end
450
450
  end
451
451
 
452
- def assignment_status_match?(status)
453
- if @full
454
- return false if full.assignments_completed == 0
455
- return false if full.status != 'Reviewable'
456
- end
457
- assignment.status == status
458
- end
459
-
460
-
461
452
  @@cacheable_assignment_status = Set.new %w(Approved Rejected)
462
453
  def cacheable?
463
454
  if @ours == false
@@ -3,6 +3,31 @@ module Typingpool
3
3
  module CLI
4
4
  module Formatter
5
5
  require 'highline/import'
6
+
7
+ def prompt_from_choices(choices, default_index)
8
+ prompt = choices.map do |choice|
9
+ cli_reverse('(') +
10
+ cli_reverse(cli_bold(choice.slice(0).upcase)) +
11
+ cli_reverse(")#{choice.slice(1, choice.size)}")
12
+ end
13
+ prompt[default_index] = cli_reverse('[') + prompt[default_index] + cli_reverse(']')
14
+ prompt = prompt.join(cli_reverse(', '))
15
+ prompt
16
+ end
17
+
18
+ def ask_for_selection(choices, default_index, prompt)
19
+ selection = nil
20
+ until selection
21
+ input = ask(prompt)
22
+ if input.to_s.match(/^\s*$/)
23
+ selection = choices.last
24
+ elsif not(selection = choices.detect{|possible| possible[0] == input.downcase[0] })
25
+ say("Invalid selection '#{input}'.")
26
+ end
27
+ end #until selection
28
+ selection
29
+ end
30
+
6
31
  def cli_bold(text)
7
32
  HighLine.color(text, :bold)
8
33
  end
@@ -325,11 +325,11 @@ module Typingpool
325
325
  # were just assigned (that is, that have one
326
326
  # assignment, which has a blank status).
327
327
  def record_assigned_hits_in_assignments_file(assignments_file, hits)
328
- record_hits_in_assignments_file(assignments_file, hits) do |hit, csv_row|
328
+ with_hits_in_assignments_file(assignments_file, hits) do |hit, csv_row|
329
329
  csv_row['hit_id'] = hit.id
330
330
  csv_row['hit_expires_at'] = hit.full.expires_at.to_s
331
331
  csv_row['hit_assignments_duration'] = hit.full.assignments_duration.to_s
332
- end #record_hits_in_project do....
332
+ end #with_hits_in_assignments_file do....
333
333
  end
334
334
 
335
335
  #Extracts relevant information from a collection of
@@ -344,12 +344,12 @@ module Typingpool
344
344
  # [hits] An enumerable collection of Amazon::HIT instances whose
345
345
  # one assignment has the status 'Approved'.
346
346
  def record_approved_hits_in_assignments_file(assignments_file, hits)
347
- record_hits_in_assignments_file(assignments_file, hits) do |hit, csv_row|
347
+ with_hits_in_assignments_file(assignments_file, hits) do |hit, csv_row|
348
348
  next if csv_row['transcript']
349
349
  csv_row['transcript'] = hit.transcript.body
350
350
  csv_row['worker'] = hit.transcript.worker
351
351
  csv_row['hit_id'] = hit.id
352
- end #record_hits_in_project do...
352
+ end #with_hits_in_assignments_file do...
353
353
  end
354
354
 
355
355
  #Given a Project instance and an array of modified assignment
@@ -376,7 +376,7 @@ module Typingpool
376
376
  # [hits] An enumerable collection of Amazon::HIT instances to be
377
377
  # deleted.
378
378
  def unrecord_hits_in_assignments_file(assignments_file, hits)
379
- record_hits_in_assignments_file(assignments_file, hits) do |hit, csv_row|
379
+ with_hits_in_assignments_file(assignments_file, hits) do |hit, csv_row|
380
380
  unrecord_hit_in_csv_row(csv_row)
381
381
  end
382
382
  end
@@ -402,7 +402,7 @@ module Typingpool
402
402
  # HITs in the Project assignment CSV will be
403
403
  # deleted.
404
404
  def unrecord_hits_details_in_assignments_file(assignments_file, hits=nil)
405
- record_hits_in_assignments_file(assignments_file, hits) do |hit, csv_row|
405
+ with_hits_in_assignments_file(assignments_file, hits) do |hit, csv_row|
406
406
  unrecord_hit_details_in_csv_row(csv_row)
407
407
  end
408
408
  end
@@ -439,6 +439,17 @@ module Typingpool
439
439
  end #if config.sftp
440
440
  end
441
441
 
442
+ def with_hits_in_assignments_file(assignments_file, hits)
443
+ hits_by_url = self.hits_by_url(hits) if hits
444
+ assignments_file.each! do |csv_row|
445
+ hit = nil
446
+ if hits
447
+ hit = hits_by_url[csv_row['audio_url']] or next
448
+ end
449
+ yield(hit, csv_row)
450
+ end
451
+ end
452
+
442
453
 
443
454
  #protected
444
455
 
@@ -455,17 +466,6 @@ module Typingpool
455
466
  end #begin
456
467
  end
457
468
 
458
- def record_hits_in_assignments_file(assignments_file, hits)
459
- hits_by_url = self.hits_by_url(hits) if hits
460
- assignments_file.each! do |csv_row|
461
- hit = nil
462
- if hits
463
- hit = hits_by_url[csv_row['audio_url']] or next
464
- end
465
- yield(hit, csv_row)
466
- end
467
- end
468
-
469
469
  def record_assignment_upload_status(assignments, uploading, types, status)
470
470
  record_in_selected_assignments(assignments, uploading) do |assignment|
471
471
  types.each do |type|
@@ -1 +1 @@
1
- 1483150167
1
+ 1492202894
@@ -0,0 +1 @@
1
+ 7e36c4fdb505ff41a447489414245ec2
@@ -0,0 +1,7 @@
1
+ audio_url,project_id,unusual,chunk,chunk_hours,chunk_minutes,chunk_seconds,voices_count,voice1,voice1title,voice2,voice2title,audio_uploaded,assignment_url,assignment_uploaded,hit_id,hit_expires_at,hit_assignments_duration
2
+ https://typingpool-test-rtt-12302016.s3.amazonaws.com/Typingpool%27s%20Test%20%26%20Interview.00.00.7e36c4fdb505ff41a447489414245ec2.IYUACW.mp3,7e36c4fdb505ff41a447489414245ec2,"Hack Day, Sunnyvale, Chad D",0:22,,,22,2,Ryan,"",Havi,hacker,yes,https://typingpool-test-rtt-12302016.s3.amazonaws.com/Typingpool%27s%20Test%20%26%20Interview.00.00.7e36c4fdb505ff41a447489414245ec2.OPFEAC.html,yes,32TZXEA1OL0WBNGWPNNWO5YC5P9147,2017-04-15 06:32:54 UTC,18000
3
+ https://typingpool-test-rtt-12302016.s3.amazonaws.com/Typingpool%27s%20Test%20%26%20Interview.00.22.7e36c4fdb505ff41a447489414245ec2.BVVSJQ.mp3,7e36c4fdb505ff41a447489414245ec2,"Hack Day, Sunnyvale, Chad D",0:22,,,22,2,Ryan,"",Havi,hacker,yes,https://typingpool-test-rtt-12302016.s3.amazonaws.com/Typingpool%27s%20Test%20%26%20Interview.00.22.7e36c4fdb505ff41a447489414245ec2.DRYBVL.html,yes,3ULIZ0H1VALE76KW3S66TX4Q5L415C,2017-04-15 06:32:55 UTC,18000
4
+ https://typingpool-test-rtt-12302016.s3.amazonaws.com/Typingpool%27s%20Test%20%26%20Interview.00.44.7e36c4fdb505ff41a447489414245ec2.JBJUVA.mp3,7e36c4fdb505ff41a447489414245ec2,"Hack Day, Sunnyvale, Chad D",0:22,,,22,2,Ryan,"",Havi,hacker,yes,https://typingpool-test-rtt-12302016.s3.amazonaws.com/Typingpool%27s%20Test%20%26%20Interview.00.44.7e36c4fdb505ff41a447489414245ec2.UFDMYQ.html,yes,306W7JMRYYEY7MLQ3N6YBTRQTNW8B4,2017-04-15 06:32:55 UTC,18000
5
+ https://typingpool-test-rtt-12302016.s3.amazonaws.com/Typingpool%27s%20Test%20%26%20Interview.01.06.7e36c4fdb505ff41a447489414245ec2.VRYRQT.mp3,7e36c4fdb505ff41a447489414245ec2,"Hack Day, Sunnyvale, Chad D",0:22,,,22,2,Ryan,"",Havi,hacker,yes,https://typingpool-test-rtt-12302016.s3.amazonaws.com/Typingpool%27s%20Test%20%26%20Interview.01.06.7e36c4fdb505ff41a447489414245ec2.VKDWVB.html,yes,3V7ICJJAZAWXOLYORKGLUHBLR10B40,2017-04-15 06:32:56 UTC,18000
6
+ https://typingpool-test-rtt-12302016.s3.amazonaws.com/Typingpool%27s%20Test%20%26%20Interview.01.28.7e36c4fdb505ff41a447489414245ec2.OIKCER.mp3,7e36c4fdb505ff41a447489414245ec2,"Hack Day, Sunnyvale, Chad D",0:22,,,22,2,Ryan,"",Havi,hacker,yes,https://typingpool-test-rtt-12302016.s3.amazonaws.com/Typingpool%27s%20Test%20%26%20Interview.01.28.7e36c4fdb505ff41a447489414245ec2.YMRKUI.html,yes,37VHPF5VYCJHHRDWHN2TMDX8B8W8CB,2017-04-15 06:32:56 UTC,18000
7
+ https://typingpool-test-rtt-12302016.s3.amazonaws.com/Typingpool%27s%20Test%20%26%20Interview.01.50.7e36c4fdb505ff41a447489414245ec2.VXDFAS.mp3,7e36c4fdb505ff41a447489414245ec2,"Hack Day, Sunnyvale, Chad D",0:22,,,22,2,Ryan,"",Havi,hacker,yes,https://typingpool-test-rtt-12302016.s3.amazonaws.com/Typingpool%27s%20Test%20%26%20Interview.01.50.7e36c4fdb505ff41a447489414245ec2.WLEAXE.html,yes,3566S7OX5DZTUAYFRLL3RHIMWRZ17R,2017-04-15 06:32:56 UTC,18000
@@ -5,16 +5,16 @@ http_interactions:
5
5
  uri: https://mechanicalturk.sandbox.amazonaws.com/
6
6
  body:
7
7
  encoding: UTF-8
8
- string: Title=Transcribe+MP3+of+1-minute+phone+calll&Description=I+split+up+a+telephone+conversation+into+1-minute+parts%2C+you+transcribe+the+audio+for+one+1-minute+part.&AssignmentDurationInSeconds=600&Reward.Amount=0.01&Reward.CurrencyCode=USD&Keywords=transcription%2C+audio%2C+mp3&AutoApprovalDelayInSeconds=86400&QualificationRequirement.1.QualificationTypeId=000000000000000000L0&QualificationRequirement.1.Comparator=GreaterThanOrEqualTo&QualificationRequirement.1.IntegerValue=95&QualificationRequirement.1.RequiredToPreview=true&QualificationRequirement.2.QualificationTypeId=00000000000000000040&QualificationRequirement.2.Comparator=GreaterThanOrEqualTo&QualificationRequirement.2.IntegerValue=100&QualificationRequirement.2.RequiredToPreview=true&MaxAssignments=1&Question=%3CExternalQuestion+xmlns%3D%22http%3A%2F%2Fmechanicalturk.amazonaws.com%2FAWSMechanicalTurkDataSchemas%2F2006-07-14%2FExternalQuestion.xsd%22%3E%0A++%3CExternalURL%3Ehttps%3A%2F%2Fexample.com%2Fassignments%2F101.html%3C%2FExternalURL%3E%0A++%3CFrameHeight%3E400%3C%2FFrameHeight%3E%0A%3C%2FExternalQuestion%3E%0A&LifetimeInSeconds=1200&RequesterAnnotation=typingpool_url%3Dhttp%253A%252F%252Fwebmasher.com%252Fmturk%252FTestTpInterview.00.00.77421e0a6302f4c8c34e24004a4ad828.YSOQJU.mp3%26amp%3Btypingpool_project_id%3D77421e0a6302f4c8c34e24004a4ad828&Operation=CreateHIT&Service=AWSMechanicalTurkRequester&AWSAccessKeyId=<AWS_KEY>&Timestamp=2016-12-31T02%3A09%3A26Z&Version=2012-03-25&Signature=o4gncrEzK6p0eoLgtTIjghM%2BHRU%3D
8
+ string: Title=Transcribe+MP3+of+1-minute+phone+calll&Description=I+split+up+a+telephone+conversation+into+1-minute+parts%2C+you+transcribe+the+audio+for+one+1-minute+part.&AssignmentDurationInSeconds=600&Reward.Amount=0.01&Reward.CurrencyCode=USD&Keywords=transcription%2C+audio%2C+mp3&AutoApprovalDelayInSeconds=86400&QualificationRequirement.1.QualificationTypeId=000000000000000000L0&QualificationRequirement.1.Comparator=GreaterThanOrEqualTo&QualificationRequirement.1.IntegerValue=95&QualificationRequirement.1.RequiredToPreview=true&QualificationRequirement.2.QualificationTypeId=00000000000000000040&QualificationRequirement.2.Comparator=GreaterThanOrEqualTo&QualificationRequirement.2.IntegerValue=100&QualificationRequirement.2.RequiredToPreview=true&MaxAssignments=1&Question=%3CExternalQuestion+xmlns%3D%22http%3A%2F%2Fmechanicalturk.amazonaws.com%2FAWSMechanicalTurkDataSchemas%2F2006-07-14%2FExternalQuestion.xsd%22%3E%0A++%3CExternalURL%3Ehttps%3A%2F%2Fexample.com%2Fassignments%2F101.html%3C%2FExternalURL%3E%0A++%3CFrameHeight%3E400%3C%2FFrameHeight%3E%0A%3C%2FExternalQuestion%3E%0A&LifetimeInSeconds=1200&RequesterAnnotation=typingpool_url%3Dhttp%253A%252F%252Fwebmasher.com%252Fmturk%252FTestTpInterview.00.00.77421e0a6302f4c8c34e24004a4ad828.YSOQJU.mp3%26amp%3Btypingpool_project_id%3D77421e0a6302f4c8c34e24004a4ad828&Operation=CreateHIT&Service=AWSMechanicalTurkRequester&AWSAccessKeyId=<AWS_KEY>&Timestamp=2017-04-14T20%3A48%3A04Z&Version=2012-03-25&Signature=LEK5VY1M3qEwBiGMGeFMVTRdaN8%3D
9
9
  headers:
10
10
  Accept:
11
- - '*/*'
11
+ - "*/*"
12
12
  Accept-Encoding:
13
13
  - gzip, deflate
14
14
  User-Agent:
15
- - rest-client/2.0.0 (darwin15.6.0 x86_64) ruby/2.0.0p353
15
+ - rest-client/2.0.0 (darwin15.6.0 x86_64) ruby/2.3.3p222
16
16
  Content-Length:
17
- - '1517'
17
+ - '1515'
18
18
  Host:
19
19
  - mechanicalturk.sandbox.amazonaws.com
20
20
  response:
@@ -27,31 +27,31 @@ http_interactions:
27
27
  Transfer-Encoding:
28
28
  - chunked
29
29
  Date:
30
- - Sat, 31 Dec 2016 02:09:26 GMT
30
+ - Fri, 14 Apr 2017 20:48:04 GMT
31
31
  Server:
32
32
  - MTurk
33
33
  body:
34
34
  encoding: UTF-8
35
35
  string: |-
36
36
  <?xml version="1.0"?>
37
- <CreateHITResponse><OperationRequest><RequestId>7559bb2c-8cb2-44ec-9881-0ae5010408f5</RequestId></OperationRequest><HIT><Request><IsValid>True</IsValid></Request><HITId>3FULMHZ7OUDT7C2LI96U8XMF2PGM4P</HITId><HITTypeId>3FJMTJX97O5QAQ6TYMEKGK4K51PA6J</HITTypeId></HIT></CreateHITResponse>
37
+ <CreateHITResponse><OperationRequest><RequestId>76a5c877-b1aa-44fb-811d-5d51225ad022</RequestId></OperationRequest><HIT><Request><IsValid>True</IsValid></Request><HITId>3HYV4299H0CWEPXADE8OC1XBWK9E8A</HITId><HITTypeId>3FJMTJX97O5QAQ6TYMEKGK4K51PA6J</HITTypeId></HIT></CreateHITResponse>
38
38
  http_version:
39
- recorded_at: Sat, 31 Dec 2016 02:09:26 GMT
39
+ recorded_at: Fri, 14 Apr 2017 20:48:04 GMT
40
40
  - request:
41
41
  method: post
42
42
  uri: https://mechanicalturk.sandbox.amazonaws.com/
43
43
  body:
44
44
  encoding: UTF-8
45
- string: HITId=3FULMHZ7OUDT7C2LI96U8XMF2PGM4P&ResponseGroup.0=HITDetail&ResponseGroup.1=HITQuestion&ResponseGroup.2=Minimal&ResponseGroup.3=HITAssignmentSummary&Operation=GetHIT&Service=AWSMechanicalTurkRequester&AWSAccessKeyId=<AWS_KEY>&Timestamp=2016-12-31T02%3A09%3A26Z&Version=2012-03-25&Signature=zTtqEw8m2owMx1OhVeg2fTTQP5k%3D
45
+ string: HITId=3HYV4299H0CWEPXADE8OC1XBWK9E8A&ResponseGroup.0=HITDetail&ResponseGroup.1=HITQuestion&ResponseGroup.2=Minimal&ResponseGroup.3=HITAssignmentSummary&Operation=GetHIT&Service=AWSMechanicalTurkRequester&AWSAccessKeyId=<AWS_KEY>&Timestamp=2017-04-14T20%3A48%3A04Z&Version=2012-03-25&Signature=9u7Eoe6yvC0rveLIqCFcqY%2F27B4%3D
46
46
  headers:
47
47
  Accept:
48
- - '*/*'
48
+ - "*/*"
49
49
  Accept-Encoding:
50
50
  - gzip, deflate
51
51
  User-Agent:
52
- - rest-client/2.0.0 (darwin15.6.0 x86_64) ruby/2.0.0p353
52
+ - rest-client/2.0.0 (darwin15.6.0 x86_64) ruby/2.3.3p222
53
53
  Content-Length:
54
- - '334'
54
+ - '336'
55
55
  Host:
56
56
  - mechanicalturk.sandbox.amazonaws.com
57
57
  response:
@@ -64,35 +64,35 @@ http_interactions:
64
64
  Transfer-Encoding:
65
65
  - chunked
66
66
  Date:
67
- - Sat, 31 Dec 2016 02:09:26 GMT
67
+ - Fri, 14 Apr 2017 20:48:04 GMT
68
68
  Server:
69
69
  - MTurk
70
70
  body:
71
71
  encoding: UTF-8
72
72
  string: |-
73
73
  <?xml version="1.0"?>
74
- <GetHITResponse><OperationRequest><RequestId>21ca366f-c423-4917-8ed1-3abc987d41e5</RequestId></OperationRequest><HIT><Request><IsValid>True</IsValid></Request><HITId>3FULMHZ7OUDT7C2LI96U8XMF2PGM4P</HITId><HITTypeId>3FJMTJX97O5QAQ6TYMEKGK4K51PA6J</HITTypeId><HITGroupId>346AHROM60PF93NK7E74UE17XHEHQ0</HITGroupId><CreationTime>2016-12-31T02:09:26Z</CreationTime><Title>Transcribe MP3 of 1-minute phone calll</Title><Description>I split up a telephone conversation into 1-minute parts, you transcribe the audio for one 1-minute part.</Description><Question>&lt;ExternalQuestion xmlns="http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2006-07-14/ExternalQuestion.xsd"&gt;
74
+ <GetHITResponse><OperationRequest><RequestId>ddace850-1ada-4f09-8d36-22bd1ebcfe0b</RequestId></OperationRequest><HIT><Request><IsValid>True</IsValid></Request><HITId>3HYV4299H0CWEPXADE8OC1XBWK9E8A</HITId><HITTypeId>3FJMTJX97O5QAQ6TYMEKGK4K51PA6J</HITTypeId><HITGroupId>346AHROM60PF93NK7E74UE17XHEHQ0</HITGroupId><CreationTime>2017-04-14T20:48:04Z</CreationTime><Title>Transcribe MP3 of 1-minute phone calll</Title><Description>I split up a telephone conversation into 1-minute parts, you transcribe the audio for one 1-minute part.</Description><Question>&lt;ExternalQuestion xmlns="http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2006-07-14/ExternalQuestion.xsd"&gt;
75
75
  &lt;ExternalURL&gt;https://example.com/assignments/101.html&lt;/ExternalURL&gt;
76
76
  &lt;FrameHeight&gt;400&lt;/FrameHeight&gt;
77
77
  &lt;/ExternalQuestion&gt;
78
- </Question><Keywords>transcription, audio, mp3</Keywords><HITStatus>Assignable</HITStatus><MaxAssignments>1</MaxAssignments><Reward><Amount>0.01</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$0.01</FormattedPrice></Reward><AutoApprovalDelayInSeconds>86400</AutoApprovalDelayInSeconds><Expiration>2016-12-31T02:29:26Z</Expiration><AssignmentDurationInSeconds>600</AssignmentDurationInSeconds><RequesterAnnotation>typingpool_url=http%3A%2F%2Fwebmasher.com%2Fmturk%2FTestTpInterview.00.00.77421e0a6302f4c8c34e24004a4ad828.YSOQJU.mp3&amp;amp;typingpool_project_id=77421e0a6302f4c8c34e24004a4ad828</RequesterAnnotation><QualificationRequirement><QualificationTypeId>000000000000000000L0</QualificationTypeId><Comparator>GreaterThanOrEqualTo</Comparator><IntegerValue>95</IntegerValue><RequiredToPreview>1</RequiredToPreview></QualificationRequirement><QualificationRequirement><QualificationTypeId>00000000000000000040</QualificationTypeId><Comparator>GreaterThanOrEqualTo</Comparator><IntegerValue>100</IntegerValue><RequiredToPreview>1</RequiredToPreview></QualificationRequirement><HITReviewStatus>NotReviewed</HITReviewStatus><NumberOfAssignmentsPending>0</NumberOfAssignmentsPending><NumberOfAssignmentsAvailable>1</NumberOfAssignmentsAvailable><NumberOfAssignmentsCompleted>0</NumberOfAssignmentsCompleted></HIT></GetHITResponse>
78
+ </Question><Keywords>transcription, audio, mp3</Keywords><HITStatus>Assignable</HITStatus><MaxAssignments>1</MaxAssignments><Reward><Amount>0.01</Amount><CurrencyCode>USD</CurrencyCode><FormattedPrice>$0.01</FormattedPrice></Reward><AutoApprovalDelayInSeconds>86400</AutoApprovalDelayInSeconds><Expiration>2017-04-14T21:08:04Z</Expiration><AssignmentDurationInSeconds>600</AssignmentDurationInSeconds><RequesterAnnotation>typingpool_url=http%3A%2F%2Fwebmasher.com%2Fmturk%2FTestTpInterview.00.00.77421e0a6302f4c8c34e24004a4ad828.YSOQJU.mp3&amp;amp;typingpool_project_id=77421e0a6302f4c8c34e24004a4ad828</RequesterAnnotation><QualificationRequirement><QualificationTypeId>000000000000000000L0</QualificationTypeId><Comparator>GreaterThanOrEqualTo</Comparator><IntegerValue>95</IntegerValue><RequiredToPreview>1</RequiredToPreview></QualificationRequirement><QualificationRequirement><QualificationTypeId>00000000000000000040</QualificationTypeId><Comparator>GreaterThanOrEqualTo</Comparator><IntegerValue>100</IntegerValue><RequiredToPreview>1</RequiredToPreview></QualificationRequirement><HITReviewStatus>NotReviewed</HITReviewStatus><NumberOfAssignmentsPending>0</NumberOfAssignmentsPending><NumberOfAssignmentsAvailable>1</NumberOfAssignmentsAvailable><NumberOfAssignmentsCompleted>0</NumberOfAssignmentsCompleted></HIT></GetHITResponse>
79
79
  http_version:
80
- recorded_at: Sat, 31 Dec 2016 02:09:26 GMT
80
+ recorded_at: Fri, 14 Apr 2017 20:48:04 GMT
81
81
  - request:
82
82
  method: post
83
83
  uri: https://mechanicalturk.sandbox.amazonaws.com/
84
84
  body:
85
85
  encoding: UTF-8
86
- string: HITId=3FULMHZ7OUDT7C2LI96U8XMF2PGM4P&Operation=DisableHIT&Service=AWSMechanicalTurkRequester&AWSAccessKeyId=<AWS_KEY>&Timestamp=2016-12-31T02%3A09%3A26Z&Version=2012-03-25&Signature=x0ek%2FHGb0cRng%2FqOA9fHbCRMfis%3D
86
+ string: HITId=3HYV4299H0CWEPXADE8OC1XBWK9E8A&PageSize=100&Operation=GetAssignmentsForHIT&Service=AWSMechanicalTurkRequester&AWSAccessKeyId=<AWS_KEY>&Timestamp=2017-04-14T20%3A48%3A04Z&Version=2012-03-25&Signature=etNglUZrE%2BgkW5ggJk2r0b2%2FtbY%3D
87
87
  headers:
88
88
  Accept:
89
- - '*/*'
89
+ - "*/*"
90
90
  Accept-Encoding:
91
91
  - gzip, deflate
92
92
  User-Agent:
93
- - rest-client/2.0.0 (darwin15.6.0 x86_64) ruby/2.0.0p353
93
+ - rest-client/2.0.0 (darwin15.6.0 x86_64) ruby/2.3.3p222
94
94
  Content-Length:
95
- - '227'
95
+ - '250'
96
96
  Host:
97
97
  - mechanicalturk.sandbox.amazonaws.com
98
98
  response:
@@ -105,14 +105,51 @@ http_interactions:
105
105
  Transfer-Encoding:
106
106
  - chunked
107
107
  Date:
108
- - Sat, 31 Dec 2016 02:09:25 GMT
108
+ - Fri, 14 Apr 2017 20:48:05 GMT
109
109
  Server:
110
110
  - MTurk
111
111
  body:
112
112
  encoding: UTF-8
113
113
  string: |-
114
114
  <?xml version="1.0"?>
115
- <DisableHITResponse><OperationRequest><RequestId>6547b261-677f-4bcd-b865-181a4641c106</RequestId></OperationRequest><DisableHITResult><Request><IsValid>True</IsValid></Request></DisableHITResult></DisableHITResponse>
115
+ <GetAssignmentsForHITResponse><OperationRequest><RequestId>c0c8f3ce-d70b-4c9e-a8cf-1ffae938765c</RequestId></OperationRequest><GetAssignmentsForHITResult><Request><IsValid>True</IsValid></Request><NumResults>0</NumResults><TotalNumResults>0</TotalNumResults><PageNumber>1</PageNumber></GetAssignmentsForHITResult></GetAssignmentsForHITResponse>
116
116
  http_version:
117
- recorded_at: Sat, 31 Dec 2016 02:09:26 GMT
117
+ recorded_at: Fri, 14 Apr 2017 20:48:05 GMT
118
+ - request:
119
+ method: post
120
+ uri: https://mechanicalturk.sandbox.amazonaws.com/
121
+ body:
122
+ encoding: UTF-8
123
+ string: HITId=3HYV4299H0CWEPXADE8OC1XBWK9E8A&Operation=DisableHIT&Service=AWSMechanicalTurkRequester&AWSAccessKeyId=<AWS_KEY>&Timestamp=2017-04-14T20%3A48%3A05Z&Version=2012-03-25&Signature=fWrgtCMIN1rv3NZgpsEY6CFJD58%3D
124
+ headers:
125
+ Accept:
126
+ - "*/*"
127
+ Accept-Encoding:
128
+ - gzip, deflate
129
+ User-Agent:
130
+ - rest-client/2.0.0 (darwin15.6.0 x86_64) ruby/2.3.3p222
131
+ Content-Length:
132
+ - '223'
133
+ Host:
134
+ - mechanicalturk.sandbox.amazonaws.com
135
+ response:
136
+ status:
137
+ code: 200
138
+ message: OK
139
+ headers:
140
+ Content-Type:
141
+ - text/xml
142
+ Transfer-Encoding:
143
+ - chunked
144
+ Date:
145
+ - Fri, 14 Apr 2017 20:48:04 GMT
146
+ Server:
147
+ - MTurk
148
+ body:
149
+ encoding: UTF-8
150
+ string: |-
151
+ <?xml version="1.0"?>
152
+ <DisableHITResponse><OperationRequest><RequestId>88a6a8bd-6dbf-4f90-877e-808ddcf04b89</RequestId></OperationRequest><DisableHITResult><Request><IsValid>True</IsValid></Request></DisableHITResult></DisableHITResponse>
153
+ http_version:
154
+ recorded_at: Fri, 14 Apr 2017 20:48:05 GMT
118
155
  recorded_with: VCR 3.0.3