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.
Files changed (51) 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/workflow/python/inputs.rb +33 -23
  25. data/lib/scout/workflow/python/task.rb +219 -22
  26. data/lib/scout/workflow/python.rb +236 -9
  27. data/lib/scout-rig/testing/availability.rb +608 -0
  28. data/python/README.md +51 -0
  29. data/python/scout/__init__.py +2 -0
  30. data/python/scout/runner.py +193 -29
  31. data/python/scout/task_errors.py +6 -0
  32. data/research/00_scope_and_themes.md +131 -0
  33. data/research/data-conversion-and-scripting-analysis.md +209 -0
  34. data/research/design-philosophy-analysis.md +246 -0
  35. data/research/python-helper-package-analysis.md +272 -0
  36. data/research/pythonworkflow-analysis.md +199 -0
  37. data/research/scoutpython-bridge-analysis.md +185 -0
  38. data/research/synthesis-report.md +109 -0
  39. data/research/testing-availability-baseline.md +1625 -0
  40. data/research/testing-availability-final-report.md +500 -0
  41. data/research/validation-report.md +149 -0
  42. data/scout-rig.gemspec +35 -5
  43. data/test/scout/python/test_util.rb +13 -0
  44. data/test/scout/test_python.rb +10 -0
  45. data/test/scout/workflow/python/test_task.rb +1119 -1
  46. data/test/scout-rig/testing/test_availability.rb +495 -0
  47. data/test/scout-rig/testing/test_test_support.rb +166 -0
  48. data/test/test_helper.rb +96 -19
  49. metadata +47 -4
  50. data/doc/Python.md +0 -482
  51. data/doc/PythonWorkflow.md +0 -163
@@ -0,0 +1,109 @@
1
+ # Synthesis Report
2
+
3
+ > **Non-normative.** This report cross-checks all investigation artifacts,
4
+ > identifies gaps, and produces a concrete writing plan for the new documentation.
5
+ >
6
+ > **Status note (2026-09-12):** the writing plan below has been executed —
7
+ > and superseded — by the completed documentation tree (`doc/StartHere.md`,
8
+ > `doc/user/`, `doc/developer/`). Read it as history of how the corpus was
9
+ > planned, not as a description of the current page set (which now also
10
+ > includes `PythonEnvironments.md`, `TestingAndPackaging.md` and
11
+ > `PythonTaskRunnerInternals.md`).
12
+
13
+ ## Artifact inventory
14
+
15
+ | # | Artifact | Coverage |
16
+ |---|----------|----------|
17
+ | 00 | scope_and_themes | Repository structure, module inventory, GitHub URLs |
18
+ | 01 | scoutpython-bridge-analysis | PyCall wrapping, execution modes, threading, bindings, paths, iteration |
19
+ | 02 | data-conversion-and-scripting-analysis | ruby2python, script(), data converters, TSV↔DataFrame |
20
+ | 03 | pythonworkflow-analysis | python_task lifecycle, type mapping, CLI argv building, return decoding |
21
+ | 04 | python-helper-package-analysis | Python scout package: TSV IO, runner.py, workflow.py, remote.py |
22
+ | 05 | design-philosophy-analysis | Design principles, anti-patterns, comparison with scout-essentials |
23
+
24
+ ## Gap analysis
25
+
26
+ ### Covered well
27
+ - ScoutPython execution modes and their differences.
28
+ - Threading model and at_exit hook.
29
+ - Data conversion helpers (py2ruby_a, tsv2df, df2tsv, etc.).
30
+ - script() facility and result persistence.
31
+ - PythonWorkflow lifecycle (metadata → task definition → execution).
32
+ - Python scout package (all four modules).
33
+ - Design philosophy and anti-patterns.
34
+ - Type mapping between Python and Scout.
35
+
36
+ ### Gaps (acceptable)
37
+ - No deep investigation of PyCall internals (out of scope — it's a dependency).
38
+ - No performance benchmarks (not requested).
39
+ - No investigation of error recovery paths in detail (mentioned where relevant).
40
+
41
+ ## Writing plan
42
+
43
+ ### User documentation (`doc/user/`)
44
+
45
+ Concept-oriented, task-focused. No implementation internals.
46
+
47
+ | File | Concepts covered | Source artifacts |
48
+ |------|-----------------|------------------|
49
+ | `RunningPythonFromRuby.md` | When/how to run Python from Ruby: run modes, imports, aliases | 01 |
50
+ | `PassingDataToPython.md` | Converting Ruby data to Python: TSV→DataFrame, numpy→Array, script variables | 02 |
51
+ | `ScriptingPython.md` | Ad-hoc Python scripts with Ruby variables: script(), result persistence | 02 |
52
+ | `DefiningPythonTasks.md` | Defining Scout tasks backed by Python functions | 03 |
53
+ | `DrivingWorkflowsFromPython.md` | Using the Python scout package: local and remote workflows | 04 |
54
+ | `IteratingPythonData.md` | Traversing Python iterables from Ruby | 01 |
55
+ | `Cookbook.md` | Practical recipes | 01-05 |
56
+
57
+ ### Developer documentation (`doc/developer/`)
58
+
59
+ Concise architectural explanations. Link to research for deep detail.
60
+
61
+ | File | Architecture covered | Source artifacts |
62
+ |------|---------------------|------------------|
63
+ | `Architecture.md` | Module map, dependency graph, data flow | 00, all |
64
+ | `ScoutPythonInternals.md` | PyCall wrapping, execution modes, threading, GC, bindings | 01 |
65
+ | `PythonWorkflowInternals.md` | Metadata discovery, type mapping, CLI generation, result decoding | 03 |
66
+ | `DataConversionInternals.md` | ruby2python pipeline, pickle/JSON, subprocess management | 02 |
67
+ | `DesignPrinciples.md` | Scout-rig design philosophy, idiomatic patterns, anti-patterns | 05 |
68
+
69
+ ### Top-level
70
+
71
+ | File | Content |
72
+ |------|---------|
73
+ | `StartHere.md` | Routing page: audience → layer |
74
+ | `Improvements.md` | Actionable recommendations |
75
+
76
+ ## Writing order
77
+
78
+ 1. `doc/StartHere.md` — Needed first for structure.
79
+ 2. `doc/user/RunningPythonFromRuby.md` — Core user concept.
80
+ 3. `doc/user/PassingDataToPython.md` — Data flow, depends on RunningPython concept.
81
+ 4. `doc/user/ScriptingPython.md` — Script-specific, depends on PassingData.
82
+ 5. `doc/user/DefiningPythonTasks.md` — Workflow integration, depends on all previous.
83
+ 6. `doc/user/DrivingWorkflowsFromPython.md` — Python-side, standalone.
84
+ 7. `doc/user/IteratingPythonData.md` — Niche but useful.
85
+ 8. `doc/user/Cookbook.md` — Recipes, references all above.
86
+ 9. `doc/developer/Architecture.md` — Overview for developers.
87
+ 10. `doc/developer/ScoutPythonInternals.md` — Deep dive.
88
+ 11. `doc/developer/PythonWorkflowInternals.md` — Deep dive.
89
+ 12. `doc/developer/DataConversionInternals.md` — Deep dive.
90
+ 13. `doc/developer/DesignPrinciples.md` — Philosophy and anti-patterns.
91
+ 14. `doc/Improvements.md` — From anti-patterns and findings.
92
+ 15. Remove old docs.
93
+
94
+ ## GitHub cross-references
95
+
96
+ For scout-essentials concepts, link to:
97
+ ```
98
+ https://github.com/mikisvaz/scout-essentials/blob/main/doc/user/<File>.md
99
+ https://github.com/mikisvaz/scout-essentials/blob/main/doc/developer/<File>.md
100
+ ```
101
+
102
+ Specific links to use:
103
+ - TSV → `doc/user/AnnotatingData.md`
104
+ - Working with files / TmpFile → `doc/user/WorkingWithFiles.md`
105
+ - CMD / Running commands → `doc/user/RunningCommands.md`
106
+ - Logging / Progress bars → `doc/user/LoggingAndProgress.md`
107
+ - Streams / ConcurrentStreamProcessFailed → `doc/user/HandlingStreams.md`
108
+ - Path resolution → `doc/developer/PathResolution.md`
109
+ - Caching / Persist → `doc/user/CachingResults.md`