scout-rig 0.2.4 → 0.2.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 12212fe2b866716a2128cb574e9c3a4c7d21110cd75e5ed702c52ee32c1fb641
4
- data.tar.gz: 905897b901d91adc37dbe995a31591ac03cbd7734b7b27cb6f7120460f42127d
3
+ metadata.gz: 3e3f0f41ad3040aa251d03ddef193c6b3bd79fef11074e83a65feb83f3534dee
4
+ data.tar.gz: 6fc7536c4d7fa3dfd786053670ba26652c7577950e98ae92418d6219557a9d66
5
5
  SHA512:
6
- metadata.gz: 644e8bf0e68dd60abb7799e0e683295377afba8ff9a7bb5173c8acdf915ba2135e44424d33949a09caccad63fa9dbeb1e46ae7459296f90a971e0e6d857a9328
7
- data.tar.gz: 53b53caca7b0e1e50f9629b33909b549b69ef9f0bcb2d4b00aa96752516b2a58562a5c8f9eb94db4c5748571e2292b442ca107a88ff8e4ef318c061fc795197f
6
+ metadata.gz: '058750407dc01b6c95657f30b4ed063a8012e3b963c43247e2e30ac7e87c29a0be8deec2c1a1c000bac7b2c3c0006d8928d8907e387da445211c5f53857008bf'
7
+ data.tar.gz: adf47c9177aebe4dc1aef81350ac1e3458cefedd3c3a74cb82b485ab7bc96dbe7c118b47e721209fbe80c06db97e64ee7740cb72ae2dae9c4cafd54fce174c2a
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.4
1
+ 0.2.5
@@ -22,7 +22,10 @@ module PythonWorkflow
22
22
  m
23
23
  end
24
24
 
25
- path = Scout.python.task
25
+ Kernel.const_set workflow_name, workflow
26
+
27
+ path = Scout.python.task if path.nil?
28
+
26
29
  workflow.python_task_dir = path
27
30
  path.glob_names("*.py").each do |name|
28
31
  name = name.sub '.py', ''
data/python/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ __pycache__/
2
+ *.pyc
3
+ *.pyo
4
+ *.pyd
5
+ *.egg-info/
6
+ build/
7
+ dist/
8
+ .pytest_cache/
data/python/README.md ADDED
@@ -0,0 +1,105 @@
1
+ # scout-rig Python package
2
+
3
+ This directory contains the Python companion package for scout-rig.
4
+
5
+ It provides the `scout` Python module used to:
6
+
7
+ - read and write Scout-style TSV files with pandas
8
+ - run Scout workflows from Python through the standard Scout CLI
9
+ - inspect workflow metadata
10
+ - define Python functions as Scout-compatible tasks with `scout.task(...)`
11
+ - call remote workflow servers over HTTP
12
+
13
+ The Python package is meant to work together with the Ruby Scout stack.
14
+ It does not replace the Ruby runtime. Instead, it offers a convenient Python interface on top of Scout command-line workflows and PythonWorkflow integration.
15
+
16
+ ## Requirements
17
+
18
+ The package expects the Scout and Rbbt command-line tools used by the library to be available in your environment.
19
+
20
+ In particular, local workflow execution helpers use commands such as:
21
+
22
+ - `rbbt_exec.rb`
23
+ - `rbbt workflow task ...`
24
+
25
+ So, in practice, you should already have the Ruby scout-rig and related Scout packages installed and configured.
26
+
27
+ Base Python dependencies:
28
+
29
+ - `numpy`
30
+ - `pandas`
31
+
32
+ Optional dependencies:
33
+
34
+ - `requests` for the remote workflow client
35
+ - `rich` for `scout.rich(...)`
36
+
37
+ ## Install from GitHub with pip
38
+
39
+ Because this repository is primarily a Ruby project and the Python package lives under `python/`, install it with the `subdirectory` fragment:
40
+
41
+ pip install "scout-rig @ git+https://github.com/mikisvaz/scout-rig.git@main#subdirectory=python"
42
+
43
+ You can also omit the explicit package name:
44
+
45
+ pip install "git+https://github.com/mikisvaz/scout-rig.git@main#subdirectory=python"
46
+
47
+ For editable local development from a clone of the repository:
48
+
49
+ pip install -e python
50
+
51
+ ## Optional extras
52
+
53
+ For remote workflow support:
54
+
55
+ pip install "scout-rig[remote] @ git+https://github.com/mikisvaz/scout-rig.git@main#subdirectory=python"
56
+
57
+ For rich object inspection:
58
+
59
+ pip install "scout-rig[inspect] @ git+https://github.com/mikisvaz/scout-rig.git@main#subdirectory=python"
60
+
61
+ ## Quick example
62
+
63
+ import scout
64
+ import scout.workflow as sw
65
+
66
+ wf = sw.Workflow('Baking')
67
+ print(wf.tasks())
68
+ print(wf.run('bake_muffin_tray', add_blueberries=True))
69
+
70
+ ## PythonWorkflow example
71
+
72
+ import scout
73
+
74
+ def hello(name: str, excited: bool = False) -> str:
75
+ """Generate a greeting."""
76
+ return f"Hello, {name}{'!' if excited else ''}"
77
+
78
+ scout.task(hello)
79
+
80
+ Then inspect metadata with:
81
+
82
+ python hello.py --scout-metadata
83
+
84
+ ## What pip installs
85
+
86
+ The pip package installs only the Python module contained in this directory.
87
+ It does not install the Ruby scout-rig gem or the rest of the Scout stack.
88
+
89
+ That separation is intentional:
90
+
91
+ - Ruby remains responsible for workflow execution and PythonWorkflow integration
92
+ - Python provides helper functions and a convenient development interface
93
+
94
+ ## Package layout
95
+
96
+ - `scout.__init__` - TSV helpers, path helpers, workflow execution helpers
97
+ - `scout.runner` - `scout.task(...)` and metadata extraction for PythonWorkflow
98
+ - `scout.workflow` - local workflow wrapper
99
+ - `scout.workflow.remote` - remote workflow client
100
+
101
+ ## Running a simple import test
102
+
103
+ From the repository root:
104
+
105
+ PYTHONPATH=python python -c "import scout; print(scout.__file__)"
@@ -0,0 +1,49 @@
1
+ [build-system]
2
+ requires = ["setuptools>=69", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "scout-rig"
7
+ version = "0.2.4"
8
+ description = "Python helpers for Scout workflows, TSV files, and PythonWorkflow task metadata"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = { text = "MIT" }
12
+ authors = [
13
+ { name = "Miki S. Vazquez" }
14
+ ]
15
+ classifiers = [
16
+ "Development Status :: 3 - Alpha",
17
+ "Intended Audience :: Developers",
18
+ "License :: OSI Approved :: MIT License",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3.10",
21
+ "Programming Language :: Python :: 3.11",
22
+ "Programming Language :: Python :: 3.12",
23
+ "Topic :: Software Development :: Libraries :: Python Modules",
24
+ "Topic :: Scientific/Engineering :: Bio-Informatics"
25
+ ]
26
+ dependencies = [
27
+ "numpy",
28
+ "pandas"
29
+ ]
30
+
31
+ [project.optional-dependencies]
32
+ remote = [
33
+ "requests"
34
+ ]
35
+ inspect = [
36
+ "rich"
37
+ ]
38
+
39
+ [project.urls]
40
+ Homepage = "https://github.com/mikisvaz/scout-rig"
41
+ Repository = "https://github.com/mikisvaz/scout-rig"
42
+ Issues = "https://github.com/mikisvaz/scout-rig/issues"
43
+
44
+ [tool.setuptools.packages.find]
45
+ where = ["."]
46
+ include = ["scout*"]
47
+
48
+ [tool.setuptools]
49
+ include-package-data = true
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.4 ruby lib
5
+ # stub: scout-rig 0.2.5 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "scout-rig".freeze
9
- s.version = "0.2.4".freeze
9
+ s.version = "0.2.5".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]
@@ -36,6 +36,9 @@ Gem::Specification.new do |s|
36
36
  "lib/scout/workflow/python.rb",
37
37
  "lib/scout/workflow/python/inputs.rb",
38
38
  "lib/scout/workflow/python/task.rb",
39
+ "python/.gitignore",
40
+ "python/README.md",
41
+ "python/pyproject.toml",
39
42
  "python/scout/__init__.py",
40
43
  "python/scout/runner.py",
41
44
  "python/scout/workflow.py",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scout-rig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
@@ -62,6 +62,9 @@ files:
62
62
  - lib/scout/workflow/python.rb
63
63
  - lib/scout/workflow/python/inputs.rb
64
64
  - lib/scout/workflow/python/task.rb
65
+ - python/.gitignore
66
+ - python/README.md
67
+ - python/pyproject.toml
65
68
  - python/scout/__init__.py
66
69
  - python/scout/runner.py
67
70
  - python/scout/workflow.py