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.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/etc/app.d/base.rb +1 -1
  3. data/lib/rbbt/association/util.rb +1 -1
  4. data/lib/rbbt/hpc/batch.rb +19 -17
  5. data/lib/rbbt/persist/tsv/sharder.rb +1 -1
  6. data/lib/rbbt/tsv/accessor.rb +6 -11
  7. data/lib/rbbt/tsv/dumper.rb +21 -10
  8. data/lib/rbbt/tsv/index.rb +2 -1
  9. data/lib/rbbt/util/misc/math.rb +0 -1
  10. data/lib/rbbt/util/misc/omics.rb +2 -1
  11. data/lib/rbbt/util/misc/ssw.rb +298 -0
  12. data/lib/rbbt/util/open.rb +1 -1
  13. data/lib/rbbt/workflow/step/info.rb +3 -2
  14. data/lib/rbbt/workflow/step.rb +2 -1
  15. data/python/rbbt/__init__.py +2 -2
  16. data/share/rbbt_commands/workflow/server +6 -1
  17. data/share/rbbt_commands/workflow/task +1 -1
  18. metadata +5 -220
  19. data/test/rbbt/annotations/test_util.rb +0 -43
  20. data/test/rbbt/association/test_database.rb +0 -87
  21. data/test/rbbt/association/test_index.rb +0 -127
  22. data/test/rbbt/association/test_item.rb +0 -15
  23. data/test/rbbt/association/test_open.rb +0 -63
  24. data/test/rbbt/association/test_util.rb +0 -108
  25. data/test/rbbt/entity/test_identifiers.rb +0 -34
  26. data/test/rbbt/hpc/orchestrate/test_batches.rb +0 -70
  27. data/test/rbbt/hpc/orchestrate/test_chains.rb +0 -108
  28. data/test/rbbt/hpc/orchestrate/test_rules.rb +0 -59
  29. data/test/rbbt/hpc/test_batch.rb +0 -64
  30. data/test/rbbt/hpc/test_hpc_test_workflows.rb +0 -0
  31. data/test/rbbt/hpc/test_orchestrate.rb +0 -144
  32. data/test/rbbt/hpc/test_pbs.rb +0 -43
  33. data/test/rbbt/hpc/test_slurm.rb +0 -28
  34. data/test/rbbt/knowledge_base/test_enrichment.rb +0 -50
  35. data/test/rbbt/knowledge_base/test_entity.rb +0 -62
  36. data/test/rbbt/knowledge_base/test_query.rb +0 -46
  37. data/test/rbbt/knowledge_base/test_registry.rb +0 -74
  38. data/test/rbbt/knowledge_base/test_syndicate.rb +0 -48
  39. data/test/rbbt/knowledge_base/test_traverse.rb +0 -133
  40. data/test/rbbt/persist/test_tsv.rb +0 -88
  41. data/test/rbbt/persist/tsv/test_cdb.rb +0 -18
  42. data/test/rbbt/persist/tsv/test_kyotocabinet.rb +0 -27
  43. data/test/rbbt/persist/tsv/test_leveldb.rb +0 -18
  44. data/test/rbbt/persist/tsv/test_lmdb.rb +0 -20
  45. data/test/rbbt/persist/tsv/test_sharder.rb +0 -164
  46. data/test/rbbt/persist/tsv/test_tokyocabinet.rb +0 -262
  47. data/test/rbbt/resource/test_path.rb +0 -49
  48. data/test/rbbt/test_annotations.rb +0 -167
  49. data/test/rbbt/test_association.rb +0 -103
  50. data/test/rbbt/test_entity.rb +0 -252
  51. data/test/rbbt/test_fix_width_table.rb +0 -135
  52. data/test/rbbt/test_knowledge_base.rb +0 -226
  53. data/test/rbbt/test_monitor.rb +0 -11
  54. data/test/rbbt/test_packed_index.rb +0 -68
  55. data/test/rbbt/test_persist.rb +0 -85
  56. data/test/rbbt/test_resource.rb +0 -110
  57. data/test/rbbt/test_tsv.rb +0 -669
  58. data/test/rbbt/test_workflow.rb +0 -609
  59. data/test/rbbt/tsv/parallel/test_through.rb +0 -40
  60. data/test/rbbt/tsv/parallel/test_traverse.rb +0 -456
  61. data/test/rbbt/tsv/test_accessor.rb +0 -319
  62. data/test/rbbt/tsv/test_attach.rb +0 -715
  63. data/test/rbbt/tsv/test_change_id.rb +0 -61
  64. data/test/rbbt/tsv/test_csv.rb +0 -49
  65. data/test/rbbt/tsv/test_excel.rb +0 -171
  66. data/test/rbbt/tsv/test_field_index.rb +0 -19
  67. data/test/rbbt/tsv/test_filter.rb +0 -187
  68. data/test/rbbt/tsv/test_index.rb +0 -308
  69. data/test/rbbt/tsv/test_manipulate.rb +0 -334
  70. data/test/rbbt/tsv/test_marshal.rb +0 -24
  71. data/test/rbbt/tsv/test_matrix.rb +0 -20
  72. data/test/rbbt/tsv/test_parallel.rb +0 -7
  73. data/test/rbbt/tsv/test_parser.rb +0 -101
  74. data/test/rbbt/tsv/test_stream.rb +0 -253
  75. data/test/rbbt/tsv/test_util.rb +0 -52
  76. data/test/rbbt/util/R/test_eval.rb +0 -43
  77. data/test/rbbt/util/R/test_model.rb +0 -128
  78. data/test/rbbt/util/R/test_plot.rb +0 -38
  79. data/test/rbbt/util/concurrency/processes/test_socket.rb +0 -70
  80. data/test/rbbt/util/concurrency/test_processes.rb +0 -192
  81. data/test/rbbt/util/concurrency/test_threads.rb +0 -40
  82. data/test/rbbt/util/log/test_progress.rb +0 -111
  83. data/test/rbbt/util/misc/test_bgzf.rb +0 -48
  84. data/test/rbbt/util/misc/test_communication.rb +0 -13
  85. data/test/rbbt/util/misc/test_development.rb +0 -26
  86. data/test/rbbt/util/misc/test_format.rb +0 -10
  87. data/test/rbbt/util/misc/test_indiferent_hash.rb +0 -14
  88. data/test/rbbt/util/misc/test_lock.rb +0 -77
  89. data/test/rbbt/util/misc/test_multipart_payload.rb +0 -202
  90. data/test/rbbt/util/misc/test_omics.rb +0 -116
  91. data/test/rbbt/util/misc/test_pipes.rb +0 -343
  92. data/test/rbbt/util/misc/test_serialize.rb +0 -24
  93. data/test/rbbt/util/python/test_util.rb +0 -25
  94. data/test/rbbt/util/simpleopt/test_get.rb +0 -12
  95. data/test/rbbt/util/simpleopt/test_parse.rb +0 -10
  96. data/test/rbbt/util/simpleopt/test_setup.rb +0 -76
  97. data/test/rbbt/util/test_R.rb +0 -37
  98. data/test/rbbt/util/test_chain_methods.rb +0 -22
  99. data/test/rbbt/util/test_cmd.rb +0 -87
  100. data/test/rbbt/util/test_colorize.rb +0 -22
  101. data/test/rbbt/util/test_concurrency.rb +0 -6
  102. data/test/rbbt/util/test_config.rb +0 -69
  103. data/test/rbbt/util/test_excel2tsv.rb +0 -10
  104. data/test/rbbt/util/test_filecache.rb +0 -36
  105. data/test/rbbt/util/test_log.rb +0 -52
  106. data/test/rbbt/util/test_migrate.rb +0 -34
  107. data/test/rbbt/util/test_misc.rb +0 -728
  108. data/test/rbbt/util/test_open.rb +0 -200
  109. data/test/rbbt/util/test_procpath.rb +0 -23
  110. data/test/rbbt/util/test_python.rb +0 -144
  111. data/test/rbbt/util/test_semaphore.rb +0 -36
  112. data/test/rbbt/util/test_simpleDSL.rb +0 -55
  113. data/test/rbbt/util/test_simpleopt.rb +0 -11
  114. data/test/rbbt/util/test_ssh.rb +0 -10
  115. data/test/rbbt/util/test_tmpfile.rb +0 -32
  116. data/test/rbbt/workflow/step/test_dependencies.rb +0 -295
  117. data/test/rbbt/workflow/step/test_save_load_inputs.rb +0 -136
  118. data/test/rbbt/workflow/test_doc.rb +0 -30
  119. data/test/rbbt/workflow/test_remote_workflow.rb +0 -99
  120. data/test/rbbt/workflow/test_schedule.rb +0 -0
  121. data/test/rbbt/workflow/test_step.rb +0 -231
  122. data/test/rbbt/workflow/test_task.rb +0 -85
  123. data/test/rbbt/workflow/util/test_archive.rb +0 -27
  124. data/test/rbbt/workflow/util/test_data.rb +0 -67
  125. data/test/rbbt/workflow/util/test_orchestrator.rb +0 -263
  126. 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