Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python syntax specification of caesar rules #275

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

hughdickinson
Copy link
Collaborator

Adds the ability to specify workflow rules using a Python format. For example the following Python-like expression:

"(subject['#hidden_val'] == 0) and [some_reducer['counts'], 0] < 10"

will be translated into:

['and',
 ['eq', ['lookup', 'subject.#hidden_val'], ['const', 0]],
 ['lt', ['lookup', 'some_reducer.counts', ['const', 0]], ['const', 10]]]

Expressions are legal Python except for the list-like syntax used to express lookups with default values.

Reducer names are checked against the list of reducers specified for the workflow, but the reducer attributes are not validated. Possible extensions would be specifying a shema for each type of reducer.

@hughdickinson hughdickinson marked this pull request as ready for review May 23, 2022 10:58
@hughdickinson
Copy link
Collaborator Author

Just wondering whether there is a blocking issue with this PR that needs me to fix it or it's just been on the back burner.

@hughdickinson
Copy link
Collaborator Author

Same query as the one I made in January. If changes are needed, let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant