answer-factory 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -20,6 +20,7 @@ begin
20
20
  gemspec.add_dependency('activesupport', '>= 2.3.5')
21
21
 
22
22
  #files
23
+ gemspec.files.include('templates/**')
23
24
  gemspec.files.exclude('_spikes/**')
24
25
  end
25
26
 
data/Thorfile CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'active_support'
2
- require 'lib/answer-factory'
2
+ require 'answer-factory'
3
3
 
4
- class Create_Factory < Thor::Group
4
+ class Setup_Factory < Thor::Group
5
5
  include Thor::Actions
6
6
 
7
7
  # Define arguments and options
@@ -10,17 +10,28 @@ class Create_Factory < Thor::Group
10
10
 
11
11
  desc "Creates a new project folder structure for new Nudge types, instructions, search operators and specs"
12
12
 
13
-
14
13
  def self.source_root
15
14
  File.dirname(__FILE__)
16
15
  end
17
16
 
18
- def fill_factory_folder
19
- empty_directory("#{project_name}/lib")
20
- empty_directory("#{project_name}/lib/nudge/instructions")
21
- empty_directory("#{project_name}/lib/nudge/types")
22
- empty_directory("#{project_name}/lib/factory/operators")
23
- empty_directory("#{project_name}/spec")
17
+ def answer_factory_gem_path
18
+ AnswerFactory.gem_root
19
+ end
20
+
21
+ def set_up_project_in_this_folder
22
+ empty_directory("./lib")
23
+ empty_directory("./lib/nudge/instructions")
24
+ empty_directory("./lib/nudge/types")
25
+ empty_directory("./lib/factory/operators")
26
+ empty_directory("./spec")
27
+ end
28
+
29
+ def create_runner
30
+ template("#{answer_factory_gem_path}/templates/answer_factory_activate_template.erb", "./activate.rb")
31
+ end
32
+
33
+ def say_byebye
34
+ puts "your answer-factory project is located in directory #{Dir.pwd}\n"
24
35
  end
25
36
  end
26
37
 
@@ -31,7 +42,7 @@ class New_Nudge_Type < Thor::Group
31
42
  # Define arguments and options
32
43
  argument :typename_root
33
44
  class_option :test_framework, :default => :rspec
34
- desc "Creates a new NudgeType class definition file, typical instructions, and rspec files"
45
+ desc "Creates a new NudgeType class definition, shared instructions, and rspec files"
35
46
 
36
47
 
37
48
  def self.source_root
@@ -49,7 +60,7 @@ class New_Nudge_Type < Thor::Group
49
60
  def create_lib_file
50
61
  @camelcased_type_name = New_Nudge_Type.type_name(typename_root)
51
62
  filename = "#{@camelcased_type_name}.rb"
52
- template("#{nudge_gem_path}/templates/nudge_type_class.erb", "#{New_Nudge_Type.source_root}/lib/types/#{filename}")
63
+ template("#{nudge_gem_path}/templates/nudge_type_class.erb", "#{New_Nudge_Type.source_root}/lib/nudge/types/#{filename}")
53
64
  end
54
65
 
55
66
  def create_lib_spec
@@ -68,7 +79,7 @@ class New_Nudge_Type < Thor::Group
68
79
  @instname = "#{@core.camelize}Instruction"
69
80
  @type = typename_root
70
81
  @camelized_type = New_Nudge_Type.type_name(typename_root)
71
- template("#{nudge_gem_path}/templates/nudge_#{inst}_instruction.erb", "#{New_Nudge_Type.source_root}/lib/instructions/#{filename}")
82
+ template("#{nudge_gem_path}/templates/nudge_#{inst}_instruction.erb", "#{New_Nudge_Type.source_root}/lib/nudge/instructions/#{filename}")
72
83
  end
73
84
  end
74
85
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.5
@@ -1,7 +1,7 @@
1
1
  require 'nudge'
2
2
  require '../lib/answer-factory'
3
3
  include Nudge
4
- include NudgeGP
4
+ include AnswerFactory
5
5
 
6
6
 
7
7
  d1 = Answer.new("")
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{answer-factory}
8
- s.version = "0.0.3"
8
+ s.version = "0.0.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Bill Tozier", "Trek Glowacki", "Jesse Sielaff"]
12
- s.date = %q{2010-04-27}
12
+ s.date = %q{2010-04-30}
13
13
  s.default_executable = %q{answer-factory}
14
14
  s.description = %q{The pragmaticgp gem provides a simple framework for building, running and managing genetic programming experiments which automatically discover algorithms and equations to solve user-defined problems.}
15
15
  s.email = %q{bill@vagueinnovation.com}
@@ -57,7 +57,8 @@ Gem::Specification.new do |s|
57
57
  "spec/operators/resample_and_clone_spec.rb",
58
58
  "spec/operators/resample_values_spec.rb",
59
59
  "spec/operators/uniformBackboneCrossover_spec.rb",
60
- "spec/spec_helper.rb"
60
+ "spec/spec_helper.rb",
61
+ "templates/answer_factory_activate_template.erb"
61
62
  ]
62
63
  s.homepage = %q{http://github.com/Vaguery/PragGP}
63
64
  s.rdoc_options = ["--charset=UTF-8"]
data/bin/answer-factory CHANGED
@@ -10,8 +10,7 @@ if Dir.exist?(project_root) then
10
10
  puts "project directory /#{project_root} already exists"
11
11
  else
12
12
  Dir.mkdir(project_root)
13
- cd("/#{project_root}") do
14
- ls "#{gem_root}"
15
- end
16
- end
17
-
13
+ cp("#{gem_root}/Thorfile","#{project_root}/Thorfile")
14
+ cd("#{project_root}")
15
+ puts `thor setup_factory:set_up_project_in_this_folder #{project_root}`
16
+ end
@@ -12,3 +12,7 @@ require 'operators/evaluators'
12
12
 
13
13
  require 'factories/factory'
14
14
  require 'factories/workstation'
15
+
16
+ def AnswerFactory.gem_root
17
+ File.dirname(__FILE__) + '/..'
18
+ end
@@ -1,6 +1,6 @@
1
1
  require 'set'
2
2
 
3
- module NudgeGP
3
+ module AnswerFactory
4
4
  class Answer
5
5
  attr_accessor :scores, :tags
6
6
  attr_reader :draft_blueprint, :program, :timestamp, :ancestors
data/lib/answers/batch.rb CHANGED
@@ -1,4 +1,4 @@
1
- module NudgeGP
1
+ module AnswerFactory
2
2
  # A Batch is simply an Array of Answers, with validation for all assignment methods
3
3
  class Batch < Array
4
4
 
@@ -1,4 +1,4 @@
1
- module NudgeGP
1
+ module AnswerFactory
2
2
  class Factory
3
3
  require 'open-uri'
4
4
  require 'configatron'
@@ -1,4 +1,4 @@
1
- module NudgeGP
1
+ module AnswerFactory
2
2
  class Workstation
3
3
  attr_reader :name, :capacity, :couchdb_uri, :factory_name
4
4
  attr_accessor :downstream_stations
@@ -1,5 +1,5 @@
1
1
  #encoding: utf-8
2
- module NudgeGP
2
+ module AnswerFactory
3
3
 
4
4
  # Abstract class that from which specific SearchOperator subclasses inherit initialization
5
5
 
@@ -1,4 +1,4 @@
1
- module NudgeGP
1
+ module AnswerFactory
2
2
 
3
3
  class Evaluator < SearchOperator
4
4
  attr_accessor :name
@@ -1,4 +1,4 @@
1
- module NudgeGP
1
+ module AnswerFactory
2
2
 
3
3
  class Sampler < SearchOperator
4
4
  def initialize (params = {})
data/readme.md CHANGED
@@ -1,14 +1,24 @@
1
- # Pragmatic Genetic Programming with Nudge
1
+ # Answer Factory: A system for pragmatic genetic programming projects
2
2
 
3
3
  ## Caveat
4
4
 
5
- This particular project is undergoing a lot of serious surgery right now.
5
+ **DO NOT EXPECT ANYTHING TO WORK (AT ALL) UNTIL VERSION 0.1+**
6
+ This particular project is undergoing a lot of serious surgery right now.
6
7
 
7
8
  ## What it does
8
9
 
9
- Well, it's complicated, and in a state of dynamic change right this second.
10
+ The answer-factory gem includes scripting support for
10
11
 
11
- Let's just say it helps _regular people_ build, run and manage technical experiments that use genetic programming. There's more... but that's the bottom line.
12
+ * generating new design automation projects
13
+ * Nudge, a Turing-complete programming language for readable genetic programming
14
+ * standard genetic programming search operators
15
+ * a standard suite of powerful metaheuristics
16
+ * full automated archiving of all solutions
17
+ * analytics and reporting
18
+ * administrative tools for managing AnswerFactory daemons
19
+ * reporting tools for exploring and directing search
20
+
21
+ The AnswerFactory infrastructure has been designed to help _regular people_ build, run and manage technical experiments that use (among other things) genetic programming. There's a lot more in there... but that's the bottom line.
12
22
 
13
23
  ## Getting started
14
24
 
@@ -16,14 +26,6 @@ You'll need a working (and running) installation of CouchDB.
16
26
 
17
27
  Then:
18
28
 
19
- gem install nudge
20
- gem install thor
21
- gem install couch-rest
22
- gem install sinatra
23
-
24
- and for running specs (which you _should be doing_):
29
+ gem install answer-factory
25
30
 
26
- gem install rspec
27
- gem install sinatra
28
- gem install fakeweb
29
-
31
+ This should automatically load dependent gems, including nudge, rspec, and many others.
data/spec/spec_helper.rb CHANGED
@@ -11,4 +11,4 @@ require 'couchrest'
11
11
  require 'json'
12
12
 
13
13
  include Nudge
14
- include NudgeGP
14
+ include AnswerFactory
@@ -0,0 +1 @@
1
+ # this is the runner file
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 3
9
- version: 0.0.3
8
+ - 5
9
+ version: 0.0.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Bill Tozier
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-04-27 00:00:00 -04:00
19
+ date: 2010-04-30 00:00:00 -04:00
20
20
  default_executable: answer-factory
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -148,6 +148,7 @@ files:
148
148
  - spec/operators/resample_values_spec.rb
149
149
  - spec/operators/uniformBackboneCrossover_spec.rb
150
150
  - spec/spec_helper.rb
151
+ - templates/answer_factory_activate_template.erb
151
152
  has_rdoc: true
152
153
  homepage: http://github.com/Vaguery/PragGP
153
154
  licenses: []