scout-rig 0.2.5 → 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.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/.vimproject +31 -13
  3. data/README.md +27 -4
  4. data/Rakefile +1 -0
  5. data/VERSION +1 -1
  6. data/doc/Improvements.md +396 -0
  7. data/doc/StartHere.md +95 -0
  8. data/doc/developer/Architecture.md +232 -0
  9. data/doc/developer/DataConversionInternals.md +407 -0
  10. data/doc/developer/DesignPrinciples.md +254 -0
  11. data/doc/developer/PythonTaskRunnerInternals.md +371 -0
  12. data/doc/developer/PythonWorkflowInternals.md +539 -0
  13. data/doc/developer/ScoutPythonInternals.md +504 -0
  14. data/doc/user/Cookbook.md +337 -0
  15. data/doc/user/DefiningPythonTasks.md +708 -0
  16. data/doc/user/DrivingWorkflowsFromPython.md +418 -0
  17. data/doc/user/IteratingPythonData.md +142 -0
  18. data/doc/user/PassingDataToPython.md +223 -0
  19. data/doc/user/PythonEnvironments.md +197 -0
  20. data/doc/user/RunningPythonFromRuby.md +267 -0
  21. data/doc/user/ScriptingPython.md +281 -0
  22. data/doc/user/TestingAndPackaging.md +487 -0
  23. data/lib/scout/python/script.rb +11 -2
  24. data/lib/scout/python/util.rb +9 -0
  25. data/lib/scout/workflow/python/inputs.rb +33 -23
  26. data/lib/scout/workflow/python/task.rb +219 -18
  27. data/lib/scout/workflow/python.rb +236 -9
  28. data/lib/scout-rig/testing/availability.rb +608 -0
  29. data/python/README.md +51 -0
  30. data/python/scout/__init__.py +2 -0
  31. data/python/scout/runner.py +193 -29
  32. data/python/scout/task_errors.py +6 -0
  33. data/research/00_scope_and_themes.md +131 -0
  34. data/research/data-conversion-and-scripting-analysis.md +209 -0
  35. data/research/design-philosophy-analysis.md +246 -0
  36. data/research/python-helper-package-analysis.md +272 -0
  37. data/research/pythonworkflow-analysis.md +199 -0
  38. data/research/scoutpython-bridge-analysis.md +185 -0
  39. data/research/synthesis-report.md +109 -0
  40. data/research/testing-availability-baseline.md +1625 -0
  41. data/research/testing-availability-final-report.md +500 -0
  42. data/research/validation-report.md +149 -0
  43. data/scout-rig.gemspec +35 -5
  44. data/test/scout/python/test_util.rb +13 -0
  45. data/test/scout/test_python.rb +10 -0
  46. data/test/scout/workflow/python/test_task.rb +1119 -1
  47. data/test/scout-rig/testing/test_availability.rb +495 -0
  48. data/test/scout-rig/testing/test_test_support.rb +166 -0
  49. data/test/test_helper.rb +96 -19
  50. metadata +47 -4
  51. data/doc/Python.md +0 -482
  52. 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 ruby lib
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.5".freeze
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/Python.md",
29
- "doc/PythonWorkflow.md",
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 = "3.7.0.dev".freeze
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
@@ -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