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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0432633be6dbce9d58f6eac8a542dd286234aa5c
|
4
|
+
data.tar.gz: 11a6daf5e72c5410c84841e4c11940434b327feb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a7e8dedbb8e5bdce6b0dd93b5432377051295884d0f0da7ab8b92eca590803b1919fdbdac0a834a822ed1284ee281f7569565f394f95641303032c271e65e51
|
7
|
+
data.tar.gz: a1f06b8c5a81d2ce06edd201dfe09cf85b870bab37406b8d4d1fcb0fd483fd9309a130a85bcfb892465f1669077c7581c012d1c7b457ab46d8c80291588466a2
|
data/lib/transcriptic/cli.rb
CHANGED
@@ -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.{
|
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" % "
|
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 (
|
data/lib/transcriptic/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2013-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: netrc
|