Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DMN/FEEL in Python
#5
(Jan-14-2020, 12:49 PM)russellmcdonell Wrote: If there's enough interest I'll try and turn them into pip installable modules and some documentation.

Nice work! I recently conducted a poll about adding DMN support to a number of popular languages and editors.

In my informal poll, Python topped the list: https://twitter.com/mengwong/status/1264118536064004096

To date, DMN implementations have involved a GUI saving to XML (either DMN or XLSX).

My twist: I'd like to propose DMN as Markdown tables, inline.

So the Python interface would be something like this:

var whatdish = dmnmd("""
| U | Season               | Guest Count | Dish (out)                   | # Annotation  |
|---|----------------------|-------------|------------------------------|---------------|
| 1 | Fall                 | <= 8        | Spareribs                    |               |
| 2 | Winter               | <= 8        | Roastbeef                    |               |
| 3 | Spring               | <= 4        | Dry Aged Gourmet Steak       |               |
| 4 | Spring               | [5..8]      | Steak                        |               |
| 5 | Fall, Winter, Spring | > 8         | Stew                         |               |
| 6 | Summer               | -           | Light Salad and a nice Steak | Hey, why not? |
""");
And then whatdish("Fall",4) returns "Spareribs"

Reinventing the wheel slightly, I spent the weekend writing a markdown table parser and FEEL evaluator in Haskell, so I know it can be done … as you've shown with your XLS parser and S/FEEL evaluator.

If this takes off we can imagine extending various IDEs' python modes to do markdown table editing as a submode sort of thing.

Thoughts?
Reply


Messages In This Thread
DMN/FEEL in Python - by CoolGuy - Mar-06-2019, 03:34 AM
RE: DMN/FEEL in Python - by Larz60+ - Mar-06-2019, 03:53 AM
RE: DMN/FEEL in Python - by CoolGuy - Mar-06-2019, 02:57 PM
RE: DMN/FEEL in Python - by russellmcdonell - Jan-14-2020, 12:49 PM
RE: DMN/FEEL in Python - by mengwong - Jun-01-2020, 10:57 AM
RE: DMN/FEEL in Python - by russellmcdonell - May-12-2021, 11:20 PM
RE: DMN/FEEL in Python - by russf - Jun-11-2020, 08:22 PM
RE: DMN/FEEL in Python - by russellmcdonell - Jul-06-2020, 11:20 PM
RE: DMN/FEEL in Python - by russellmcdonell - Aug-03-2022, 02:33 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020