Skip to main content

No project description provided

Project description

Build Status

A functional composition framework that supports:

  1. State - functions which retain state for their next turn of action.
  2. Prioritized paths - lazily attempt overloaded composition paths according to priorities.
  3. Deep dependency injection - compose a function to a variadic function at the end of an arbitrarily long pipeline.
  4. Non cancerous asyncio support.

pip install computation-graph

To deploy: python setup.py sdist bdist_wheel; twine upload dist/*; rm -rf dist/;

Type checking

The runner will type check all outputs for nodes with return type annotations. In case of a wrong typing, it will log the node at fault.

Debugging

Computation trace

Available computation trace visualizers:

  1. graphviz.computation_trace
  2. mermaid.computation_trace
  3. ascii.computation_trace

To use, replace to_callable with run.to_callable_with_side_effect with your selected style as the first argument.

Graphviz debugger

This debugger will save a file on each graph execution to current working directory.

You can use this file in a graph viewer like gephi. Nodes colored red are part of the 'winning' computation path. Each of these nodes has the attributes 'result' and 'state'. 'result' is the output of the node, and 'state' is the new state of the node.

In gephi you can filter for the nodes participating in calculation of final result by filtering on result != null.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

computation-graph-30.tar.gz (21.3 kB view details)

Uploaded Source

File details

Details for the file computation-graph-30.tar.gz.

File metadata

  • Download URL: computation-graph-30.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for computation-graph-30.tar.gz
Algorithm Hash digest
SHA256 2021a3e49b4efbf711a2f821e9b59132b0049edd728adf48c6060d6d150bc2e4
MD5 23036990186b8e84703ef6cd5b516c33
BLAKE2b-256 a2a0b0633e7cb2eaa1ec7b595e0db3114f7eae8e8857d0a92dd28a90c76534da

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page