Simple local workflow runs
Project description
feedforward
This library makes it easy to run a linear DAG while extracting magical parallelism if some steps don't make changes to some values.
Comparison to dataflow
Sure, this is a dataflow-esque library that allows you to do transforms on
items in one direction towards a goal. Where it differs from other dataflow
models is that there is only map and the items can never never change type
(for a given key).
Additionally all steps and inputs need to be known up front, but that isn't a restriction of the core algorithm, just in the name of readability.
In exchange for those restrictions, you get a lot of API simplicity, as well as the ability to run future steps eagerly given sufficient slots and automatic bundling into "batches" of items like xargs does to amortize child set-up times.
Restrictions
- The steps need to be decided up front (although it's cheap to have steps that maybe don't do anything). This includes the order that they will apply in.
- Steps ought to be deterministic and idempotent within a run (if they aren't,
you should mark individual steps
eager=Falseor enabledeliberate=Trueon theRun, which only uses intra-step parallelism). - Steps ought to have static relationships between the inputs and output keys
such as
%.pyinput changes potentially affecting%.javaoutputs, using the wildcard%you might know from Make. If you don't (say, files can include other arbitrary files), then you might need to model this as any input change invalidating all output keys which will tend to be inefficient. - Steps ought to not change the type of a key's value (although they can create
new keys, or delete existing keys, so you can work around this by including
the type in the key and still get correctness). If you wanted to support
str<=>inttransformations on the same key, this will only work if all subsequent steps work with either. - Your input values, as well as all intermediate output values, need to fit in memory. Nothing keeps you from using filenames, urls, or CAS keys as the value though.
Version Compat
Usage of this library should work back to 3.8, but development (and mypy compatibility) only on 3.10-3.12. Linting requires 3.12 for full fidelity.
Versioning
This library follows meanver which basically means semver along with a promise to rename when the major version changes.
License
feedforward is copyright Tim Hatch, and licensed under
the MIT license. See the LICENSE file for details.
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 feedforward-0.8.0b3.tar.gz.
File metadata
- Download URL: feedforward-0.8.0b3.tar.gz
- Upload date:
- Size: 133.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f30dac6a0bf4a09e39afe0bd0459a9e0847a2afe8a385596e22c2d851fe8389
|
|
| MD5 |
fbdfd727d0d1ae08c5d082d835cbe160
|
|
| BLAKE2b-256 |
e7d9275ed7edf138dc4abf20ed34d9dfd11c6ff7c2e011cb84e040ea6ccf984b
|
Provenance
The following attestation bundles were made for feedforward-0.8.0b3.tar.gz:
Publisher:
build.yml on advice-animal/feedforward
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
feedforward-0.8.0b3.tar.gz -
Subject digest:
3f30dac6a0bf4a09e39afe0bd0459a9e0847a2afe8a385596e22c2d851fe8389 - Sigstore transparency entry: 357904916
- Sigstore integration time:
-
Permalink:
advice-animal/feedforward@8b10dbfb94f403478b1db3be0c6ff03dd32161ce -
Branch / Tag:
refs/tags/v0.8.0b3 - Owner: https://github.com/advice-animal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@8b10dbfb94f403478b1db3be0c6ff03dd32161ce -
Trigger Event:
push
-
Statement type:
File details
Details for the file feedforward-0.8.0b3-py3-none-any.whl.
File metadata
- Download URL: feedforward-0.8.0b3-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a699960f25673b5b1e9622e0a18bc146737feed7533c5a77c8668132df93414d
|
|
| MD5 |
b1deff270dd851949e157a024f29c488
|
|
| BLAKE2b-256 |
48a8471837ed77faaacd08c1d882b000d292af6747efc0bc15280d315e0d1fbc
|
Provenance
The following attestation bundles were made for feedforward-0.8.0b3-py3-none-any.whl:
Publisher:
build.yml on advice-animal/feedforward
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
feedforward-0.8.0b3-py3-none-any.whl -
Subject digest:
a699960f25673b5b1e9622e0a18bc146737feed7533c5a77c8668132df93414d - Sigstore transparency entry: 357904945
- Sigstore integration time:
-
Permalink:
advice-animal/feedforward@8b10dbfb94f403478b1db3be0c6ff03dd32161ce -
Branch / Tag:
refs/tags/v0.8.0b3 - Owner: https://github.com/advice-animal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@8b10dbfb94f403478b1db3be0c6ff03dd32161ce -
Trigger Event:
push
-
Statement type: