transcriptic 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 01ee5e633ccf6090da9f9c302ed28d5ebcb51a91
4
- data.tar.gz: 082a53ce0fea38126c1ab6e3d2c1a8e88d568c94
3
+ metadata.gz: 0432633be6dbce9d58f6eac8a542dd286234aa5c
4
+ data.tar.gz: 11a6daf5e72c5410c84841e4c11940434b327feb
5
5
  SHA512:
6
- metadata.gz: d547dcbf5cd749034f0a053dd5ce9e54db318bb2b084777e91c044c3db8343a3f64813ba7946cb004e61c40c964a84b63b1b516f934d6e76923ad5813962764c
7
- data.tar.gz: 2a601e5d2f5dc0f3b78a9906b14d78978ac76904b4eb5a6853755596b67db115de69233f6ab02ad3d9c2acd3cb1bf321cb49e78b8a850e683558ee238d01037b
6
+ metadata.gz: 3a7e8dedbb8e5bdce6b0dd93b5432377051295884d0f0da7ab8b92eca590803b1919fdbdac0a834a822ed1284ee281f7569565f394f95641303032c271e65e51
7
+ data.tar.gz: a1f06b8c5a81d2ce06edd201dfe09cf85b870bab37406b8d4d1fcb0fd483fd9309a130a85bcfb892465f1669077c7581c012d1c7b457ab46d8c80291588466a2
@@ -121,7 +121,6 @@ module Transcriptic
121
121
  output_with_arrow "Updating dependencies..."
122
122
  labfile = Transcriptic::Labfile.from_file(Transcriptic.find_labfile)
123
123
  Transcriptic::DependenciesGenerator.new([Dir.pwd, labfile.dependencies], options).invoke_all
124
- Transcriptic::SBT.update
125
124
  end
126
125
 
127
126
  desc "compile", "Compile the project"
@@ -133,17 +132,20 @@ module Transcriptic
133
132
 
134
133
  desc "analyze OBJECTPATH", "Analyze a protocol. Object path is of the form edu.foo.bar where bar is the name of your Protocol object."
135
134
  method_options :raw => :boolean, :iterations => :numeric, :linearize => :boolean
136
- def analyze(object_path)
135
+ def analyze(object_path, *params)
137
136
  raw = options.raw ? "--raw" : ""
138
137
  linearize = options.linearize ? "--linearize" : ""
139
138
  iterations = options.iterations ? options.iterations : 5
140
139
  require_labfile!
141
140
  update
142
141
  Transcriptic::SBT.stage
143
- data = `target/start #{object_path} --verify #{raw} #{linearize} --iterations #{iterations}`
142
+ data = `target/start #{object_path} --verify #{raw} #{linearize} --iterations #{iterations} #{params.join(" ")}`
144
143
  if not options.raw
144
+ File.open("logs/#{object_path}", 'w') { |file| file.write(data) }
145
+ data = data.split("\n")[-1]
145
146
  json = json_decode(data)
146
147
  output_with_arrow "Verification successful for #{object_path}"
148
+ output_with_arrow "Logged output during verification to logs/#{object_path}"
147
149
  output_with_indent "Expected cost: $#{json["price_avg"]}, maximum observed cost: $#{json["price_max"]}"
148
150
  else
149
151
  say data
@@ -20,6 +20,7 @@ module Transcriptic
20
20
  def generate
21
21
  empty_directory target.join('app')
22
22
  empty_directory target.join('project')
23
+ empty_directory target.join('logs')
23
24
 
24
25
  template 'app/Main.erb', target.join('app/Main.scala')
25
26
  template 'project/Build.erb', target.join('project/Build.scala')
@@ -32,6 +33,10 @@ module Transcriptic
32
33
  Transcriptic::DependenciesGenerator.new([File.join(Dir.pwd, name), []], options).invoke_all
33
34
  end
34
35
 
36
+ def autoprotocol_version
37
+ Transcriptic::AUTOPROTOCOL_VERSION
38
+ end
39
+
35
40
  def description
36
41
  options[:description]
37
42
  end
@@ -1,10 +1,12 @@
1
1
  package <%= package %>
2
2
 
3
3
  import org.autoprotocol.measures._
4
- import org.autoprotocol.core.{Sample, Protocol, ProtocolConfig}
4
+ import org.autoprotocol.core.{Aliquot, Resource, Protocol, ProtocolConfig}
5
5
 
6
6
  object <%= name.camelize %> extends Protocol {
7
7
 
8
+ val params = Map[String, String]()
9
+
8
10
  def run(config: ProtocolConfig): Unit = {
9
11
  // Your code goes here.
10
12
  }
@@ -49,7 +49,7 @@ object AutoprotocolBuild extends Build {
49
49
  "<%= name %>",
50
50
  file("."),
51
51
  settings =
52
- buildSettings ++ Seq (libraryDependencies ++= (Seq("org.autoprotocol" %% "autoprotocol-library" % "0.1.1-SNAPSHOT") ++
52
+ buildSettings ++ Seq (libraryDependencies ++= (Seq("org.autoprotocol" %% "autoprotocol-library" % "<%= autoprotocol_version %>") ++
53
53
  dependencies), resolvers ++= Seq(transcriptic, autoprotocol, typesafe)) ++ Defaults.defaultSettings ++
54
54
  StartScriptPlugin.startScriptForClassesSettings
55
55
  ) settings (
@@ -1,4 +1,4 @@
1
1
  module Transcriptic
2
- VERSION = "0.2.3"
3
- AUTOPROTOCOL_VERSION = "0.1.0"
2
+ VERSION = "0.2.4"
3
+ AUTOPROTOCOL_VERSION = "0.1.1-SNAPSHOT"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: transcriptic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Transcriptic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-26 00:00:00.000000000 Z
11
+ date: 2013-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: netrc