Parsing python operators
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3
- Forks
- 0
- Avg merge
- 1h 19m
- Merged PRs (30d)
- 5
Description
As a corollary to #269 and with recipes necessary to resolve #258, it should be pretty straightforward to inject operator recipes into the graph when parsing a @workflow and ast finds an operation. I.e., we should be able to parse something like
import flowrep as fr
@fr.workflow
def wf(a, b):
if a < b:
x = "less"
else:
x = "more"
return x
When building the condition node for the if flow controller, it the ast parser should figure out to add a standard less-than recipe with edges for a, b-->less-than inputs.
The reverse, where we transform these operator nodes back into in-lined operators when recompiling the python might not be as easy. Still, I currently believe these difficulties to be of a book-keeping nature, and not fundamental obstacles.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the AST parser used by @workflow and review the operator recipes and graph-building work described in #269 and needed for #258. Trace the example's if condition and determine how a less-than recipe should receive edges from a and b; done means operators are represented in the graph while parsing, with the reverse Python transformation considered separately.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100