4 ms·
You write the file and ALL steps are run in topological order so that a job never runs until its dependencies have run. i.e., in a tool I'll have `build.frof` a
by j6m8 2y ago
You write the file and ALL steps are run in topological order so that a job never runs until its dependencies have run. i.e., in a tool I'll have `build.frof` as a separate frof file than `download-dependencies.frof`, perhaps. (If your preference is that those belong in the same file I'd be down to have PRs that support that! Should be very easy, I'm happy to try implementing this if there's interest.)
So for a file with those contents called `mygraph.frof`, you can (after installing) run `frof mygraph.frof` to kick off the jobs in the current shell (inheriting env vars etc).
[edit] maybe a clarifying example here:
https://blog.jordan.matelsky.com/frof-render/ https://blog.jordan.matelsky.com/frof-render/
- pdimitar 2y agoOK, so for the example in your comment upthread both `write` and `build` will be executed sequentially?
- j6m8 2y agohere they'll probably be executed simultaneously, since they both have zero dependencies and the machine can run multiple jobs at the same time. (can be disabled with `--max_jobs=1` or `-p=1`). Here's another illustrative example: A -> B B -> C Z -> C In this situation, frof will schedule `Z` to run in a parallel thread ASAP, so it will likely run alongside A... and if Z takes longer to run than A, Z will continue running when A stops and B starts. But C will wait for all other jobs to finish before it can schedule.
- pdimitar 2y agoNice, thanks a lot. Unfortunately I am quite swamped recently so I will definitely cannot help you with feature requests and testing but I have bookmarked frof and absolutely will be giving it a try. Just one thing I would dislike... Python. How easy it is to run frof without having to fiddle with venvs and such?
- j6m8 2y agono worries, good to know this would be a useful feature! I'll add it to my backlog. pip install 'git+https://github.com/j6k4m8/frof/' and then frof myfile.frof should work! Was thinking about rewriting it in Go recently... :)
- pdimitar 2y agoI'll try the vanilla Python route but knowing our mutual hatred, it'll crap the bed in 0.5s. :D We'll see. > Was thinking about rewriting it in Go recently... :) And then I might actually contribute. :)
- burnished 2y agoI've found prototyping in python followed by a rewrite in Go quite pleasant, would recommend