scout-rig 0.2.6 → 0.2.7
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/.vimproject +31 -13
- data/README.md +27 -4
- data/Rakefile +1 -0
- data/VERSION +1 -1
- data/doc/Improvements.md +396 -0
- data/doc/StartHere.md +95 -0
- data/doc/developer/Architecture.md +232 -0
- data/doc/developer/DataConversionInternals.md +407 -0
- data/doc/developer/DesignPrinciples.md +254 -0
- data/doc/developer/PythonTaskRunnerInternals.md +371 -0
- data/doc/developer/PythonWorkflowInternals.md +539 -0
- data/doc/developer/ScoutPythonInternals.md +504 -0
- data/doc/user/Cookbook.md +337 -0
- data/doc/user/DefiningPythonTasks.md +708 -0
- data/doc/user/DrivingWorkflowsFromPython.md +418 -0
- data/doc/user/IteratingPythonData.md +142 -0
- data/doc/user/PassingDataToPython.md +223 -0
- data/doc/user/PythonEnvironments.md +197 -0
- data/doc/user/RunningPythonFromRuby.md +267 -0
- data/doc/user/ScriptingPython.md +281 -0
- data/doc/user/TestingAndPackaging.md +487 -0
- data/lib/scout/python/script.rb +11 -2
- data/lib/scout/workflow/python/inputs.rb +33 -23
- data/lib/scout/workflow/python/task.rb +219 -22
- data/lib/scout/workflow/python.rb +236 -9
- data/lib/scout-rig/testing/availability.rb +608 -0
- data/python/README.md +51 -0
- data/python/scout/__init__.py +2 -0
- data/python/scout/runner.py +193 -29
- data/python/scout/task_errors.py +6 -0
- data/research/00_scope_and_themes.md +131 -0
- data/research/data-conversion-and-scripting-analysis.md +209 -0
- data/research/design-philosophy-analysis.md +246 -0
- data/research/python-helper-package-analysis.md +272 -0
- data/research/pythonworkflow-analysis.md +199 -0
- data/research/scoutpython-bridge-analysis.md +185 -0
- data/research/synthesis-report.md +109 -0
- data/research/testing-availability-baseline.md +1625 -0
- data/research/testing-availability-final-report.md +500 -0
- data/research/validation-report.md +149 -0
- data/scout-rig.gemspec +35 -5
- data/test/scout/python/test_util.rb +13 -0
- data/test/scout/test_python.rb +10 -0
- data/test/scout/workflow/python/test_task.rb +1119 -1
- data/test/scout-rig/testing/test_availability.rb +495 -0
- data/test/scout-rig/testing/test_test_support.rb +166 -0
- data/test/test_helper.rb +96 -19
- metadata +47 -4
- data/doc/Python.md +0 -482
- data/doc/PythonWorkflow.md +0 -163
data/scout-rig.gemspec
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
|
5
|
-
# stub: scout-rig 0.2.
|
|
5
|
+
# stub: scout-rig 0.2.7 ruby lib
|
|
6
6
|
|
|
7
7
|
Gem::Specification.new do |s|
|
|
8
8
|
s.name = "scout-rig".freeze
|
|
9
|
-
s.version = "0.2.
|
|
9
|
+
s.version = "0.2.7".freeze
|
|
10
10
|
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
|
12
12
|
s.require_paths = ["lib".freeze]
|
|
@@ -25,9 +25,25 @@ Gem::Specification.new do |s|
|
|
|
25
25
|
"README.md",
|
|
26
26
|
"Rakefile",
|
|
27
27
|
"VERSION",
|
|
28
|
-
"doc/
|
|
29
|
-
"doc/
|
|
28
|
+
"doc/Improvements.md",
|
|
29
|
+
"doc/StartHere.md",
|
|
30
|
+
"doc/developer/Architecture.md",
|
|
31
|
+
"doc/developer/DataConversionInternals.md",
|
|
32
|
+
"doc/developer/DesignPrinciples.md",
|
|
33
|
+
"doc/developer/PythonTaskRunnerInternals.md",
|
|
34
|
+
"doc/developer/PythonWorkflowInternals.md",
|
|
35
|
+
"doc/developer/ScoutPythonInternals.md",
|
|
36
|
+
"doc/user/Cookbook.md",
|
|
37
|
+
"doc/user/DefiningPythonTasks.md",
|
|
38
|
+
"doc/user/DrivingWorkflowsFromPython.md",
|
|
39
|
+
"doc/user/IteratingPythonData.md",
|
|
40
|
+
"doc/user/PassingDataToPython.md",
|
|
41
|
+
"doc/user/PythonEnvironments.md",
|
|
42
|
+
"doc/user/RunningPythonFromRuby.md",
|
|
43
|
+
"doc/user/ScriptingPython.md",
|
|
44
|
+
"doc/user/TestingAndPackaging.md",
|
|
30
45
|
"lib/scout-rig.rb",
|
|
46
|
+
"lib/scout-rig/testing/availability.rb",
|
|
31
47
|
"lib/scout/python.rb",
|
|
32
48
|
"lib/scout/python/paths.rb",
|
|
33
49
|
"lib/scout/python/run.rb",
|
|
@@ -41,10 +57,23 @@ Gem::Specification.new do |s|
|
|
|
41
57
|
"python/pyproject.toml",
|
|
42
58
|
"python/scout/__init__.py",
|
|
43
59
|
"python/scout/runner.py",
|
|
60
|
+
"python/scout/task_errors.py",
|
|
44
61
|
"python/scout/workflow.py",
|
|
45
62
|
"python/scout/workflow/remote.py",
|
|
46
63
|
"python/test.py",
|
|
64
|
+
"research/00_scope_and_themes.md",
|
|
65
|
+
"research/data-conversion-and-scripting-analysis.md",
|
|
66
|
+
"research/design-philosophy-analysis.md",
|
|
67
|
+
"research/python-helper-package-analysis.md",
|
|
68
|
+
"research/pythonworkflow-analysis.md",
|
|
69
|
+
"research/scoutpython-bridge-analysis.md",
|
|
70
|
+
"research/synthesis-report.md",
|
|
71
|
+
"research/testing-availability-baseline.md",
|
|
72
|
+
"research/testing-availability-final-report.md",
|
|
73
|
+
"research/validation-report.md",
|
|
47
74
|
"scout-rig.gemspec",
|
|
75
|
+
"test/scout-rig/testing/test_availability.rb",
|
|
76
|
+
"test/scout-rig/testing/test_test_support.rb",
|
|
48
77
|
"test/scout/python/test_run.rb",
|
|
49
78
|
"test/scout/python/test_script.rb",
|
|
50
79
|
"test/scout/python/test_util.rb",
|
|
@@ -55,12 +84,13 @@ Gem::Specification.new do |s|
|
|
|
55
84
|
]
|
|
56
85
|
s.homepage = "http://github.com/mikisvaz/scout-rig".freeze
|
|
57
86
|
s.licenses = ["MIT".freeze]
|
|
58
|
-
s.rubygems_version = "
|
|
87
|
+
s.rubygems_version = "4.0.23".freeze
|
|
59
88
|
s.summary = "Scouts rigging things together".freeze
|
|
60
89
|
|
|
61
90
|
s.specification_version = 4
|
|
62
91
|
|
|
63
92
|
s.add_development_dependency(%q<juwelier>.freeze, ["~> 2.1.0".freeze])
|
|
64
93
|
s.add_runtime_dependency(%q<pycall>.freeze, ["> 0".freeze])
|
|
94
|
+
s.add_runtime_dependency(%q<scout-essentials>.freeze, ["> 0".freeze])
|
|
65
95
|
end
|
|
66
96
|
|
|
@@ -5,6 +5,14 @@ require 'scout/python'
|
|
|
5
5
|
class TestPythonUtil < Test::Unit::TestCase
|
|
6
6
|
|
|
7
7
|
def test_tuple
|
|
8
|
+
# numpy/pandas are optional test prerequisites (no lib/ code and no
|
|
9
|
+
# manifest requires them); ScoutPython.tsv2df/df2tsv run in-process
|
|
10
|
+
# through PyCall, so probe the embedded route.
|
|
11
|
+
omit(
|
|
12
|
+
"numpy not importable in the embedded (PyCall) interpreter: #{ScoutRig::Testing::Availability.python_modules_reason('numpy', route: :embedded)}. " \
|
|
13
|
+
'Install numpy or pin SCOUT_TEST_PYTHON to an interpreter that has it.'
|
|
14
|
+
) unless ScoutRig::Testing::Availability.python_modules?('numpy', route: :embedded)
|
|
15
|
+
|
|
8
16
|
tsv = TSV.setup([], :key_field => "Key", :fields => %w(Value1 Value2), :type => :list)
|
|
9
17
|
tsv["k1"] = %w(V1_1 V2_1)
|
|
10
18
|
tsv["k2"] = %w(V1_2 V2_2)
|
|
@@ -14,6 +22,11 @@ class TestPythonUtil < Test::Unit::TestCase
|
|
|
14
22
|
end
|
|
15
23
|
|
|
16
24
|
def test_numpy
|
|
25
|
+
omit(
|
|
26
|
+
"numpy not importable in the embedded (PyCall) interpreter: #{ScoutRig::Testing::Availability.python_modules_reason('numpy', route: :embedded)}. " \
|
|
27
|
+
'Install numpy or pin SCOUT_TEST_PYTHON to an interpreter that has it.'
|
|
28
|
+
) unless ScoutRig::Testing::Availability.python_modules?('numpy', route: :embedded)
|
|
29
|
+
|
|
17
30
|
ra = ScoutPython.run :numpy, :as => :np do
|
|
18
31
|
na = np.array([[[1,2,3], [4,5,6]]])
|
|
19
32
|
ScoutPython.numpy2ruby na
|
data/test/scout/test_python.rb
CHANGED
|
@@ -108,6 +108,16 @@ def python_print():
|
|
|
108
108
|
end
|
|
109
109
|
|
|
110
110
|
def test_binding
|
|
111
|
+
# torch is an OPTIONAL test prerequisite (no lib/ code and no manifest
|
|
112
|
+
# requires it). It runs in-process through PyCall, so probe the embedded
|
|
113
|
+
# route. Omit only when genuinely absent; if the probe passes, the
|
|
114
|
+
# pyimport below still executes unconditionally and a broken PyCall
|
|
115
|
+
# binding still fails this test.
|
|
116
|
+
omit(
|
|
117
|
+
"torch not importable in the embedded (PyCall) interpreter: #{ScoutRig::Testing::Availability.python_modules_reason('torch', route: :embedded)}. " \
|
|
118
|
+
'Install torch or pin SCOUT_TEST_PYTHON to an interpreter that has it.'
|
|
119
|
+
) unless ScoutRig::Testing::Availability.python_modules?('torch', route: :embedded)
|
|
120
|
+
|
|
111
121
|
raised = false
|
|
112
122
|
ScoutPython.binding_run do
|
|
113
123
|
pyimport :torch
|