rbbt-util 5.43.0 → 5.44.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/etc/app.d/base.rb +1 -1
- data/lib/rbbt/association/util.rb +1 -1
- data/lib/rbbt/hpc/batch.rb +19 -17
- data/lib/rbbt/persist/tsv/sharder.rb +1 -1
- data/lib/rbbt/tsv/accessor.rb +6 -11
- data/lib/rbbt/tsv/dumper.rb +21 -10
- data/lib/rbbt/tsv/index.rb +2 -1
- data/lib/rbbt/util/misc/math.rb +0 -1
- data/lib/rbbt/util/misc/omics.rb +2 -1
- data/lib/rbbt/util/misc/ssw.rb +298 -0
- data/lib/rbbt/util/open.rb +1 -1
- data/lib/rbbt/workflow/step/info.rb +3 -2
- data/lib/rbbt/workflow/step.rb +2 -1
- data/python/rbbt/__init__.py +2 -2
- data/share/rbbt_commands/workflow/server +6 -1
- data/share/rbbt_commands/workflow/task +1 -1
- metadata +5 -220
- data/test/rbbt/annotations/test_util.rb +0 -43
- data/test/rbbt/association/test_database.rb +0 -87
- data/test/rbbt/association/test_index.rb +0 -127
- data/test/rbbt/association/test_item.rb +0 -15
- data/test/rbbt/association/test_open.rb +0 -63
- data/test/rbbt/association/test_util.rb +0 -108
- data/test/rbbt/entity/test_identifiers.rb +0 -34
- data/test/rbbt/hpc/orchestrate/test_batches.rb +0 -70
- data/test/rbbt/hpc/orchestrate/test_chains.rb +0 -108
- data/test/rbbt/hpc/orchestrate/test_rules.rb +0 -59
- data/test/rbbt/hpc/test_batch.rb +0 -64
- data/test/rbbt/hpc/test_hpc_test_workflows.rb +0 -0
- data/test/rbbt/hpc/test_orchestrate.rb +0 -144
- data/test/rbbt/hpc/test_pbs.rb +0 -43
- data/test/rbbt/hpc/test_slurm.rb +0 -28
- data/test/rbbt/knowledge_base/test_enrichment.rb +0 -50
- data/test/rbbt/knowledge_base/test_entity.rb +0 -62
- data/test/rbbt/knowledge_base/test_query.rb +0 -46
- data/test/rbbt/knowledge_base/test_registry.rb +0 -74
- data/test/rbbt/knowledge_base/test_syndicate.rb +0 -48
- data/test/rbbt/knowledge_base/test_traverse.rb +0 -133
- data/test/rbbt/persist/test_tsv.rb +0 -88
- data/test/rbbt/persist/tsv/test_cdb.rb +0 -18
- data/test/rbbt/persist/tsv/test_kyotocabinet.rb +0 -27
- data/test/rbbt/persist/tsv/test_leveldb.rb +0 -18
- data/test/rbbt/persist/tsv/test_lmdb.rb +0 -20
- data/test/rbbt/persist/tsv/test_sharder.rb +0 -164
- data/test/rbbt/persist/tsv/test_tokyocabinet.rb +0 -262
- data/test/rbbt/resource/test_path.rb +0 -49
- data/test/rbbt/test_annotations.rb +0 -167
- data/test/rbbt/test_association.rb +0 -103
- data/test/rbbt/test_entity.rb +0 -252
- data/test/rbbt/test_fix_width_table.rb +0 -135
- data/test/rbbt/test_knowledge_base.rb +0 -226
- data/test/rbbt/test_monitor.rb +0 -11
- data/test/rbbt/test_packed_index.rb +0 -68
- data/test/rbbt/test_persist.rb +0 -85
- data/test/rbbt/test_resource.rb +0 -110
- data/test/rbbt/test_tsv.rb +0 -669
- data/test/rbbt/test_workflow.rb +0 -609
- data/test/rbbt/tsv/parallel/test_through.rb +0 -40
- data/test/rbbt/tsv/parallel/test_traverse.rb +0 -456
- data/test/rbbt/tsv/test_accessor.rb +0 -319
- data/test/rbbt/tsv/test_attach.rb +0 -715
- data/test/rbbt/tsv/test_change_id.rb +0 -61
- data/test/rbbt/tsv/test_csv.rb +0 -49
- data/test/rbbt/tsv/test_excel.rb +0 -171
- data/test/rbbt/tsv/test_field_index.rb +0 -19
- data/test/rbbt/tsv/test_filter.rb +0 -187
- data/test/rbbt/tsv/test_index.rb +0 -308
- data/test/rbbt/tsv/test_manipulate.rb +0 -334
- data/test/rbbt/tsv/test_marshal.rb +0 -24
- data/test/rbbt/tsv/test_matrix.rb +0 -20
- data/test/rbbt/tsv/test_parallel.rb +0 -7
- data/test/rbbt/tsv/test_parser.rb +0 -101
- data/test/rbbt/tsv/test_stream.rb +0 -253
- data/test/rbbt/tsv/test_util.rb +0 -52
- data/test/rbbt/util/R/test_eval.rb +0 -43
- data/test/rbbt/util/R/test_model.rb +0 -128
- data/test/rbbt/util/R/test_plot.rb +0 -38
- data/test/rbbt/util/concurrency/processes/test_socket.rb +0 -70
- data/test/rbbt/util/concurrency/test_processes.rb +0 -192
- data/test/rbbt/util/concurrency/test_threads.rb +0 -40
- data/test/rbbt/util/log/test_progress.rb +0 -111
- data/test/rbbt/util/misc/test_bgzf.rb +0 -48
- data/test/rbbt/util/misc/test_communication.rb +0 -13
- data/test/rbbt/util/misc/test_development.rb +0 -26
- data/test/rbbt/util/misc/test_format.rb +0 -10
- data/test/rbbt/util/misc/test_indiferent_hash.rb +0 -14
- data/test/rbbt/util/misc/test_lock.rb +0 -77
- data/test/rbbt/util/misc/test_multipart_payload.rb +0 -202
- data/test/rbbt/util/misc/test_omics.rb +0 -116
- data/test/rbbt/util/misc/test_pipes.rb +0 -343
- data/test/rbbt/util/misc/test_serialize.rb +0 -24
- data/test/rbbt/util/python/test_util.rb +0 -25
- data/test/rbbt/util/simpleopt/test_get.rb +0 -12
- data/test/rbbt/util/simpleopt/test_parse.rb +0 -10
- data/test/rbbt/util/simpleopt/test_setup.rb +0 -76
- data/test/rbbt/util/test_R.rb +0 -37
- data/test/rbbt/util/test_chain_methods.rb +0 -22
- data/test/rbbt/util/test_cmd.rb +0 -87
- data/test/rbbt/util/test_colorize.rb +0 -22
- data/test/rbbt/util/test_concurrency.rb +0 -6
- data/test/rbbt/util/test_config.rb +0 -69
- data/test/rbbt/util/test_excel2tsv.rb +0 -10
- data/test/rbbt/util/test_filecache.rb +0 -36
- data/test/rbbt/util/test_log.rb +0 -52
- data/test/rbbt/util/test_migrate.rb +0 -34
- data/test/rbbt/util/test_misc.rb +0 -728
- data/test/rbbt/util/test_open.rb +0 -200
- data/test/rbbt/util/test_procpath.rb +0 -23
- data/test/rbbt/util/test_python.rb +0 -144
- data/test/rbbt/util/test_semaphore.rb +0 -36
- data/test/rbbt/util/test_simpleDSL.rb +0 -55
- data/test/rbbt/util/test_simpleopt.rb +0 -11
- data/test/rbbt/util/test_ssh.rb +0 -10
- data/test/rbbt/util/test_tmpfile.rb +0 -32
- data/test/rbbt/workflow/step/test_dependencies.rb +0 -295
- data/test/rbbt/workflow/step/test_save_load_inputs.rb +0 -136
- data/test/rbbt/workflow/test_doc.rb +0 -30
- data/test/rbbt/workflow/test_remote_workflow.rb +0 -99
- data/test/rbbt/workflow/test_schedule.rb +0 -0
- data/test/rbbt/workflow/test_step.rb +0 -231
- data/test/rbbt/workflow/test_task.rb +0 -85
- data/test/rbbt/workflow/util/test_archive.rb +0 -27
- data/test/rbbt/workflow/util/test_data.rb +0 -67
- data/test/rbbt/workflow/util/test_orchestrator.rb +0 -263
- data/test/test_helper.rb +0 -114
data/test/test_helper.rb
DELETED
@@ -1,114 +0,0 @@
|
|
1
|
-
gem "test-unit", "~> 3.0"
|
2
|
-
gem "minitest", "~> 5.5"
|
3
|
-
|
4
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
5
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
6
|
-
|
7
|
-
require 'test/unit'
|
8
|
-
require 'fileutils'
|
9
|
-
require 'rubygems'
|
10
|
-
|
11
|
-
require 'rbbt'
|
12
|
-
require 'rbbt/resource/path'
|
13
|
-
require 'rbbt/util/config'
|
14
|
-
|
15
|
-
|
16
|
-
class TestServerLoaded < Exception; end
|
17
|
-
|
18
|
-
class Test::Unit::TestCase
|
19
|
-
include FileUtils
|
20
|
-
|
21
|
-
def setup
|
22
|
-
Random.new
|
23
|
-
|
24
|
-
if defined? Persist
|
25
|
-
Persist.cachedir = Rbbt.tmp.test.persistence.find(:user)
|
26
|
-
end
|
27
|
-
|
28
|
-
Entity.entity_property_cache = Rbbt.tmp.test.entity_property.find(:user) if defined? Entity
|
29
|
-
end
|
30
|
-
|
31
|
-
def teardown
|
32
|
-
FileUtils.rm_rf Rbbt.tmp.test.workflow.find
|
33
|
-
#Open.clear_dir_repos
|
34
|
-
#if defined? Persist
|
35
|
-
# FileUtils.rm_rf Path.setup("", 'rbbt').tmp.test.find :user
|
36
|
-
# Persist::CONNECTIONS.values.each do |c| c.close end
|
37
|
-
# Persist::CONNECTIONS.clear
|
38
|
-
#end
|
39
|
-
|
40
|
-
#if defined? Entity
|
41
|
-
# FileUtils.rm_rf Entity.entity_property_cache.find(:user) if Entity.entity_property_cache =~ /tmp\/test/
|
42
|
-
#end
|
43
|
-
end
|
44
|
-
|
45
|
-
def config(*args)
|
46
|
-
Rbbt::Config.get *args
|
47
|
-
end
|
48
|
-
|
49
|
-
def keyword_test(key, &block)
|
50
|
-
test = config(:test, key)
|
51
|
-
if %w(true yes).include?(test.to_s.downcase)
|
52
|
-
block.call
|
53
|
-
else
|
54
|
-
Log.high "Not testing for #{key}"
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
def self.datadir_test
|
59
|
-
#Rbbt.root.test.data
|
60
|
-
Path.setup(File.join(File.dirname(__FILE__), 'data'))
|
61
|
-
end
|
62
|
-
|
63
|
-
def self.datafile_test(file)
|
64
|
-
datadir_test[file.to_s]
|
65
|
-
end
|
66
|
-
|
67
|
-
def datadir_test
|
68
|
-
Test::Unit::TestCase.datadir_test
|
69
|
-
end
|
70
|
-
|
71
|
-
|
72
|
-
def datafile_test(file)
|
73
|
-
Test::Unit::TestCase.datafile_test(file)
|
74
|
-
end
|
75
|
-
|
76
|
-
def workflow_server(workflow, options = {}, &block)
|
77
|
-
trap(:USR1){ raise TestServerLoaded}
|
78
|
-
|
79
|
-
begin
|
80
|
-
pid = Process.fork do
|
81
|
-
TmpFile.with_file do |app_dir|
|
82
|
-
Misc.in_dir(app_dir) do
|
83
|
-
require 'rack'
|
84
|
-
ENV["RBBT_WORKFLOW_EXPORT_ALL"] = 'true'
|
85
|
-
|
86
|
-
app_dir = Path.setup(app_dir.dup)
|
87
|
-
Open.write(app_dir.etc.target_workflow.find, workflow.to_s)
|
88
|
-
|
89
|
-
config_ru_file = File.exist?('./workflow_config.ru') ? './workflow_config.ru' : Rbbt.share['workflow_config.ru'].find
|
90
|
-
options[:config] = config_ru_file
|
91
|
-
app = Rack::Server.new(options)
|
92
|
-
app.start do
|
93
|
-
Process.kill :USR1, Process.ppid
|
94
|
-
end
|
95
|
-
end
|
96
|
-
end
|
97
|
-
end
|
98
|
-
|
99
|
-
begin
|
100
|
-
sleep 1 while true
|
101
|
-
rescue TestServerLoaded
|
102
|
-
end
|
103
|
-
|
104
|
-
client = WorkflowRemoteClient.new "http://localhost:#{options[:Port] || 9292}/#{workflow.to_s}", workflow.to_s
|
105
|
-
|
106
|
-
yield client
|
107
|
-
|
108
|
-
ensure
|
109
|
-
Process.kill :INT, pid
|
110
|
-
Process.wait pid
|
111
|
-
end
|
112
|
-
end
|
113
|
-
|
114
|
-
end
|