labcode 0.3.1__tar.gz → 0.4.0__tar.gz

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 (89) hide show
  1. {labcode-0.3.1 → labcode-0.4.0}/PKG-INFO +14 -4
  2. {labcode-0.3.1 → labcode-0.4.0}/README.md +11 -1
  3. {labcode-0.3.1 → labcode-0.4.0}/examples/README.md +9 -0
  4. {labcode-0.3.1 → labcode-0.4.0}/labcode/run_cli.py +12 -0
  5. {labcode-0.3.1 → labcode-0.4.0}/labcode.egg-info/PKG-INFO +14 -4
  6. {labcode-0.3.1 → labcode-0.4.0}/labcode.egg-info/requires.txt +2 -2
  7. labcode-0.4.0/labcode.egg-info/scm_version.json +8 -0
  8. {labcode-0.3.1 → labcode-0.4.0}/pyproject.toml +6 -3
  9. labcode-0.3.1/labcode.egg-info/scm_version.json +0 -8
  10. {labcode-0.3.1 → labcode-0.4.0}/.github/workflows/ci.yml +0 -0
  11. {labcode-0.3.1 → labcode-0.4.0}/.github/workflows/publish.yml +0 -0
  12. {labcode-0.3.1 → labcode-0.4.0}/.gitignore +0 -0
  13. {labcode-0.3.1 → labcode-0.4.0}/LICENSE +0 -0
  14. {labcode-0.3.1 → labcode-0.4.0}/MANIFEST.in +0 -0
  15. {labcode-0.3.1 → labcode-0.4.0}/SPECIFICATIONS.md +0 -0
  16. {labcode-0.3.1 → labcode-0.4.0}/examples/outputs/plate_line.boundary.yaml +0 -0
  17. {labcode-0.3.1 → labcode-0.4.0}/examples/outputs/plate_line.observation.yaml +0 -0
  18. {labcode-0.3.1 → labcode-0.4.0}/examples/outputs/plate_line.plan.yaml +0 -0
  19. {labcode-0.3.1 → labcode-0.4.0}/examples/outputs/plate_line.svg +0 -0
  20. {labcode-0.3.1 → labcode-0.4.0}/examples/outputs/sila2_plate_cycle.boundary.yaml +0 -0
  21. {labcode-0.3.1 → labcode-0.4.0}/examples/outputs/sila2_plate_cycle.observation.yaml +0 -0
  22. {labcode-0.3.1 → labcode-0.4.0}/examples/outputs/sila2_plate_cycle.plan.yaml +0 -0
  23. {labcode-0.3.1 → labcode-0.4.0}/examples/outputs/sila2_plate_cycle.svg +0 -0
  24. {labcode-0.3.1 → labcode-0.4.0}/examples/plate_line.boundary.yaml +0 -0
  25. {labcode-0.3.1 → labcode-0.4.0}/examples/plate_line.env.yaml +0 -0
  26. {labcode-0.3.1 → labcode-0.4.0}/examples/plate_line.workflow.yaml +0 -0
  27. {labcode-0.3.1 → labcode-0.4.0}/examples/preflight_sila2_env.py +0 -0
  28. {labcode-0.3.1 → labcode-0.4.0}/examples/render_plate_line.py +0 -0
  29. {labcode-0.3.1 → labcode-0.4.0}/examples/render_sila2_plate_cycle.py +0 -0
  30. {labcode-0.3.1 → labcode-0.4.0}/examples/run_all_sila2_examples.py +0 -0
  31. {labcode-0.3.1 → labcode-0.4.0}/examples/run_sila2_plate_cycle.py +0 -0
  32. {labcode-0.3.1 → labcode-0.4.0}/examples/run_sila2_plate_cycle_no_atc.py +0 -0
  33. {labcode-0.3.1 → labcode-0.4.0}/examples/run_sila2_seal.py +0 -0
  34. {labcode-0.3.1 → labcode-0.4.0}/examples/sila2_plate_cycle.boundary.yaml +0 -0
  35. {labcode-0.3.1 → labcode-0.4.0}/examples/sila2_plate_cycle.workflow.yaml +0 -0
  36. {labcode-0.3.1 → labcode-0.4.0}/examples/sila2_plate_cycle.wrapped.env.yaml +0 -0
  37. {labcode-0.3.1 → labcode-0.4.0}/examples/sila2_plate_cycle_no_atc.boundary.yaml +0 -0
  38. {labcode-0.3.1 → labcode-0.4.0}/examples/sila2_plate_cycle_no_atc.workflow.yaml +0 -0
  39. {labcode-0.3.1 → labcode-0.4.0}/examples/sila2_plate_cycle_no_atc.wrapped.env.yaml +0 -0
  40. {labcode-0.3.1 → labcode-0.4.0}/examples/sila2_seal.boundary.yaml +0 -0
  41. {labcode-0.3.1 → labcode-0.4.0}/examples/sila2_seal.env.yaml +0 -0
  42. {labcode-0.3.1 → labcode-0.4.0}/examples/sila2_seal.workflow.yaml +0 -0
  43. {labcode-0.3.1 → labcode-0.4.0}/examples/sila2_seal.wrapped.env.yaml +0 -0
  44. {labcode-0.3.1 → labcode-0.4.0}/labcode/__init__.py +0 -0
  45. {labcode-0.3.1 → labcode-0.4.0}/labcode/__main__.py +0 -0
  46. {labcode-0.3.1 → labcode-0.4.0}/labcode/_child.py +0 -0
  47. {labcode-0.3.1 → labcode-0.4.0}/labcode/backend.py +0 -0
  48. {labcode-0.3.1 → labcode-0.4.0}/labcode/cli.py +0 -0
  49. {labcode-0.3.1 → labcode-0.4.0}/labcode/dialect.py +0 -0
  50. {labcode-0.3.1 → labcode-0.4.0}/labcode/extension.py +0 -0
  51. {labcode-0.3.1 → labcode-0.4.0}/labcode/idgen.py +0 -0
  52. {labcode-0.3.1 → labcode-0.4.0}/labcode/objectid.py +0 -0
  53. {labcode-0.3.1 → labcode-0.4.0}/labcode/otel.py +0 -0
  54. {labcode-0.3.1 → labcode-0.4.0}/labcode/otel_sila2.py +0 -0
  55. {labcode-0.3.1 → labcode-0.4.0}/labcode/probe.py +0 -0
  56. {labcode-0.3.1 → labcode-0.4.0}/labcode/py.typed +0 -0
  57. {labcode-0.3.1 → labcode-0.4.0}/labcode/record.py +0 -0
  58. {labcode-0.3.1 → labcode-0.4.0}/labcode/runner.py +0 -0
  59. {labcode-0.3.1 → labcode-0.4.0}/labcode/sila2.py +0 -0
  60. {labcode-0.3.1 → labcode-0.4.0}/labcode/sila2_commands.py +0 -0
  61. {labcode-0.3.1 → labcode-0.4.0}/labcode/sila2_instrument.py +0 -0
  62. {labcode-0.3.1 → labcode-0.4.0}/labcode.egg-info/SOURCES.txt +0 -0
  63. {labcode-0.3.1 → labcode-0.4.0}/labcode.egg-info/dependency_links.txt +0 -0
  64. {labcode-0.3.1 → labcode-0.4.0}/labcode.egg-info/entry_points.txt +0 -0
  65. {labcode-0.3.1 → labcode-0.4.0}/labcode.egg-info/scm_file_list.json +0 -0
  66. {labcode-0.3.1 → labcode-0.4.0}/labcode.egg-info/top_level.txt +0 -0
  67. {labcode-0.3.1 → labcode-0.4.0}/setup.cfg +0 -0
  68. {labcode-0.3.1 → labcode-0.4.0}/tests/fixtures/device_script.env.yaml +0 -0
  69. {labcode-0.3.1 → labcode-0.4.0}/tests/fixtures/device_script.workflow.yaml +0 -0
  70. {labcode-0.3.1 → labcode-0.4.0}/tests/fixtures/replenishment.env.yaml +0 -0
  71. {labcode-0.3.1 → labcode-0.4.0}/tests/fixtures/reroute_device.env.yaml +0 -0
  72. {labcode-0.3.1 → labcode-0.4.0}/tests/fixtures/reroute_transporter.env.yaml +0 -0
  73. {labcode-0.3.1 → labcode-0.4.0}/tests/fixtures/transport.env.yaml +0 -0
  74. {labcode-0.3.1 → labcode-0.4.0}/tests/fixtures/transport.workflow.yaml +0 -0
  75. {labcode-0.3.1 → labcode-0.4.0}/tests/test_backend.py +0 -0
  76. {labcode-0.3.1 → labcode-0.4.0}/tests/test_cli.py +0 -0
  77. {labcode-0.3.1 → labcode-0.4.0}/tests/test_dialect.py +0 -0
  78. {labcode-0.3.1 → labcode-0.4.0}/tests/test_objectid.py +0 -0
  79. {labcode-0.3.1 → labcode-0.4.0}/tests/test_otel.py +0 -0
  80. {labcode-0.3.1 → labcode-0.4.0}/tests/test_otel_child.py +0 -0
  81. {labcode-0.3.1 → labcode-0.4.0}/tests/test_otel_grpc.py +0 -0
  82. {labcode-0.3.1 → labcode-0.4.0}/tests/test_otel_sila2.py +0 -0
  83. {labcode-0.3.1 → labcode-0.4.0}/tests/test_probe.py +0 -0
  84. {labcode-0.3.1 → labcode-0.4.0}/tests/test_record.py +0 -0
  85. {labcode-0.3.1 → labcode-0.4.0}/tests/test_recording.py +0 -0
  86. {labcode-0.3.1 → labcode-0.4.0}/tests/test_run_cli.py +0 -0
  87. {labcode-0.3.1 → labcode-0.4.0}/tests/test_sila2.py +0 -0
  88. {labcode-0.3.1 → labcode-0.4.0}/tests/test_sila2_commands.py +0 -0
  89. {labcode-0.3.1 → labcode-0.4.0}/tests/test_sila2_instrument.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: labcode
3
- Version: 0.3.1
3
+ Version: 0.4.0
4
4
  Summary: labcode -- a dialect wrapper over the Object-Flow Programming Language toolchain
5
5
  Author-email: Kazunari Kaizu <kwaizu@gmail.com>
6
6
  License-Expression: MIT
@@ -21,8 +21,8 @@ Requires-Python: >=3.10
21
21
  Description-Content-Type: text/markdown
22
22
  License-File: LICENSE
23
23
  Requires-Dist: ofplang-validate<0.3,>=0.2
24
- Requires-Dist: ofplang-schedule<0.6,>=0.5
25
- Requires-Dist: ofplang-run<0.7,>=0.6
24
+ Requires-Dist: ofplang-schedule<0.9,>=0.8
25
+ Requires-Dist: ofplang-run<0.8,>=0.7
26
26
  Provides-Extra: test
27
27
  Requires-Dist: pytest>=7.0; extra == "test"
28
28
  Requires-Dist: opentelemetry-sdk>=1.20; extra == "test"
@@ -143,7 +143,8 @@ described below.
143
143
  lc run <workflow> --env <env>
144
144
  [--boundary DOC] [-o OUT] [--boundary-out FILE] [--observation-out FILE]
145
145
  [--seconds-per-tick S] [--op-timeout S | --no-op-timeout] [--no-probe]
146
- [--ignore-resources] [--trace] [--mission-id ID] [--object-ids seeded|real]
146
+ [--max-transport-legs N] [--ignore-resources] [--trace] [--mission-id ID]
147
+ [--object-ids seeded|real]
147
148
  ```
148
149
 
149
150
  - `<workflow>` — the portable v0 workflow: *what* happens.
@@ -176,6 +177,15 @@ lc run <workflow> --env <env>
176
177
  else 7200 real seconds. The two forms exclude each other.
177
178
  - `--no-probe` — ignore the environment's `x-labcode.probe` policies and treat every
178
179
  machine as reachable (§1.6). The documents are still validated.
180
+ - `--max-transport-legs N` — how many transport activities one Object-bearing arc may
181
+ be carried in (schedule spec §6.4.1), joined by **relay** activities. It is 1 by
182
+ default: the single hop. Raise it where the transporter cannot reach an instrument
183
+ from where the plate is — a bench it serves from one position only, or a hand-off
184
+ station a plate has to cross — and the move is planned as the shortest chain between
185
+ the two spots instead of being reported unreachable. Only the fewest possible moves
186
+ are offered, so a plate one move away is never sent round by way of somewhere else.
187
+ This describes the laboratory's reach rather than tuning the loop, which is why it is
188
+ here and not among the replan knobs below.
179
189
  - `--ignore-resources` — switch the consumable model off. The environment's resource
180
190
  declarations are still checked for shape but none is applied, so a bench whose devices
181
191
  declare stocks nobody is tracking runs without the boundary saying what they held.
@@ -99,7 +99,8 @@ described below.
99
99
  lc run <workflow> --env <env>
100
100
  [--boundary DOC] [-o OUT] [--boundary-out FILE] [--observation-out FILE]
101
101
  [--seconds-per-tick S] [--op-timeout S | --no-op-timeout] [--no-probe]
102
- [--ignore-resources] [--trace] [--mission-id ID] [--object-ids seeded|real]
102
+ [--max-transport-legs N] [--ignore-resources] [--trace] [--mission-id ID]
103
+ [--object-ids seeded|real]
103
104
  ```
104
105
 
105
106
  - `<workflow>` — the portable v0 workflow: *what* happens.
@@ -132,6 +133,15 @@ lc run <workflow> --env <env>
132
133
  else 7200 real seconds. The two forms exclude each other.
133
134
  - `--no-probe` — ignore the environment's `x-labcode.probe` policies and treat every
134
135
  machine as reachable (§1.6). The documents are still validated.
136
+ - `--max-transport-legs N` — how many transport activities one Object-bearing arc may
137
+ be carried in (schedule spec §6.4.1), joined by **relay** activities. It is 1 by
138
+ default: the single hop. Raise it where the transporter cannot reach an instrument
139
+ from where the plate is — a bench it serves from one position only, or a hand-off
140
+ station a plate has to cross — and the move is planned as the shortest chain between
141
+ the two spots instead of being reported unreachable. Only the fewest possible moves
142
+ are offered, so a plate one move away is never sent round by way of somewhere else.
143
+ This describes the laboratory's reach rather than tuning the loop, which is why it is
144
+ here and not among the replan knobs below.
135
145
  - `--ignore-resources` — switch the consumable model off. The environment's resource
136
146
  declarations are still checked for shape but none is applied, so a bench whose devices
137
147
  declare stocks nobody is tracking runs without the boundary saying what they held.
@@ -57,6 +57,15 @@ and writes its artifacts under [`outputs/`](outputs/):
57
57
  python examples/render_plate_line.py
58
58
  ```
59
59
 
60
+ 🔴 **These are a record of one run, not a reproducible golden.** The labcode backend
61
+ runs its operations out of process against a **wall clock** (`seconds_per_tick`), so
62
+ which tick a subprocess finishes on varies between runs: re-rendering the same commit
63
+ gives a final `now` of 10 one time and 13 the next. Do not treat a difference here as a
64
+ regression, and do not gate a change on these files being byte-identical — the way the
65
+ scheduler's and the runner's own artifacts can be, both of those being driven by a
66
+ virtual clock. What *is* stable is the plan the scheduler produces from a given input,
67
+ which the tests cover.
68
+
60
69
  - [`outputs/plate_line.plan.yaml`](outputs/plate_line.plan.yaml) — the **final execution
61
70
  schedule** (the §6/§7 status document: every activity, `completed`).
62
71
  - [`outputs/plate_line.observation.yaml`](outputs/plate_line.observation.yaml) — the
@@ -65,6 +65,13 @@ def _build_parser() -> argparse.ArgumentParser:
65
65
  "--margin", type=int, default=None, metavar="M",
66
66
  help="running-task margin for replans (default: the poll interval)",
67
67
  )
68
+ p.add_argument(
69
+ "--max-transport-legs", type=int, default=1, metavar="N",
70
+ help="how many transport activities one Object-bearing arc may be carried in "
71
+ "(default 1: the single hop), joined by relays -- raise it for an "
72
+ "instrument the transporter reaches at one position only, or a plate "
73
+ "that has to cross a hand-off station",
74
+ )
68
75
  p.add_argument(
69
76
  "--poll-interval", type=int, default=1, metavar="D",
70
77
  help="poll every D time units (default 1)",
@@ -329,6 +336,11 @@ def main(argv: Sequence[str] | None = None) -> int:
329
336
  running_task_margin=args.margin,
330
337
  random_seed=args.seed,
331
338
  poll_interval=args.poll_interval,
339
+ # How many moves one arc may be carried in (schedule SPEC §6.4.1). Passed
340
+ # through rather than decided here: it is the scheduler's offer, and a real
341
+ # laboratory is exactly where an instrument reachable from one position
342
+ # only makes the single hop insufficient.
343
+ max_transport_legs=args.max_transport_legs,
332
344
  # 0 is "no limit" here as it is upstream; the runner spells that None.
333
345
  max_ticks=args.max_ticks or None,
334
346
  seconds_per_tick=args.seconds_per_tick,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: labcode
3
- Version: 0.3.1
3
+ Version: 0.4.0
4
4
  Summary: labcode -- a dialect wrapper over the Object-Flow Programming Language toolchain
5
5
  Author-email: Kazunari Kaizu <kwaizu@gmail.com>
6
6
  License-Expression: MIT
@@ -21,8 +21,8 @@ Requires-Python: >=3.10
21
21
  Description-Content-Type: text/markdown
22
22
  License-File: LICENSE
23
23
  Requires-Dist: ofplang-validate<0.3,>=0.2
24
- Requires-Dist: ofplang-schedule<0.6,>=0.5
25
- Requires-Dist: ofplang-run<0.7,>=0.6
24
+ Requires-Dist: ofplang-schedule<0.9,>=0.8
25
+ Requires-Dist: ofplang-run<0.8,>=0.7
26
26
  Provides-Extra: test
27
27
  Requires-Dist: pytest>=7.0; extra == "test"
28
28
  Requires-Dist: opentelemetry-sdk>=1.20; extra == "test"
@@ -143,7 +143,8 @@ described below.
143
143
  lc run <workflow> --env <env>
144
144
  [--boundary DOC] [-o OUT] [--boundary-out FILE] [--observation-out FILE]
145
145
  [--seconds-per-tick S] [--op-timeout S | --no-op-timeout] [--no-probe]
146
- [--ignore-resources] [--trace] [--mission-id ID] [--object-ids seeded|real]
146
+ [--max-transport-legs N] [--ignore-resources] [--trace] [--mission-id ID]
147
+ [--object-ids seeded|real]
147
148
  ```
148
149
 
149
150
  - `<workflow>` — the portable v0 workflow: *what* happens.
@@ -176,6 +177,15 @@ lc run <workflow> --env <env>
176
177
  else 7200 real seconds. The two forms exclude each other.
177
178
  - `--no-probe` — ignore the environment's `x-labcode.probe` policies and treat every
178
179
  machine as reachable (§1.6). The documents are still validated.
180
+ - `--max-transport-legs N` — how many transport activities one Object-bearing arc may
181
+ be carried in (schedule spec §6.4.1), joined by **relay** activities. It is 1 by
182
+ default: the single hop. Raise it where the transporter cannot reach an instrument
183
+ from where the plate is — a bench it serves from one position only, or a hand-off
184
+ station a plate has to cross — and the move is planned as the shortest chain between
185
+ the two spots instead of being reported unreachable. Only the fewest possible moves
186
+ are offered, so a plate one move away is never sent round by way of somewhere else.
187
+ This describes the laboratory's reach rather than tuning the loop, which is why it is
188
+ here and not among the replan knobs below.
179
189
  - `--ignore-resources` — switch the consumable model off. The environment's resource
180
190
  declarations are still checked for shape but none is applied, so a bench whose devices
181
191
  declare stocks nobody is tracking runs without the boundary saying what they held.
@@ -1,6 +1,6 @@
1
1
  ofplang-validate<0.3,>=0.2
2
- ofplang-schedule<0.6,>=0.5
3
- ofplang-run<0.7,>=0.6
2
+ ofplang-schedule<0.9,>=0.8
3
+ ofplang-run<0.8,>=0.7
4
4
 
5
5
  [dev]
6
6
  pytest>=7.0
@@ -0,0 +1,8 @@
1
+ {
2
+ "tag": "0.4.0",
3
+ "distance": 0,
4
+ "node": "ge84abdb92eead9230494348c19d0e418605aaecb",
5
+ "dirty": false,
6
+ "branch": "HEAD",
7
+ "node_date": "2026-09-11"
8
+ }
@@ -41,7 +41,10 @@ classifiers = [
41
41
  # `dispatch_replenishment` seam and the `kind: replenishment` the child harness has to
42
42
  # recognise as side-effect only.
43
43
  #
44
- # `ofplang-schedule>=0.5` is required, not merely tested against: an environment may
44
+ # `ofplang-schedule>=0.8` is required, not merely tested against: `lc run` passes
45
+ # `--max-transport-legs` through to it (schedule SPEC §6.4.1), and a job may leave a
46
+ # running plan (§6.11), which needs the `withdraw` argument and the levels carried
47
+ # forward with it. The `>=0.5` floor it replaces was required because an environment may
45
48
  # declare a route that needs no transporter (`transporter: null`, schedule §4.6/§5.4) and
46
49
  # this dialect accepts a `sila2` script on one, but an older scheduler refuses the
47
50
  # environment with `wrong_type` before there is a plan to run -- and `ofplang-run>=0.6` is
@@ -61,8 +64,8 @@ dependencies = [
61
64
  # bounds cannot protect what is already on PyPI without one, which is why they go
62
65
  # in now rather than at the first breakage.
63
66
  "ofplang-validate>=0.2,<0.3",
64
- "ofplang-schedule>=0.5,<0.6",
65
- "ofplang-run>=0.6,<0.7",
67
+ "ofplang-schedule>=0.8,<0.9",
68
+ "ofplang-run>=0.7,<0.8",
66
69
  ]
67
70
 
68
71
  [project.urls]
@@ -1,8 +0,0 @@
1
- {
2
- "tag": "0.3.1",
3
- "distance": 0,
4
- "node": "g8ed9be19f0560168d506f98a6e9f54b3e7085aa0",
5
- "dirty": false,
6
- "branch": "HEAD",
7
- "node_date": "2026-09-06"
8
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes