rbbt-util 5.32.10 → 5.32.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/rbbt +1 -0
- data/lib/rbbt/annotations/util.rb +1 -0
- data/lib/rbbt/entity.rb +6 -1
- data/lib/rbbt/hpc/batch.rb +26 -9
- data/lib/rbbt/hpc/orchestrate.rb +1 -0
- data/lib/rbbt/hpc/slurm.rb +29 -12
- data/lib/rbbt/resource.rb +51 -49
- data/lib/rbbt/tsv.rb +5 -0
- data/lib/rbbt/tsv/csv.rb +2 -2
- data/lib/rbbt/tsv/manipulate.rb +2 -0
- data/lib/rbbt/tsv/parallel/traverse.rb +8 -11
- data/lib/rbbt/util/R.rb +2 -2
- data/lib/rbbt/util/cmd.rb +39 -18
- data/lib/rbbt/util/log/progress/report.rb +20 -17
- data/lib/rbbt/util/log/progress/util.rb +2 -1
- data/lib/rbbt/util/misc/omics.rb +2 -2
- data/lib/rbbt/util/misc/system.rb +2 -2
- data/lib/rbbt/util/python.rb +63 -3
- data/lib/rbbt/util/simpleDSL.rb +4 -4
- data/lib/rbbt/workflow.rb +32 -4
- data/lib/rbbt/workflow/definition.rb +1 -1
- data/lib/rbbt/workflow/step.rb +37 -6
- data/lib/rbbt/workflow/step/accessor.rb +2 -2
- data/lib/rbbt/workflow/util/data.rb +35 -0
- data/lib/rbbt/workflow/util/provenance.rb +26 -7
- data/lib/rbbt/workflow/util/trace.rb +2 -1
- data/python/rbbt.py +7 -0
- data/share/install/software/lib/install_helpers +1 -1
- data/share/rbbt_commands/hpc/list +11 -7
- data/share/rbbt_commands/hpc/orchestrate +7 -1
- data/share/rbbt_commands/hpc/task +5 -0
- data/share/rbbt_commands/lsf/list +11 -7
- data/share/rbbt_commands/lsf/orchestrate +7 -1
- data/share/rbbt_commands/lsf/task +5 -0
- data/share/rbbt_commands/slurm/list +11 -7
- data/share/rbbt_commands/slurm/orchestrate +7 -1
- data/share/rbbt_commands/slurm/task +5 -0
- data/share/rbbt_commands/workflow/forget_deps +5 -4
- data/test/rbbt/util/test_python.rb +3 -2
- data/test/rbbt/util/test_simpleDSL.rb +3 -3
- data/test/rbbt/workflow/util/test_data.rb +48 -0
- metadata +86 -83
@@ -2,6 +2,7 @@ require File.join(File.expand_path(File.dirname(__FILE__)), '../..', 'test_helpe
|
|
2
2
|
require 'rbbt/util/python'
|
3
3
|
|
4
4
|
class TestPython < Test::Unit::TestCase
|
5
|
+
|
5
6
|
def test_python
|
6
7
|
TmpFile.with_file do |tmpdir|
|
7
8
|
code =<<-EOF
|
@@ -67,7 +68,7 @@ def python_print():
|
|
67
68
|
|
68
69
|
def test_keras
|
69
70
|
defined = RbbtPython.run do
|
70
|
-
pyimport "keras.models", as: :km
|
71
|
+
pyimport "tensorflow.keras.models", as: :km
|
71
72
|
defined?(km.Sequential)
|
72
73
|
end
|
73
74
|
assert defined
|
@@ -75,7 +76,7 @@ def python_print():
|
|
75
76
|
|
76
77
|
def test_keras_import
|
77
78
|
defined = RbbtPython.run do
|
78
|
-
pyfrom "keras.models", import: :Sequential
|
79
|
+
pyfrom "tensorflow.keras.models", import: :Sequential
|
79
80
|
defined?(self::Sequential)
|
80
81
|
end
|
81
82
|
assert defined
|
@@ -35,12 +35,12 @@ class TestDSL < Test::Unit::TestCase
|
|
35
35
|
|
36
36
|
def test_config
|
37
37
|
config = <<-EOC
|
38
|
-
action1
|
39
|
-
action2
|
38
|
+
action1 "Hello"
|
39
|
+
action2 "Good bye"
|
40
40
|
EOC
|
41
41
|
|
42
42
|
begin
|
43
|
-
|
43
|
+
assert_equal config.split("\n").collect{|l| l.strip}, @parser.config(:action).split("\n").collect{|l| l.strip}
|
44
44
|
rescue SimpleDSL::NoRuby2Ruby
|
45
45
|
end
|
46
46
|
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require File.join(File.expand_path(File.dirname(__FILE__)), '../../..', 'test_helper.rb')
|
2
|
+
require 'rbbt/workflow/util/data'
|
3
|
+
|
4
|
+
module TestDataWF
|
5
|
+
extend Workflow
|
6
|
+
extend Workflow::Data
|
7
|
+
|
8
|
+
input :salutation, :string
|
9
|
+
task :salute_luis => :string do |name,salutation|
|
10
|
+
"Hi Luis: #{salutation}"
|
11
|
+
end
|
12
|
+
|
13
|
+
input :name, :string
|
14
|
+
input :salutation, :string
|
15
|
+
task :salute => :string do |name,salutation|
|
16
|
+
"Hi #{name}: #{salutation}"
|
17
|
+
end
|
18
|
+
|
19
|
+
data_task :salute_data, TestDataWF, :salute, :salutation => :placeholder do |directory,options|
|
20
|
+
options.merge({:salutation => directory.salutation.read})
|
21
|
+
end
|
22
|
+
|
23
|
+
data_task :salute_data2, TestDataWF, :salute, :salutation => :placeholder do |directory,options|
|
24
|
+
{:task => :salute_luis, :inputs => options.merge({:salutation => directory.salutation.read})}
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
class TestWorkflowData < Test::Unit::TestCase
|
29
|
+
def test_workflow_data
|
30
|
+
TmpFile.with_file do |tmpdir|
|
31
|
+
tmpdir = Path.setup(tmpdir.dup)
|
32
|
+
|
33
|
+
Open.write(tmpdir.TestDir.options.name, "Miguel")
|
34
|
+
Open.write(tmpdir.TestDir.salutation, "My salutations")
|
35
|
+
|
36
|
+
TestDataWF.data tmpdir
|
37
|
+
|
38
|
+
job = TestDataWF.job(:salute_data, "TestDir")
|
39
|
+
job.recursive_clean.run
|
40
|
+
assert job.run.include? "Miguel"
|
41
|
+
|
42
|
+
job = TestDataWF.job(:salute_data2, "TestDir")
|
43
|
+
job.recursive_clean.run
|
44
|
+
assert job.run.include? "Luis"
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbt-util
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.32.
|
4
|
+
version: 5.32.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05
|
11
|
+
date: 2021-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -344,9 +344,11 @@ files:
|
|
344
344
|
- lib/rbbt/workflow/task.rb
|
345
345
|
- lib/rbbt/workflow/usage.rb
|
346
346
|
- lib/rbbt/workflow/util/archive.rb
|
347
|
+
- lib/rbbt/workflow/util/data.rb
|
347
348
|
- lib/rbbt/workflow/util/orchestrator.rb
|
348
349
|
- lib/rbbt/workflow/util/provenance.rb
|
349
350
|
- lib/rbbt/workflow/util/trace.rb
|
351
|
+
- python/rbbt.py
|
350
352
|
- share/Rlib/plot.R
|
351
353
|
- share/Rlib/svg.R
|
352
354
|
- share/Rlib/util.R
|
@@ -549,13 +551,14 @@ files:
|
|
549
551
|
- test/rbbt/workflow/test_step.rb
|
550
552
|
- test/rbbt/workflow/test_task.rb
|
551
553
|
- test/rbbt/workflow/util/test_archive.rb
|
554
|
+
- test/rbbt/workflow/util/test_data.rb
|
552
555
|
- test/rbbt/workflow/util/test_orchestrator.rb
|
553
556
|
- test/test_helper.rb
|
554
557
|
homepage: http://github.com/mikisvaz/rbbt-util
|
555
558
|
licenses:
|
556
559
|
- MIT
|
557
560
|
metadata: {}
|
558
|
-
post_install_message:
|
561
|
+
post_install_message:
|
559
562
|
rdoc_options: []
|
560
563
|
require_paths:
|
561
564
|
- lib
|
@@ -570,104 +573,104 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
570
573
|
- !ruby/object:Gem::Version
|
571
574
|
version: '0'
|
572
575
|
requirements: []
|
573
|
-
|
574
|
-
|
575
|
-
signing_key:
|
576
|
+
rubygems_version: 3.1.4
|
577
|
+
signing_key:
|
576
578
|
specification_version: 4
|
577
579
|
summary: Utilities for the Ruby Bioinformatics Toolkit (rbbt)
|
578
580
|
test_files:
|
579
|
-
- test/test_helper.rb
|
580
|
-
- test/rbbt/entity/test_identifiers.rb
|
581
|
-
- test/rbbt/test_resource.rb
|
582
|
-
- test/rbbt/test_association.rb
|
583
|
-
- test/rbbt/hpc/test_slurm.rb
|
584
|
-
- test/rbbt/hpc/test_batch.rb
|
585
|
-
- test/rbbt/persist/test_tsv.rb
|
586
|
-
- test/rbbt/persist/tsv/test_kyotocabinet.rb
|
587
|
-
- test/rbbt/persist/tsv/test_lmdb.rb
|
588
|
-
- test/rbbt/persist/tsv/test_tokyocabinet.rb
|
589
|
-
- test/rbbt/persist/tsv/test_cdb.rb
|
590
|
-
- test/rbbt/persist/tsv/test_leveldb.rb
|
591
|
-
- test/rbbt/persist/tsv/test_sharder.rb
|
592
|
-
- test/rbbt/test_packed_index.rb
|
593
581
|
- test/rbbt/test_entity.rb
|
594
|
-
- test/rbbt/test_fix_width_table.rb
|
595
582
|
- test/rbbt/workflow/test_remote_workflow.rb
|
596
|
-
- test/rbbt/workflow/test_doc.rb
|
597
|
-
- test/rbbt/workflow/step/test_dependencies.rb
|
598
|
-
- test/rbbt/workflow/test_schedule.rb
|
599
583
|
- test/rbbt/workflow/util/test_archive.rb
|
600
584
|
- test/rbbt/workflow/util/test_orchestrator.rb
|
601
|
-
- test/rbbt/workflow/
|
585
|
+
- test/rbbt/workflow/util/test_data.rb
|
586
|
+
- test/rbbt/workflow/test_doc.rb
|
587
|
+
- test/rbbt/workflow/test_schedule.rb
|
602
588
|
- test/rbbt/workflow/test_step.rb
|
603
|
-
- test/rbbt/
|
604
|
-
- test/rbbt/
|
605
|
-
- test/rbbt/
|
606
|
-
- test/rbbt/util/test_migrate.rb
|
607
|
-
- test/rbbt/util/test_simpleDSL.rb
|
608
|
-
- test/rbbt/util/concurrency/processes/test_socket.rb
|
609
|
-
- test/rbbt/util/concurrency/test_processes.rb
|
610
|
-
- test/rbbt/util/concurrency/test_threads.rb
|
611
|
-
- test/rbbt/util/test_filecache.rb
|
612
|
-
- test/rbbt/util/simpleopt/test_get.rb
|
613
|
-
- test/rbbt/util/simpleopt/test_parse.rb
|
614
|
-
- test/rbbt/util/simpleopt/test_setup.rb
|
615
|
-
- test/rbbt/util/test_misc.rb
|
616
|
-
- test/rbbt/util/test_excel2tsv.rb
|
617
|
-
- test/rbbt/util/test_semaphore.rb
|
618
|
-
- test/rbbt/util/test_procpath.rb
|
619
|
-
- test/rbbt/util/R/test_model.rb
|
620
|
-
- test/rbbt/util/R/test_eval.rb
|
621
|
-
- test/rbbt/util/R/test_plot.rb
|
622
|
-
- test/rbbt/util/test_open.rb
|
623
|
-
- test/rbbt/util/test_tmpfile.rb
|
624
|
-
- test/rbbt/util/test_cmd.rb
|
625
|
-
- test/rbbt/util/test_concurrency.rb
|
589
|
+
- test/rbbt/workflow/step/test_dependencies.rb
|
590
|
+
- test/rbbt/workflow/test_task.rb
|
591
|
+
- test/rbbt/resource/test_path.rb
|
626
592
|
- test/rbbt/util/test_colorize.rb
|
627
|
-
- test/rbbt/util/
|
628
|
-
- test/rbbt/util/
|
629
|
-
- test/rbbt/util/test_simpleopt.rb
|
630
|
-
- test/rbbt/util/test_python.rb
|
631
|
-
- test/rbbt/util/test_chain_methods.rb
|
593
|
+
- test/rbbt/util/test_procpath.rb
|
594
|
+
- test/rbbt/util/misc/test_development.rb
|
632
595
|
- test/rbbt/util/misc/test_omics.rb
|
596
|
+
- test/rbbt/util/misc/test_pipes.rb
|
597
|
+
- test/rbbt/util/misc/test_format.rb
|
633
598
|
- test/rbbt/util/misc/test_lock.rb
|
634
599
|
- test/rbbt/util/misc/test_multipart_payload.rb
|
635
600
|
- test/rbbt/util/misc/test_bgzf.rb
|
636
|
-
- test/rbbt/util/
|
637
|
-
- test/rbbt/util/
|
638
|
-
- test/rbbt/util/
|
601
|
+
- test/rbbt/util/test_concurrency.rb
|
602
|
+
- test/rbbt/util/test_cmd.rb
|
603
|
+
- test/rbbt/util/R/test_plot.rb
|
604
|
+
- test/rbbt/util/R/test_eval.rb
|
605
|
+
- test/rbbt/util/R/test_model.rb
|
606
|
+
- test/rbbt/util/test_config.rb
|
607
|
+
- test/rbbt/util/test_log.rb
|
608
|
+
- test/rbbt/util/test_simpleDSL.rb
|
639
609
|
- test/rbbt/util/log/test_progress.rb
|
610
|
+
- test/rbbt/util/test_tmpfile.rb
|
640
611
|
- test/rbbt/util/test_R.rb
|
641
|
-
- test/rbbt/
|
642
|
-
- test/rbbt/
|
643
|
-
- test/rbbt/
|
644
|
-
- test/rbbt/
|
645
|
-
- test/rbbt/
|
646
|
-
- test/rbbt/
|
647
|
-
- test/rbbt/
|
648
|
-
- test/rbbt/
|
649
|
-
- test/rbbt/
|
650
|
-
- test/rbbt/
|
651
|
-
- test/rbbt/
|
652
|
-
- test/rbbt/
|
653
|
-
- test/rbbt/
|
654
|
-
- test/rbbt/
|
655
|
-
- test/rbbt/
|
656
|
-
- test/rbbt/
|
657
|
-
- test/rbbt/
|
612
|
+
- test/rbbt/util/test_excel2tsv.rb
|
613
|
+
- test/rbbt/util/test_misc.rb
|
614
|
+
- test/rbbt/util/test_open.rb
|
615
|
+
- test/rbbt/util/test_simpleopt.rb
|
616
|
+
- test/rbbt/util/simpleopt/test_parse.rb
|
617
|
+
- test/rbbt/util/simpleopt/test_setup.rb
|
618
|
+
- test/rbbt/util/simpleopt/test_get.rb
|
619
|
+
- test/rbbt/util/test_python.rb
|
620
|
+
- test/rbbt/util/test_filecache.rb
|
621
|
+
- test/rbbt/util/concurrency/test_processes.rb
|
622
|
+
- test/rbbt/util/concurrency/test_threads.rb
|
623
|
+
- test/rbbt/util/concurrency/processes/test_socket.rb
|
624
|
+
- test/rbbt/util/test_semaphore.rb
|
625
|
+
- test/rbbt/util/test_chain_methods.rb
|
626
|
+
- test/rbbt/util/test_migrate.rb
|
627
|
+
- test/rbbt/test_resource.rb
|
628
|
+
- test/rbbt/test_packed_index.rb
|
629
|
+
- test/rbbt/tsv/test_change_id.rb
|
630
|
+
- test/rbbt/tsv/test_attach.rb
|
631
|
+
- test/rbbt/tsv/test_filter.rb
|
658
632
|
- test/rbbt/tsv/test_parser.rb
|
659
633
|
- test/rbbt/tsv/test_csv.rb
|
660
|
-
- test/rbbt/tsv/
|
634
|
+
- test/rbbt/tsv/test_accessor.rb
|
635
|
+
- test/rbbt/tsv/test_matrix.rb
|
661
636
|
- test/rbbt/tsv/test_field_index.rb
|
662
637
|
- test/rbbt/tsv/test_util.rb
|
663
|
-
- test/rbbt/tsv/
|
664
|
-
- test/rbbt/tsv/test_filter.rb
|
665
|
-
- test/rbbt/tsv/test_stream.rb
|
638
|
+
- test/rbbt/tsv/test_index.rb
|
666
639
|
- test/rbbt/tsv/test_parallel.rb
|
667
|
-
- test/rbbt/tsv/
|
668
|
-
- test/rbbt/tsv/test_attach.rb
|
640
|
+
- test/rbbt/tsv/test_manipulate.rb
|
669
641
|
- test/rbbt/tsv/test_excel.rb
|
670
|
-
- test/rbbt/tsv/test_change_id.rb
|
671
|
-
- test/rbbt/tsv/test_index.rb
|
672
|
-
- test/rbbt/tsv/parallel/test_traverse.rb
|
673
642
|
- test/rbbt/tsv/parallel/test_through.rb
|
643
|
+
- test/rbbt/tsv/parallel/test_traverse.rb
|
644
|
+
- test/rbbt/tsv/test_stream.rb
|
645
|
+
- test/rbbt/test_association.rb
|
646
|
+
- test/rbbt/hpc/test_batch.rb
|
647
|
+
- test/rbbt/hpc/test_slurm.rb
|
648
|
+
- test/rbbt/association/test_database.rb
|
649
|
+
- test/rbbt/association/test_item.rb
|
650
|
+
- test/rbbt/association/test_open.rb
|
651
|
+
- test/rbbt/association/test_util.rb
|
652
|
+
- test/rbbt/association/test_index.rb
|
653
|
+
- test/rbbt/test_knowledge_base.rb
|
654
|
+
- test/rbbt/persist/tsv/test_kyotocabinet.rb
|
655
|
+
- test/rbbt/persist/tsv/test_cdb.rb
|
656
|
+
- test/rbbt/persist/tsv/test_lmdb.rb
|
657
|
+
- test/rbbt/persist/tsv/test_sharder.rb
|
658
|
+
- test/rbbt/persist/tsv/test_leveldb.rb
|
659
|
+
- test/rbbt/persist/tsv/test_tokyocabinet.rb
|
660
|
+
- test/rbbt/persist/test_tsv.rb
|
661
|
+
- test/rbbt/test_tsv.rb
|
662
|
+
- test/rbbt/test_annotations.rb
|
663
|
+
- test/rbbt/test_fix_width_table.rb
|
664
|
+
- test/rbbt/test_workflow.rb
|
665
|
+
- test/rbbt/entity/test_identifiers.rb
|
666
|
+
- test/rbbt/annotations/test_util.rb
|
667
|
+
- test/rbbt/test_hpc.rb
|
668
|
+
- test/rbbt/test_monitor.rb
|
669
|
+
- test/rbbt/test_persist.rb
|
670
|
+
- test/rbbt/knowledge_base/test_entity.rb
|
671
|
+
- test/rbbt/knowledge_base/test_registry.rb
|
672
|
+
- test/rbbt/knowledge_base/test_syndicate.rb
|
673
|
+
- test/rbbt/knowledge_base/test_query.rb
|
674
|
+
- test/rbbt/knowledge_base/test_enrichment.rb
|
675
|
+
- test/rbbt/knowledge_base/test_traverse.rb
|
676
|
+
- test/test_helper.rb
|