Object-flow programming language v0 scheduler
Project description
ofplang schedule
A scheduler for Object-flow Programming Language v0 — a YAML-based dataflow workflow IR with linear Object tracking. The language is defined in the ofplang/spec repository.
The scheduler takes a portable v0 workflow plus an execution environment definition and plans when its work runs; it also replans from an execution status. The design is documented in docs/SPECIFICATIONS.md.
Status: the schema validators (environment definition and execution document, spec §9) and the scheduler are implemented: it produces a makespan-optimal plan for a single workflow with mode selection, spot/device occupancy, and transport, pins a workflow's boundary material to spots via an
interface(spec §6.8), and replans from an execution document (--document) by fixing completed/running activities and re-optimising the rest at or afternow(device-local resources not yet). Avisualizecommand renders a plan as a self-contained SVG/HTML Gantt chart. The model is documented in docs/FORMULATION.md.
This is a fresh implementation that targets the spec directly. The prototype
ofp-scheduler (OR-Tools CP-SAT) is a reference
for ideas but not a dependency.
Install
pip install ofplang-schedule
Requires Python 3.10+. Runtime dependencies are PyYAML, OR-Tools (the CP-SAT
solver used by the scheduler), and the sibling
ofplang-validate (pulled in
automatically), which the CLI's front-door check uses. The scheduler library
never imports validate, so embedders that only call ofplang.schedule take no
validation overhead.
For development, install editable with the test extra from a clone:
pip install -e ".[test]"
Command line
ofp-schedule validate <file>... # validate an environment or a plan/status
ofp-schedule schedule <workflow> --env <env> [--document doc.yaml] [--running-margin N] [--seed N] [-o plan.yaml] [--format yaml|json]
ofp-schedule visualize <plan> [--view device|workflow|lane] [--theme light|dark|auto] [-o out.svg]
validate auto-detects whether the file is an environment definition or an
execution document (pass --kind to force it); diagnostics are reported as
file:line:col: <severity> <code>. schedule produces an execution plan (§6)
that minimises makespan. A --document (execution document, §6) supplies the
interface boundary constraint (§6.8, where a workflow's entry inputs / final
outputs sit) and, when it sets now, the prior status to replan from (§7) —
emitting the full timeline (fixed history + re-optimised future) that round-trips
as the next status input. By default the solve is non-deterministic
(a multi-worker search that may return a different equally-optimal schedule each
run); --seed N makes it reproducible by fixing the CP-SAT seed and using a
single worker. visualize renders a plan as a self-contained Gantt
chart — SVG by default (fixed colours, transparent background, PowerPoint-safe)
or HTML. Exit codes: 0 success, 1 validation errors or no feasible schedule,
2 usage/input error.
This tool is also intended to be exposed as the schedule subcommand of the
umbrella ofp CLI (a separate repository in the ofplang organization).
The package lives under the ofplang PEP 420 namespace (ofplang.schedule),
shared across the organization's tools.
Tests
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ofplang_schedule-0.1.0.tar.gz.
File metadata
- Download URL: ofplang_schedule-0.1.0.tar.gz
- Upload date:
- Size: 162.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6b4bc10896fcea92db5e7084eb76a5356585c9a7b46465f45ff8318439d1fa7
|
|
| MD5 |
78abe89c94e0cd5a7c4871023a92af18
|
|
| BLAKE2b-256 |
7f394325ed8f0d4ccdddcbcc22957cad7968d19feed5895fbe9ba04470ba6880
|
Provenance
The following attestation bundles were made for ofplang_schedule-0.1.0.tar.gz:
Publisher:
publish.yml on ofplang/schedule
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ofplang_schedule-0.1.0.tar.gz -
Subject digest:
c6b4bc10896fcea92db5e7084eb76a5356585c9a7b46465f45ff8318439d1fa7 - Sigstore transparency entry: 2255671485
- Sigstore integration time:
-
Permalink:
ofplang/schedule@10cc69b9074c81a5f83ca2dd558415ac1691db74 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ofplang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@10cc69b9074c81a5f83ca2dd558415ac1691db74 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ofplang_schedule-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ofplang_schedule-0.1.0-py3-none-any.whl
- Upload date:
- Size: 72.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f007a7d12c8ee3767138f84e03eb830720465a4377c20ec3f1e68403ed16878
|
|
| MD5 |
3ed05b5a906555813d3dbf4c1622f312
|
|
| BLAKE2b-256 |
f24d645d22613ff0754242f33bac555abbdfbf7df3aa19a03e5e201e4713bbee
|
Provenance
The following attestation bundles were made for ofplang_schedule-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on ofplang/schedule
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ofplang_schedule-0.1.0-py3-none-any.whl -
Subject digest:
7f007a7d12c8ee3767138f84e03eb830720465a4377c20ec3f1e68403ed16878 - Sigstore transparency entry: 2255671490
- Sigstore integration time:
-
Permalink:
ofplang/schedule@10cc69b9074c81a5f83ca2dd558415ac1691db74 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ofplang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@10cc69b9074c81a5f83ca2dd558415ac1691db74 -
Trigger Event:
push
-
Statement type: