galaaz 2.0.0 → 2.1.1
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 +4 -4
- data/CHANGELOG.md +43 -5
- data/README.md +200 -128
- data/Rakefile +17 -10
- data/bin/galaaz +10 -2
- data/bin/galaaz-jruby +3 -6
- data/bin/galaaz-ruby +16 -0
- data/bin/galaaz_jruby_env.inc.sh +19 -3
- data/bin/galaaz_ruby_env.inc.sh +38 -0
- data/bin/gbookdown +2 -3
- data/bin/gknit +2 -3
- data/bin/gstudio +4 -4
- data/bin/run_all_rspec +6 -5
- data/bin/run_example +10 -7
- data/bin/run_old_rspec +6 -5
- data/bin/run_rspec +9 -8
- data/bin/run_slow_rspec +6 -5
- data/blogs/R-on-Rails-Planning-Document.md +79 -112
- data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-gfm/midwest_rb.png +0 -0
- data/blogs/galaaz_ggplot/galaaz_ggplot_files/figure-gfm/scatter_plot_rb.png +0 -0
- data/blogs/gknit/gknit_files/figure-gfm/bubble-1.png +0 -0
- data/blogs/gknit/gknit_files/figure-gfm/diverging_bar.png +0 -0
- data/blogs/manual/manual.Rmd +22 -19
- data/blogs/manual/manual.md +200 -128
- data/blogs/ruby_plot/ruby_plot_files/figure-gfm/dose_len.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-gfm/facet_by_delivery.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-gfm/facet_by_dose.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-gfm/facets_by_delivery_color.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-gfm/facets_by_delivery_color2.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-gfm/facets_with_decorations.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-gfm/facets_with_jitter.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-gfm/facets_with_points.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-gfm/final_box_plot.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-gfm/final_violin_plot.png +0 -0
- data/blogs/ruby_plot/ruby_plot_files/figure-gfm/violin_with_jitter.png +0 -0
- data/blogs/test/test.md +10 -0
- data/examples/50Plots_MasterList/ScatterPlot.rb +2 -1
- data/examples/50Plots_MasterList/scatter_plot.rb +1 -0
- data/examples/bioconductor_deseq2_airway/bench_galaaz_three_same_process.rb +1 -0
- data/examples/bioconductor_deseq2_airway/deseq2_airway_galaaz.rb +1 -0
- data/examples/bioconductor_deseq2_airway/deseq2_airway_galaaz_optimized.rb +1 -0
- data/examples/islr/all.rb +1 -0
- data/examples/islr/ch2.spec.rb +1 -0
- data/examples/islr/ch3.spec.rb +1 -0
- data/examples/islr/ch3_boston.rb +1 -0
- data/examples/islr/ch3_multiple_regression.rb +1 -0
- data/examples/islr/ch6.spec.rb +1 -0
- data/examples/islr/x_y_rnorm.jpg +0 -0
- data/examples/misc/ggplot.rb +2 -1
- data/examples/misc/moneyball.rb +1 -0
- data/examples/misc/subsetting.rb +1 -0
- data/examples/multithread_shards_to_r/shards_to_r.rb +1 -0
- data/examples/sthda_ggplot/all.rb +1 -0
- data/examples/sthda_ggplot/one_variable_continuous/density_gg.rb +1 -0
- data/examples/sthda_ggplot/one_variable_continuous/geom_area.rb +1 -0
- data/examples/sthda_ggplot/one_variable_continuous/geom_density.rb +1 -0
- data/examples/sthda_ggplot/one_variable_continuous/geom_dotplot.rb +1 -0
- data/examples/sthda_ggplot/one_variable_continuous/geom_freqpoly.rb +1 -0
- data/examples/sthda_ggplot/one_variable_continuous/geom_histogram.rb +1 -0
- data/examples/sthda_ggplot/one_variable_continuous/histogram_density.rb +1 -0
- data/examples/sthda_ggplot/one_variable_continuous/stat.rb +1 -0
- data/examples/sthda_ggplot/one_variable_discrete/bar.rb +1 -0
- data/examples/sthda_ggplot/qplots/box_violin_dot.rb +1 -0
- data/examples/sthda_ggplot/qplots/scatter_plots.rb +1 -0
- data/examples/sthda_ggplot/scatter_gg.rb +1 -0
- data/examples/sthda_ggplot/two_variables_cont_bivariate/geom_bin2d.rb +1 -0
- data/examples/sthda_ggplot/two_variables_cont_bivariate/geom_density2d.rb +1 -0
- data/examples/sthda_ggplot/two_variables_cont_bivariate/geom_hex.rb +1 -0
- data/examples/sthda_ggplot/two_variables_cont_cont/geom_point.rb +1 -0
- data/examples/sthda_ggplot/two_variables_cont_cont/geom_smooth.rb +1 -0
- data/examples/sthda_ggplot/two_variables_cont_cont/misc.rb +1 -0
- data/examples/sthda_ggplot/two_variables_cont_function/geom_area.rb +1 -0
- data/examples/sthda_ggplot/two_variables_disc_cont/geom_bar.rb +1 -0
- data/examples/sthda_ggplot/two_variables_disc_cont/geom_boxplot.rb +1 -0
- data/examples/sthda_ggplot/two_variables_disc_cont/geom_dotplot.rb +1 -0
- data/examples/sthda_ggplot/two_variables_disc_cont/geom_jitter.rb +1 -0
- data/examples/sthda_ggplot/two_variables_disc_cont/geom_line.rb +1 -0
- data/examples/sthda_ggplot/two_variables_disc_cont/geom_violin.rb +1 -0
- data/examples/sthda_ggplot/two_variables_disc_disc/geom_jitter.rb +1 -0
- data/examples/sthda_ggplot/two_variables_error/geom_crossbar.rb +1 -0
- data/lib/R_interface/r_arrow.rb +37 -0
- data/lib/R_interface/rvector.rb +15 -0
- data/lib/galaaz/arrow_ipc/java_arrow_backend.rb +250 -0
- data/lib/galaaz/arrow_ipc/red_arrow_backend.rb +126 -0
- data/lib/galaaz/arrow_ipc.rb +167 -0
- data/lib/galaaz/cli.rb +531 -0
- data/lib/galaaz.rb +6 -0
- data/lib/galaaz_jruby.rb +17 -2
- data/lib/galaaz_ruby.rb +34 -0
- data/lib/new_bridge/envelope.rb +2 -2
- data/new_bridge_specs/arrow_ipc_async_spec.rb +90 -0
- data/new_bridge_specs/arrow_ipc_export_async_spec.rb +68 -0
- data/r_requires/arrow.txt +3 -0
- data/r_requires/knit-extras.txt +4 -0
- data/r_requires/knit.txt +4 -0
- data/specs/arrow_ipc_export_spec.rb +62 -0
- data/specs/arrow_ipc_handoff_spec.rb +97 -0
- data/specs/gknit_include_engine_spec.rb +2 -2
- data/specs/gknit_install_timeout_report_spec.rb +2 -2
- data/specs/gknit_internal_error_report_spec.rb +2 -2
- data/specs/gknit_vector_map_output_spec.rb +2 -2
- data/version.rb +1 -1
- metadata +50 -13
data/Rakefile
CHANGED
|
@@ -26,7 +26,7 @@ require 'rake/testtask'
|
|
|
26
26
|
require 'shellwords'
|
|
27
27
|
|
|
28
28
|
require_relative 'version'
|
|
29
|
-
require_relative 'lib/
|
|
29
|
+
require_relative 'lib/galaaz_ruby'
|
|
30
30
|
|
|
31
31
|
#----------------------------------------------------------------------------------------
|
|
32
32
|
#
|
|
@@ -34,9 +34,15 @@ require_relative 'lib/galaaz_jruby'
|
|
|
34
34
|
|
|
35
35
|
class MakeTask < Rake::TaskLib
|
|
36
36
|
|
|
37
|
-
#
|
|
37
|
+
# Ruby prefix for running Galaaz. Uses `ruby` on PATH unless GALAAZ_RUBY is set.
|
|
38
|
+
# JVM flags only when the selected interpreter is JRuby (see lib/galaaz_ruby.rb).
|
|
39
|
+
def self.galaaz_ruby_invocation
|
|
40
|
+
GalaazRuby.shell_invocation('lib')
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Alias kept for existing call sites; same as galaaz_ruby_invocation.
|
|
38
44
|
def self.galaaz_jruby_invocation
|
|
39
|
-
|
|
45
|
+
galaaz_ruby_invocation
|
|
40
46
|
end
|
|
41
47
|
|
|
42
48
|
#----------------------------------------------------------------------------------------
|
|
@@ -56,14 +62,15 @@ class MakeTask < Rake::TaskLib
|
|
|
56
62
|
end
|
|
57
63
|
|
|
58
64
|
#----------------------------------------------------------------------------------------
|
|
59
|
-
# Run example or spec with
|
|
65
|
+
# Run example or spec with Galaaz Ruby (ruby on PATH; GALAAZ_RUBY overrides)
|
|
60
66
|
#----------------------------------------------------------------------------------------
|
|
61
67
|
|
|
62
68
|
def make_task
|
|
69
|
+
inv = MakeTask.galaaz_ruby_invocation
|
|
63
70
|
if @rspec
|
|
64
|
-
sh %{ #{
|
|
71
|
+
sh %{ #{inv} -S bundle exec rspec #{@filepath}.rb -f documentation }
|
|
65
72
|
else
|
|
66
|
-
sh %{ #{
|
|
73
|
+
sh %{ #{inv} -S bundle exec ruby #{@filepath}.rb }
|
|
67
74
|
end
|
|
68
75
|
end
|
|
69
76
|
|
|
@@ -81,8 +88,8 @@ end
|
|
|
81
88
|
|
|
82
89
|
# Run each .rb file in a directory (for groups that don't have an all.rb)
|
|
83
90
|
def run_each_file(file_list)
|
|
84
|
-
inv = MakeTask.
|
|
85
|
-
file_list.each { |f| sh "#{inv} #{f}" }
|
|
91
|
+
inv = MakeTask.galaaz_ruby_invocation
|
|
92
|
+
file_list.each { |f| sh "#{inv} -S bundle exec ruby #{f}" }
|
|
86
93
|
end
|
|
87
94
|
|
|
88
95
|
geoms = FileList['examples/sthda_ggplot/**/*.rb']
|
|
@@ -240,10 +247,10 @@ task :compile_gatekeeper do
|
|
|
240
247
|
Dir.chdir('ext/new_bridge') { sh 'make all' }
|
|
241
248
|
end
|
|
242
249
|
|
|
243
|
-
desc 'Run specs/ and new_bridge_specs/
|
|
250
|
+
desc 'Run specs/ and new_bridge_specs/ with SimpleCov (same idea as bin/run_all_rspec; GALAAZ_RUBY overrides)'
|
|
244
251
|
task :specs_all_with_new_bridge => [:compile_gatekeeper] do
|
|
245
252
|
root = File.expand_path(__dir__)
|
|
246
|
-
inv = MakeTask.
|
|
253
|
+
inv = MakeTask.galaaz_ruby_invocation
|
|
247
254
|
top = Dir[File.join(root, 'specs', '*_spec.rb')] + Dir[File.join(root, 'specs', '*.spec.rb')]
|
|
248
255
|
files = top.sort.map { |p| Shellwords.escape(p) }.join(' ')
|
|
249
256
|
nb = Shellwords.escape(File.join(root, 'new_bridge_specs'))
|
data/bin/galaaz
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
# Galaaz CLI: setup / blogs / doctor / add.
|
|
5
|
+
# Unknown commands still forward to rake (legacy example runners).
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
root = File.expand_path('..', __dir__)
|
|
8
|
+
lib = File.join(root, 'lib')
|
|
9
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
10
|
+
|
|
11
|
+
require 'galaaz/cli'
|
|
12
|
+
|
|
13
|
+
exit Galaaz::CLI.run(ARGV)
|
data/bin/galaaz-jruby
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# Run jruby with Galaaz-required JVM flags and lib/ on the load path.
|
|
3
|
+
# Thin JRuby wrapper around bin/galaaz-ruby (forces jruby).
|
|
3
4
|
# Optional: GALAAZ_JRUBY_OPTS (space-separated extra -J... or jruby args).
|
|
4
5
|
#
|
|
5
6
|
# Usage: bin/galaaz-jruby path/to/script.rb [args...]
|
|
6
7
|
# bin/galaaz-jruby -S rspec specs/foo_spec.rb
|
|
7
8
|
set -e
|
|
8
9
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
exec jruby -I "$ROOT/lib" \
|
|
12
|
-
$GALAAZ_REQUIRED_JRUBY_J_ARGS \
|
|
13
|
-
${GALAAZ_JRUBY_OPTS:-} \
|
|
14
|
-
"$@"
|
|
10
|
+
export GALAAZ_RUBY=jruby
|
|
11
|
+
exec "$ROOT/bin/galaaz-ruby" "$@"
|
data/bin/galaaz-ruby
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Run Galaaz with the selected Ruby (default: ruby on PATH; JRuby or CRuby).
|
|
3
|
+
# JVM flags are applied only when the interpreter is JRuby.
|
|
4
|
+
#
|
|
5
|
+
# Usage: bin/galaaz-ruby path/to/script.rb [args...]
|
|
6
|
+
# GALAAZ_RUBY=jruby bin/galaaz-ruby path/to/script.rb
|
|
7
|
+
# GALAAZ_RUBY=ruby bin/galaaz-ruby path/to/script.rb
|
|
8
|
+
# bin/galaaz-ruby -S rspec specs/foo_spec.rb
|
|
9
|
+
set -e
|
|
10
|
+
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
11
|
+
# shellcheck source=galaaz_ruby_env.inc.sh
|
|
12
|
+
source "$ROOT/bin/galaaz_ruby_env.inc.sh"
|
|
13
|
+
# shellcheck disable=SC2086
|
|
14
|
+
exec "$GALAAZ_RUBY_BIN" -I "$ROOT/lib" \
|
|
15
|
+
$GALAAZ_RUBY_J_ARGS \
|
|
16
|
+
"$@"
|
data/bin/galaaz_jruby_env.inc.sh
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
|
-
# Galaaz required JVM flags for JRuby (Apache Arrow on Java 9+).
|
|
1
|
+
# Galaaz required JVM flags for JRuby (Apache Arrow memory on Java 9+).
|
|
2
2
|
# Source from bin/*.sh: source "$ROOT/bin/galaaz_jruby_env.inc.sh"
|
|
3
3
|
#
|
|
4
|
-
# Source of truth in Ruby/Rake: lib/galaaz_jruby.rb (GalaazJRuby::
|
|
4
|
+
# Source of truth in Ruby/Rake: lib/galaaz_jruby.rb (GalaazJRuby::JAVA_NIO_ADD_OPENS).
|
|
5
5
|
# Optional extra -J flags: export GALAAZ_JRUBY_OPTS="-J-Xmx4g" (space-separated).
|
|
6
|
-
|
|
6
|
+
#
|
|
7
|
+
# JAVA_OPTS is exported so *child* JRuby processes (bundle exec rspec, mise exec)
|
|
8
|
+
# get the same opens flag. -J args on the outer command are not inherited by
|
|
9
|
+
# bundle exec's second JVM.
|
|
10
|
+
GALAAZ_JAVA_NIO_ADD_OPENS='--add-opens=java.base/java.nio=ALL-UNNAMED'
|
|
11
|
+
GALAAZ_REQUIRED_JRUBY_J_ARGS="-J${GALAAZ_JAVA_NIO_ADD_OPENS}"
|
|
12
|
+
|
|
13
|
+
case " ${JAVA_OPTS:-} " in
|
|
14
|
+
*" ${GALAAZ_JAVA_NIO_ADD_OPENS} "*) ;;
|
|
15
|
+
*)
|
|
16
|
+
if [ -n "${JAVA_OPTS:-}" ]; then
|
|
17
|
+
export JAVA_OPTS="${GALAAZ_JAVA_NIO_ADD_OPENS} ${JAVA_OPTS}"
|
|
18
|
+
else
|
|
19
|
+
export JAVA_OPTS="${GALAAZ_JAVA_NIO_ADD_OPENS}"
|
|
20
|
+
fi
|
|
21
|
+
;;
|
|
22
|
+
esac
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Galaaz Ruby interpreter selection for bin/* launchers.
|
|
2
|
+
# Source from bin/*.sh: source "$ROOT/bin/galaaz_ruby_env.inc.sh"
|
|
3
|
+
#
|
|
4
|
+
# Sets:
|
|
5
|
+
# GALAAZ_RUBY_BIN — interpreter to exec (default: ruby on PATH)
|
|
6
|
+
# GALAAZ_RUBY_J_ARGS — JVM -J flags when that interpreter is JRuby; empty on CRuby
|
|
7
|
+
#
|
|
8
|
+
# JRuby and CRuby are both first-class. Override with GALAAZ_RUBY=jruby, GALAAZ_RUBY=ruby,
|
|
9
|
+
# or a full path. Extra JRuby flags: GALAAZ_JRUBY_OPTS="-J-Xmx4g" (ignored on CRuby).
|
|
10
|
+
# CRuby red-arrow uses system Arrow GLib (Apache Arrow APT / libarrow-glib-dev).
|
|
11
|
+
|
|
12
|
+
GALAAZ_RUBY_BIN="${GALAAZ_RUBY:-ruby}"
|
|
13
|
+
|
|
14
|
+
_galaaz_ruby_base="$(basename -- "$GALAAZ_RUBY_BIN")"
|
|
15
|
+
_galaaz_ruby_engine="$("$GALAAZ_RUBY_BIN" -e 'print RUBY_ENGINE' 2>/dev/null || true)"
|
|
16
|
+
case "$_galaaz_ruby_base" in
|
|
17
|
+
jruby|jruby.*)
|
|
18
|
+
_galaaz_is_jruby=1
|
|
19
|
+
;;
|
|
20
|
+
*)
|
|
21
|
+
if [[ "$_galaaz_ruby_engine" == "jruby" ]]; then
|
|
22
|
+
_galaaz_is_jruby=1
|
|
23
|
+
else
|
|
24
|
+
_galaaz_is_jruby=0
|
|
25
|
+
fi
|
|
26
|
+
;;
|
|
27
|
+
esac
|
|
28
|
+
|
|
29
|
+
if [[ "$_galaaz_is_jruby" -eq 1 ]]; then
|
|
30
|
+
# shellcheck source=galaaz_jruby_env.inc.sh
|
|
31
|
+
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/galaaz_jruby_env.inc.sh"
|
|
32
|
+
GALAAZ_RUBY_J_ARGS="$GALAAZ_REQUIRED_JRUBY_J_ARGS ${GALAAZ_JRUBY_OPTS:-}"
|
|
33
|
+
# JAVA_OPTS is exported by galaaz_jruby_env.inc.sh for bundle-exec child JVMs
|
|
34
|
+
else
|
|
35
|
+
GALAAZ_REQUIRED_JRUBY_J_ARGS=''
|
|
36
|
+
GALAAZ_RUBY_J_ARGS=''
|
|
37
|
+
fi
|
|
38
|
+
unset _galaaz_ruby_base _galaaz_ruby_engine _galaaz_is_jruby
|
data/bin/gbookdown
CHANGED
|
@@ -58,7 +58,6 @@ end
|
|
|
58
58
|
EOF
|
|
59
59
|
|
|
60
60
|
libx = File.expand_path('../lib', File.dirname(__FILE__))
|
|
61
|
-
require File.join(libx, '
|
|
62
|
-
|
|
63
|
-
exec "jruby #{jvm_args} -I#{libx} -e #{Shellwords.escape(code)}"
|
|
61
|
+
require File.join(libx, 'galaaz_ruby')
|
|
62
|
+
exec "#{GalaazRuby.shell_invocation(libx)} -e #{Shellwords.escape(code)}"
|
|
64
63
|
|
data/bin/gknit
CHANGED
|
@@ -215,11 +215,10 @@ end
|
|
|
215
215
|
EOF
|
|
216
216
|
|
|
217
217
|
libx = File.expand_path('../lib', File.dirname(__FILE__))
|
|
218
|
-
require File.join(libx, '
|
|
219
|
-
jvm_args = GalaazJRuby.shell_j_arg_string
|
|
218
|
+
require File.join(libx, 'galaaz_ruby')
|
|
220
219
|
ENV['GALAAZ_CALLBACK_TIMEOUT_MS'] = options[:callback_timeout_ms].to_s if !options[:callback_timeout_ms].nil?
|
|
221
220
|
ENV['GALAAZ_BRIDGE_TIMEOUT_SEC'] = options[:bridge_timeout_sec].to_s if !options[:bridge_timeout_sec].nil?
|
|
222
|
-
exec "
|
|
221
|
+
exec "#{GalaazRuby.shell_invocation(libx)} -e #{Shellwords.escape(code)}"
|
|
223
222
|
|
|
224
223
|
=begin
|
|
225
224
|
# how to call rmarkdown::render with a parameter list
|
data/bin/gstudio
CHANGED
|
@@ -41,13 +41,13 @@ end.parse!
|
|
|
41
41
|
|
|
42
42
|
bin_dir = File.expand_path('..', __FILE__)
|
|
43
43
|
libx = File.expand_path('../../lib', __FILE__)
|
|
44
|
-
require File.join(libx, '
|
|
45
|
-
|
|
44
|
+
require File.join(libx, 'galaaz_ruby')
|
|
45
|
+
inv = GalaazRuby.shell_invocation(Shellwords.escape(libx))
|
|
46
46
|
|
|
47
47
|
if options[:pry]
|
|
48
48
|
puts "Loading PRY and Galaaz... Please wait!"
|
|
49
|
-
exec "
|
|
49
|
+
exec "#{inv} -S pry -r #{Shellwords.escape(File.join(bin_dir, 'gstudio_pry.rb'))}"
|
|
50
50
|
else
|
|
51
51
|
puts "Loading IRB and Galaaz... Please wait!"
|
|
52
|
-
exec "
|
|
52
|
+
exec "#{inv} -S irb -r #{Shellwords.escape(File.join(bin_dir, 'gstudio_irb.rb'))}"
|
|
53
53
|
end
|
data/bin/run_all_rspec
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
# bin/run_all_rspec
|
|
9
9
|
# bin/run_all_rspec --format documentation
|
|
10
10
|
# bin/run_all_rspec new_bridge_specs/phase0_protocol_spec.rb
|
|
11
|
+
# GALAAZ_RUBY=ruby bin/run_all_rspec
|
|
11
12
|
#
|
|
12
13
|
# If the first argument is an option (starts with -), default dirs are prepended
|
|
13
14
|
# so `bin/run_all_rspec --format doc` still runs specs/ + new_bridge_specs/.
|
|
@@ -15,8 +16,8 @@
|
|
|
15
16
|
# For specs/ only (faster day-to-day): bin/run_rspec
|
|
16
17
|
set -e
|
|
17
18
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
18
|
-
# shellcheck source=
|
|
19
|
-
source "$ROOT/bin/
|
|
19
|
+
# shellcheck source=galaaz_ruby_env.inc.sh
|
|
20
|
+
source "$ROOT/bin/galaaz_ruby_env.inc.sh"
|
|
20
21
|
|
|
21
22
|
echo "[run_all_rspec] compiling gatekeeper: ext/new_bridge"
|
|
22
23
|
make -C "$ROOT/ext/new_bridge" -s all
|
|
@@ -35,9 +36,9 @@ if [ $# -eq 0 ]; then
|
|
|
35
36
|
elif [[ "${1:-}" == -* ]]; then
|
|
36
37
|
set -- "${DEFAULT_SPECS[@]}" "$@"
|
|
37
38
|
fi
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
$
|
|
39
|
+
# shellcheck disable=SC2086
|
|
40
|
+
exec "$GALAAZ_RUBY_BIN" -I "$ROOT/lib" \
|
|
41
|
+
$GALAAZ_RUBY_J_ARGS \
|
|
41
42
|
-S bundle exec rspec \
|
|
42
43
|
-r "$ROOT/specs/spec_helper.rb" \
|
|
43
44
|
"$@"
|
data/bin/run_example
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Run a Galaaz example
|
|
3
|
-
#
|
|
2
|
+
# Run a Galaaz example (default: ruby on PATH). Override with GALAAZ_RUBY=jruby|ruby.
|
|
3
|
+
# Uses bundle exec so msgpack (and other Gemfile deps) resolve under vendor/bundle.
|
|
4
|
+
# Optional: GALAAZ_JRUBY_OPTS (JRuby only).
|
|
4
5
|
#
|
|
5
6
|
# Usage: bin/run_example examples/sthda_ggplot/all.rb
|
|
6
7
|
# bin/run_example examples/sthda_ggplot/one_variable_continuous/geom_density.rb
|
|
8
|
+
# GALAAZ_RUBY=ruby bin/run_example examples/misc/subsetting.rb
|
|
7
9
|
set -e
|
|
8
10
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
9
|
-
# shellcheck source=
|
|
10
|
-
source "$ROOT/bin/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
$
|
|
11
|
+
# shellcheck source=galaaz_ruby_env.inc.sh
|
|
12
|
+
source "$ROOT/bin/galaaz_ruby_env.inc.sh"
|
|
13
|
+
# shellcheck disable=SC2086
|
|
14
|
+
exec "$GALAAZ_RUBY_BIN" -I "$ROOT/lib" \
|
|
15
|
+
$GALAAZ_RUBY_J_ARGS \
|
|
16
|
+
-S bundle exec ruby -I "$ROOT/lib" \
|
|
14
17
|
"$@"
|
data/bin/run_old_rspec
CHANGED
|
@@ -3,17 +3,18 @@
|
|
|
3
3
|
# Usage:
|
|
4
4
|
# bin/run_old_rspec
|
|
5
5
|
# bin/run_old_rspec old_specs/r_environment.spec.rb
|
|
6
|
+
# GALAAZ_RUBY=ruby bin/run_old_rspec
|
|
6
7
|
set -e
|
|
7
8
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
8
|
-
# shellcheck source=
|
|
9
|
-
source "$ROOT/bin/
|
|
9
|
+
# shellcheck source=galaaz_ruby_env.inc.sh
|
|
10
|
+
source "$ROOT/bin/galaaz_ruby_env.inc.sh"
|
|
10
11
|
if [ $# -eq 0 ]; then
|
|
11
12
|
shopt -s nullglob
|
|
12
13
|
SPECS=( "$ROOT"/old_specs/*.spec.rb "$ROOT"/old_specs/*_spec.rb )
|
|
13
14
|
IFS=$'\n' SPECS=( $(printf '%s\n' "${SPECS[@]}" | sort) )
|
|
14
15
|
set -- "${SPECS[@]}"
|
|
15
16
|
fi
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
$
|
|
17
|
+
# shellcheck disable=SC2086
|
|
18
|
+
exec "$GALAAZ_RUBY_BIN" -I "$ROOT/lib" \
|
|
19
|
+
$GALAAZ_RUBY_J_ARGS \
|
|
19
20
|
-S bundle exec rspec "$@"
|
data/bin/run_rspec
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Run rspec with
|
|
3
|
-
# Optional
|
|
2
|
+
# Run rspec with Galaaz (default: ruby on PATH; JRuby or CRuby).
|
|
3
|
+
# JVM options applied only on JRuby. Optional: GALAAZ_RUBY=jruby|ruby; GALAAZ_JRUBY_OPTS.
|
|
4
4
|
#
|
|
5
5
|
# Usage:
|
|
6
6
|
# bin/run_rspec # run fast specs in specs/ only
|
|
7
|
-
# bin/run_all_rspec # top-level specs/ + new_bridge_specs/ + gatekeeper compile
|
|
7
|
+
# bin/run_all_rspec # top-level specs/ + new_bridge_specs/ + gatekeeper compile
|
|
8
8
|
# bin/run_slow_rspec # run slow specs in slow-specs/
|
|
9
9
|
# bin/run_rspec specs/protocol_result_spec.rb
|
|
10
|
+
# GALAAZ_RUBY=ruby bin/run_rspec specs/r_bridge_bootstrap_spec.rb
|
|
10
11
|
# GALAAZ_DEBUG=1 bin/run_rspec specs/r_vector_subsetting.spec.rb:61 ...
|
|
11
12
|
set -e
|
|
12
13
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
13
|
-
# shellcheck source=
|
|
14
|
-
source "$ROOT/bin/
|
|
14
|
+
# shellcheck source=galaaz_ruby_env.inc.sh
|
|
15
|
+
source "$ROOT/bin/galaaz_ruby_env.inc.sh"
|
|
15
16
|
if [ $# -eq 0 ]; then
|
|
16
17
|
set -- $(find "$ROOT/specs" -maxdepth 1 -type f \( -name '*_spec.rb' -o -name '*.spec.rb' \) | sort)
|
|
17
18
|
fi
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
$
|
|
19
|
+
# shellcheck disable=SC2086
|
|
20
|
+
exec "$GALAAZ_RUBY_BIN" -I "$ROOT/lib" \
|
|
21
|
+
$GALAAZ_RUBY_J_ARGS \
|
|
21
22
|
-S bundle exec rspec \
|
|
22
23
|
-r "$ROOT/specs/spec_helper.rb" \
|
|
23
24
|
"$@"
|
data/bin/run_slow_rspec
CHANGED
|
@@ -3,17 +3,18 @@
|
|
|
3
3
|
# Usage:
|
|
4
4
|
# bin/run_slow_rspec
|
|
5
5
|
# bin/run_slow_rspec slow-specs/phase2_gknit_chunk_output_spec.rb
|
|
6
|
+
# GALAAZ_RUBY=ruby bin/run_slow_rspec
|
|
6
7
|
set -e
|
|
7
8
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
8
|
-
# shellcheck source=
|
|
9
|
-
source "$ROOT/bin/
|
|
9
|
+
# shellcheck source=galaaz_ruby_env.inc.sh
|
|
10
|
+
source "$ROOT/bin/galaaz_ruby_env.inc.sh"
|
|
10
11
|
if [ $# -eq 0 ]; then
|
|
11
12
|
shopt -s nullglob globstar
|
|
12
13
|
SPECS=( "$ROOT"/slow-specs/**/*_spec.rb "$ROOT"/slow-specs/**/*.spec.rb )
|
|
13
14
|
IFS=$'\n' SPECS=( $(printf '%s\n' "${SPECS[@]}" | sort) )
|
|
14
15
|
set -- "${SPECS[@]}"
|
|
15
16
|
fi
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
$
|
|
17
|
+
# shellcheck disable=SC2086
|
|
18
|
+
exec "$GALAAZ_RUBY_BIN" -I "$ROOT/lib" \
|
|
19
|
+
$GALAAZ_RUBY_J_ARGS \
|
|
19
20
|
-S bundle exec rspec "$@"
|