Code Monkey home page Code Monkey logo

typedflow's Introduction

A type-aware workflow engine working on Python

About

This is a simple and type-familiar workflow engine that works as a Python package.

typedflow's People

Contributors

tarohi24 avatar

Watchers

James Cloos avatar

Forkers

askmetoo

typedflow's Issues

Actions Test fails

Run make test
pytest typedflow/tests -s
============================= test session starts ==============================
platform linux -- Python 3.7.5, pytest-5.2.2, py-1.8.0, pluggy-0.13.0
rootdir: /home/runner/work/typedflow/typedflow, inifile: setup.cfg
collected 5 items / 2 errors / 3 selected

==================================== ERRORS ====================================
_____________ ERROR collecting typedflow/tests/tasks/test_dump.py ______________
import file mismatch:
imported module 'typedflow.tests.tasks.test_dump' has this __file__ attribute:
  /opt/hostedtoolcache/Python/3.7.5/x64/lib/python3.7/site-packages/typedflow/tests/tasks/test_dump.py
which is not the same as the test file we want to collect:
  /home/runner/work/typedflow/typedflow/typedflow/tests/tasks/test_dump.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
____________ ERROR collecting typedflow/tests/tasks/test_loader.py _____________
import file mismatch:
imported module 'typedflow.tests.tasks.test_loader' has this __file__ attribute:
  /opt/hostedtoolcache/Python/3.7.5/x64/lib/python3.7/site-packages/typedflow/tests/tasks/test_loader.py
which is not the same as the test file we want to collect:
  /home/runner/work/typedflow/typedflow/typedflow/tests/tasks/test_loader.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!
=============================== 2 error in 0.23s ===============================
Makefile:57: recipe for target 'test' failed
make: *** [test] Error 2
##[error]Process completed with exit code 2.

Support type inheritance

In the following codes, passing return values of A to B should be OK. However, flow.typecheck() fails.

def A() -> Generator[int, None, None]:
    pass

def B(a: Iterable[int]) -> None:
    pass

New syntax proposal: merge declarations of funcs and its inputs

The conventional way is like this:

node_a = TaskNode(a)
node_b = TaskNode(b)
node_c = TaskNode(c)
(node_c < node_b)('key')
(node_c < node_a)('value')

We can shorten the style like this:

node_a = TaskNode(a)
node_b = TaskNode(b)
node_c = TaskNode(c)({'a': node_a, 'b': node_b})

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.