sciruby 0.1.3 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +2 -0
  3. data/CHANGES +3 -0
  4. data/CONTRIBUTING.md +46 -0
  5. data/Gemfile +34 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.rdoc +28 -0
  8. data/lib/sciruby/gems.rb +27 -0
  9. data/lib/sciruby/version.rb +3 -0
  10. data/lib/sciruby.rb +2 -77
  11. data/sciruby.gemspec +35 -0
  12. metadata +51 -413
  13. data/.autotest +0 -23
  14. data/.gemtest +0 -0
  15. data/History.txt +0 -6
  16. data/Manifest.txt +0 -119
  17. data/Rakefile +0 -178
  18. data/bin/sciruby-plotter +0 -12
  19. data/data/r/man/AirPassengers.Rd +0 -51
  20. data/data/r/man/BJsales.Rd +0 -34
  21. data/data/r/man/BOD.Rd +0 -53
  22. data/data/r/man/ChickWeight.Rd +0 -68
  23. data/data/r/man/DNase.Rd +0 -63
  24. data/data/r/man/EuStockMarkets.Rd +0 -28
  25. data/data/r/man/Formaldehyde.Rd +0 -44
  26. data/data/r/man/HairEyeColor.Rd +0 -77
  27. data/data/r/man/Harman23.cor.Rd +0 -25
  28. data/data/r/man/Harman74.cor.Rd +0 -28
  29. data/data/r/man/Indometh.Rd +0 -57
  30. data/data/r/man/InsectSprays.Rd +0 -45
  31. data/data/r/man/JohnsonJohnson.Rd +0 -37
  32. data/data/r/man/LakeHuron.Rd +0 -27
  33. data/data/r/man/LifeCycleSavings.Rd +0 -54
  34. data/data/r/man/Loblolly.Rd +0 -56
  35. data/data/r/man/Nile.Rd +0 -78
  36. data/data/r/man/Orange.Rd +0 -57
  37. data/data/r/man/OrchardSprays.Rd +0 -62
  38. data/data/r/man/PlantGrowth.Rd +0 -39
  39. data/data/r/man/Puromycin.Rd +0 -84
  40. data/data/r/man/Theoph.Rd +0 -84
  41. data/data/r/man/Titanic.Rd +0 -73
  42. data/data/r/man/ToothGrowth.Rd +0 -40
  43. data/data/r/man/UCBAdmissions.Rd +0 -68
  44. data/data/r/man/UKDriverDeaths.Rd +0 -72
  45. data/data/r/man/UKLungDeaths.Rd +0 -40
  46. data/data/r/man/UKgas.Rd +0 -25
  47. data/data/r/man/USAccDeaths.Rd +0 -23
  48. data/data/r/man/USArrests.Rd +0 -45
  49. data/data/r/man/USJudgeRatings.Rd +0 -38
  50. data/data/r/man/USPersonalExpenditure.Rd +0 -33
  51. data/data/r/man/VADeaths.Rd +0 -51
  52. data/data/r/man/WWWusage.Rd +0 -41
  53. data/data/r/man/WorldPhones.Rd +0 -40
  54. data/data/r/man/ability.cov.Rd +0 -50
  55. data/data/r/man/airmiles.Rd +0 -29
  56. data/data/r/man/airquality.Rd +0 -56
  57. data/data/r/man/anscombe.Rd +0 -62
  58. data/data/r/man/attenu.Rd +0 -66
  59. data/data/r/man/attitude.Rd +0 -48
  60. data/data/r/man/austres.Rd +0 -22
  61. data/data/r/man/beavers.Rd +0 -73
  62. data/data/r/man/cars.Rd +0 -59
  63. data/data/r/man/chickwts.Rd +0 -47
  64. data/data/r/man/co2.Rd +0 -43
  65. data/data/r/man/crimtab.Rd +0 -129
  66. data/data/r/man/datasets-package.Rd +0 -24
  67. data/data/r/man/discoveries.Rd +0 -30
  68. data/data/r/man/esoph.Rd +0 -66
  69. data/data/r/man/euro.Rd +0 -56
  70. data/data/r/man/eurodist.Rd +0 -25
  71. data/data/r/man/faithful.Rd +0 -63
  72. data/data/r/man/freeny.Rd +0 -56
  73. data/data/r/man/infert.Rd +0 -56
  74. data/data/r/man/iris.Rd +0 -62
  75. data/data/r/man/islands.Rd +0 -29
  76. data/data/r/man/lh.Rd +0 -22
  77. data/data/r/man/longley.Rd +0 -56
  78. data/data/r/man/lynx.Rd +0 -33
  79. data/data/r/man/morley.Rd +0 -50
  80. data/data/r/man/mtcars.Rd +0 -44
  81. data/data/r/man/nhtemp.Rd +0 -30
  82. data/data/r/man/nottem.Rd +0 -30
  83. data/data/r/man/occupationalStatus.Rd +0 -44
  84. data/data/r/man/precip.Rd +0 -31
  85. data/data/r/man/presidents.Rd +0 -36
  86. data/data/r/man/pressure.Rd +0 -41
  87. data/data/r/man/quakes.Rd +0 -40
  88. data/data/r/man/randu.Rd +0 -46
  89. data/data/r/man/rivers.Rd +0 -21
  90. data/data/r/man/rock.Rd +0 -34
  91. data/data/r/man/sleep.Rd +0 -51
  92. data/data/r/man/stackloss.Rd +0 -77
  93. data/data/r/man/state.Rd +0 -80
  94. data/data/r/man/sunspot.month.Rd +0 -49
  95. data/data/r/man/sunspot.year.Rd +0 -26
  96. data/data/r/man/sunspots.Rd +0 -33
  97. data/data/r/man/swiss.Rd +0 -79
  98. data/data/r/man/treering.Rd +0 -38
  99. data/data/r/man/trees.Rd +0 -48
  100. data/data/r/man/uspop.Rd +0 -27
  101. data/data/r/man/volcano.Rd +0 -31
  102. data/data/r/man/warpbreaks.Rd +0 -56
  103. data/data/r/man/women.Rd +0 -40
  104. data/data/r/man/zCO2.Rd +0 -81
  105. data/lib/ext/csv.rb +0 -22
  106. data/lib/ext/shoes.rb +0 -131
  107. data/lib/ext/string.rb +0 -39
  108. data/lib/sciruby/analysis/suite.rb +0 -87
  109. data/lib/sciruby/analysis/suite_report_builder.rb +0 -44
  110. data/lib/sciruby/analysis.rb +0 -98
  111. data/lib/sciruby/config.rb +0 -93
  112. data/lib/sciruby/data/guardian.rb +0 -96
  113. data/lib/sciruby/data/r/base.rb +0 -110
  114. data/lib/sciruby/data/r/data_frame.rb +0 -24
  115. data/lib/sciruby/data/r/grouped_data.rb +0 -7
  116. data/lib/sciruby/data/r/list.rb +0 -20
  117. data/lib/sciruby/data/r/multi_time_series.rb +0 -24
  118. data/lib/sciruby/data/r/r_matrix.rb +0 -7
  119. data/lib/sciruby/data/r/time_series.rb +0 -19
  120. data/lib/sciruby/data/r/time_series_base.rb +0 -40
  121. data/lib/sciruby/data/r/vector.rb +0 -125
  122. data/lib/sciruby/data/r.rb +0 -155
  123. data/lib/sciruby/data.rb +0 -168
  124. data/lib/sciruby/editor.rb +0 -82
  125. data/lib/sciruby/plotter.rb +0 -128
  126. data/lib/sciruby/recommend.rb +0 -70
  127. data/lib/sciruby/validation.rb +0 -368
  128. data/readme.md +0 -75
  129. data/static/sciruby-icon.png +0 -0
  130. data/test/helpers_tests.rb +0 -58
  131. data/test/test_recommend.rb +0 -16
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 37ce1d623a33cf7dc0c398b8320869da55bc12c4
4
+ data.tar.gz: b03df5bc7e818d9f1d4d5aaf5af7dbf5bea6ada0
5
+ SHA512:
6
+ metadata.gz: 09bedbb54cae59b4a6eeed4a74e12ff4a2112ed81af3e074103b6c678a7e877e3c8e6b3e93a4327ab2a3a7ac8f6f3d1ae9b2bf9ec9fea3eac6967f44cc886b61
7
+ data.tar.gz: 15624febecc8ba89cb3561109a878f9ffac687f7acca94affe60808b3ce8a3d307af456d4364aa53f0fbb8c24adbfce416edb014f6421bdc4ed534407df9b44b
data/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ *.gem
2
+ Gemfile.lock
data/CHANGES ADDED
@@ -0,0 +1,3 @@
1
+ 0.2.1 (2015-06-08)
2
+
3
+ * Initial release as a meta gem
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,46 @@
1
+ SciRuby is a collaborative effort to bring scientific computation to Ruby. If you want to help, please do so!
2
+
3
+ This guide covers way in which you can contribute.
4
+
5
+ ## How to help
6
+
7
+ There are various ways in which you can improve SciRuby. Coding and documentation are the two primary possibilities and participate in the [mailing list][mailing-list] -- suggesting ideas and changes is very important!
8
+
9
+ Apart from adding features and functionality, you can also create tests (we use RSpec), guides on how to do something using SciRuby, document the libraries and help find and fix bugs.
10
+
11
+ Start by visiting our [issue tracker](https://github.com/SciRuby/sciruby/issues?state=open) if you want to start contributing, there's probably something with which you can help.
12
+
13
+ ## Projects
14
+
15
+ SciRuby is an umbrella for many other projects in Ruby. There's not much hierarchy or anything, but we believe that the most important one at the time is [NMatrix][nmatrix], as it's very hard to create some scientific library that doesn't need a good numerical linear algebra library to deal with vectors and matrices.
16
+
17
+ So, the SciRuby subprojects are, in no particular order:
18
+
19
+ - [NMatrix][nmatrix]: A fast numerical linear algebra library
20
+ - [Statsample][statsample]: A suite for basic and advanced statistics
21
+ - [Distribution][distribution]: Diverse statistical distributions. Uses C (statistics2/GSL) or Java extensions when available.
22
+ - [Integration][integration]: Integration methods.
23
+ - [Minimization][minimization]: Various minimization algorithms in pure Ruby.
24
+
25
+ ## Documentation
26
+
27
+ Documentation is something most developers don't want to create, but everyone likes to use (well, most of the time). We can't possibly have a big community without proper guides and API docs.
28
+
29
+ Our current idea is to write guides (that can be initially created as blog posts, for example) and put them into a single place -- the [sciruby.com][sciruby] website. This enables people to start using the library without much friction.
30
+
31
+ For API documentation, we're using the [RDoc format][rdoc] in the source code. It works with both Ruby and C, so we should be able to have a very good coverage. We want to put the whole API documentation in one single place; again, the [sciruby.com][sciruby] website.
32
+
33
+ If you solved a problem or created an application that uses SciRuby or its subprojects, please say so in our mailing list and send us a pull request!
34
+
35
+ ## Conclusion
36
+
37
+ Before commiting any code, you *MUST* read our [Contributor Agreement](http://github.com/SciRuby/sciruby/wiki/Contributor-Agreement). This is meant to protect both us and the users of SciRuby, as there are lots of scientific packages (or code found in books) that aren't so "open" as we would like them to be.
38
+
39
+ [mailing-list]: https://groups.google.com/forum/?fromgroups#!forum/sciruby-dev
40
+ [sciruby]: http://sciruby.com
41
+ [nmatrix]: https://github.com/sciruby/nmatrix
42
+ [statsample]: https://github.com/SciRuby/statsample
43
+ [distribution]: https://github.com/SciRuby/distribution
44
+ [integration]: https://github.com/SciRuby/integration
45
+ [minimization]: https://github.com/SciRuby/minimization
46
+ [rdoc]: http://rdoc.rubyforge.org/
data/Gemfile ADDED
@@ -0,0 +1,34 @@
1
+ # This file specifies all gems which are installed by the `sciruby-full` gem or recommended by the `sciruby` gem.
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gem 'nmatrix'
6
+ gem 'gsl-nmatrix'
7
+
8
+ gem 'rubyvis'
9
+ gem 'nyaplot'
10
+ gem 'plotrb'
11
+ gem 'gnuplot'
12
+
13
+ gem 'iruby'
14
+ gem 'pry'
15
+ gem 'awesome_print'
16
+
17
+ gem 'daru'
18
+
19
+ gem 'integration'
20
+ gem 'minimization'
21
+ gem 'distribution'
22
+
23
+ gem 'statsample'
24
+ gem 'statsample-glm'
25
+ gem 'statsample-bivariate-extension'
26
+ #gem 'statsample-timeseries' # currently not working because of activesupport dependency
27
+ gem 'extendmatrix'
28
+
29
+ gem 'publisci'
30
+
31
+ gem 'ai4r'
32
+
33
+ # from the bioruby project
34
+ gem 'bio'
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ This version of SciRuby is licensed under the BSD 2-clause license.
2
+
3
+ * http://sciruby.com
4
+ * http://github.com/sciruby/sciruby/wiki/License
5
+
6
+ You *must* read the Contributor Agreement before contributing code to the SciRuby Project. This is available online:
7
+
8
+ * http://github.com/sciruby/sciruby/wiki/Contributor-Agreement
9
+
10
+ --
11
+
12
+ Copyright (c) 2010 - 2015, Ruby Science Foundation
13
+ All rights reserved.
14
+
15
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
16
+
17
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
18
+
19
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
20
+
21
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/README.rdoc ADDED
@@ -0,0 +1,28 @@
1
+ = SciRuby meta gem
2
+
3
+ Tools for Scientific Computing in Ruby
4
+
5
+ * {Installation}[https://github.com/SciRuby/sciruby/wiki/Installation]
6
+ * {Website}[http://sciruby.com]
7
+ * {Google+}[https://plus.google.com/109304769076178160953/posts]
8
+ * {NMatrix}[http://github.com/SciRuby/nmatrix]
9
+
10
+ == Description
11
+
12
+ Ruby has for some time had no equivalent to the beautifully constructed numpy, scipy, and matplotlib libraries for Python. We believe that the time for a Ruby science and visualization package has come and gone. Sometimes when a solution of sugar and water becomes super-saturated, from it precipitates a pure, delicious, and diabetes-inducing crystal of sweetness, induced by no more than the tap of a finger. So it is, we believe, with the need for numeric and visualization libraries in Ruby.
13
+
14
+ We are not the first with this idea, but we are trying to bring it to life.
15
+
16
+ == License
17
+
18
+ Copyright (c) 2010 onward, The Ruby Science Foundation.
19
+
20
+ All rights reserved.
21
+
22
+ SciRuby is licensed under the BSD 3-clause license. See {LICENSE.txt}[https://github.com/SciRuby/sciruby/wiki/License] for details.
23
+
24
+ == Donations
25
+
26
+ Support a SciRuby Fellow:
27
+
28
+ {<img src=http://pledgie.com/campaigns/15783.png?skin_name=chrome>}[http://www.pledgie.com/campaigns/15783]
@@ -0,0 +1,27 @@
1
+ module SciRuby
2
+ extend self
3
+
4
+ def all_gems
5
+ @all_gems ||= File.read(File.expand_path(File.join(__FILE__, '..', '..', '..', 'Gemfile'))).scan(/^(?!#.*)gem\s+'(.*?)'/).map(&:first)
6
+ end
7
+
8
+ def installed_gems
9
+ @installed_gems ||=
10
+ begin
11
+ require 'rubygems'
12
+ Hash[all_gems.map {|name| (v = gem_version(name)) && [name, v] }.compact]
13
+ end
14
+ end
15
+
16
+ def require!
17
+ installed_gems.each {|gem,_| require gem }
18
+ end
19
+
20
+ private
21
+
22
+ def gem_version(name)
23
+ Gem::Specification.find_by_name(name).version.to_s
24
+ rescue Exception
25
+ nil
26
+ end
27
+ end
@@ -0,0 +1,3 @@
1
+ module SciRuby
2
+ VERSION = '0.2.1'
3
+ end
data/lib/sciruby.rb CHANGED
@@ -1,77 +1,2 @@
1
- # = sciruby.rb -
2
- # SciRuby - Ruby scientific visualization and computation.
3
- #
4
- # Copyright (C) 2011 SciRuby Development Team
5
- # * John O. Woods
6
- # * John T. Prince
7
- # * Claudio Bustos
8
- # * others
9
- #
10
- # This program is free software; you can redistribute it and/or
11
- # modify it under the terms of the GNU General Public License
12
- # as published by the Free Software Foundation; either version 3
13
- # of the License, or (at your option) any later version.
14
- #
15
- # This program is distributed in the hope that it will be useful,
16
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
17
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
- # GNU General Public License for more details.
19
- #
20
- # You should have received a copy of the GNU General Public License
21
- # along with this program; if not, write to the Free Software
22
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23
- #
24
- # Specific notices will be placed where they are appropriate.
25
- #
26
-
27
- require "rubygems"
28
- require "bundler/setup"
29
-
30
- module SciRuby
31
- VERSION = '0.1.3'
32
- DIR = Pathname.new(__FILE__).realpath.dirname.to_s
33
-
34
- require File.join(::SciRuby::DIR, 'ext', 'string.rb')
35
- require File.join(::SciRuby::DIR, 'ext', 'csv.rb')
36
-
37
- class << self
38
- def plot script
39
- SciRuby::Plotter.new script
40
- end
41
-
42
- def integrate *args, &block
43
- require "integration"
44
- ::Integration.integrate(*args, &block)
45
- end
46
-
47
- # Produce a list of datasets that can be loaded using the +dataset+ method
48
- def dataset_search database, args = {}
49
- "SciRuby::Data::#{database.to_s.camelize}".constantize.new(args).datasets.keys
50
- end
51
-
52
- # Load a dataset from a specific database. For a list of datasets, use `dataset_search(:guardian)`, for example.
53
- def dataset database, source_id
54
- begin
55
- "SciRuby::Data::#{database.to_s.camelize}".constantize.new.dataset(source_id)
56
- rescue DatabaseUnavailableError => e
57
- warn "Database appears to be unavailable. Attempting to use cached version."
58
- SciRuby::Data::Cacher.new.dataset(source_id, database)
59
- end
60
- end
61
-
62
- # Shorthand for SciRuby::Analysis.store(*args, &block)
63
- def analyze *args, &block
64
- SciRuby::Analysis.store(*args, &block)
65
- end
66
- end
67
-
68
- autoload(:Analysis, File.join(DIR, 'sciruby', 'analysis'))
69
- autoload(:Config, File.join(DIR, 'sciruby', 'config'))
70
- autoload(:Editor, File.join(DIR, 'sciruby', 'editor'))
71
- autoload(:Plotter, File.join(DIR, 'sciruby', 'plotter'))
72
- autoload(:Recommend, File.join(DIR, 'sciruby', 'recommend'))
73
- autoload(:Validation, File.join(DIR, 'sciruby', 'validation'))
74
- autoload(:Data, File.join(DIR, 'sciruby', 'data'))
75
- end
76
-
77
- autoload(:Shoes, File.join(SciRuby::DIR, 'ext', 'shoes'))
1
+ require 'sciruby/version'
2
+ require 'sciruby/gems'
data/sciruby.gemspec ADDED
@@ -0,0 +1,35 @@
1
+ # coding: utf-8
2
+ $: << File.join(File.dirname(__FILE__), 'lib')
3
+ require 'sciruby'
4
+ require 'date'
5
+
6
+ SCIRUBY_FULL = false unless defined?(SCIRUBY_FULL)
7
+
8
+ Gem::Specification.new do |s|
9
+ s.name = SCIRUBY_FULL ? 'sciruby-full' : 'sciruby'
10
+ s.date = Date.today.to_s
11
+ s.version = SciRuby::VERSION
12
+ s.authors = ['SciRuby Development Team']
13
+ s.email = ['sciruby-dev@googlegroups.com']
14
+ s.license = 'BSD'
15
+ s.homepage = 'http://sciruby.com'
16
+ s.summary =
17
+ s.description = "Scientific gems for Ruby#{SCIRUBY_FULL ? ' (Full installation)' : ''}"
18
+
19
+ s.require_paths = %w(lib)
20
+ s.files = `git ls-files`.split($/)
21
+
22
+ if SCIRUBY_FULL
23
+ s.files.delete 'sciruby.gemspec'
24
+ s.files.reject! {|f| f =~ /\Alib/ }
25
+
26
+ s.add_runtime_dependency 'sciruby', "= #{SciRuby::VERSION}"
27
+ SciRuby.all_gems.each {|gem| s.add_runtime_dependency gem }
28
+ else
29
+ s.files.delete 'sciruby-full.gemspec'
30
+
31
+ m = "Please consider installing 'sciruby-full' or the following gems:\n"
32
+ SciRuby.all_gems.each {|gem| m << " * #{gem}\n" }
33
+ s.post_install_message = m << "\n"
34
+ end
35
+ end