You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-7Lines changed: 5 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
6
6
# Rune Python Generator
7
7
8
-
The Rune Python Generator creates Python code from [Rune](https://github.com/finos/rune-dsl). It fully supports the Rune type syntax and has comprehensive [expression coverage](./EXPRESSION_SUPPORT.md), though function generation is not yet fully implemented.
8
+
The Rune Python Generator creates Python code from [Rune](https://github.com/finos/rune-dsl). It fully supports the Rune type syntax and has comprehensive [expression coverage](./docs/EXPRESSION_SUPPORT.md), though function generation is not yet fully implemented.
9
9
10
10
The generated code requires the [RunePythonRuntime](https://github.com/finos/rune-python-runtime) library and Python 3.11+.
11
11
@@ -28,21 +28,19 @@ The Renovate bot automatically handles DSL updates by creating a pull request. M
28
28
## Repository Organization
29
29
30
30
-`README.md` - this file, for documentation purposes
31
-
-`BUILDANDTEST.md` - instructions on building and testing the repo
32
31
-`RELEASE.md` - information about the current release
33
32
-`src/main` - Java/Xtend code to generate Python from Rune
34
33
-`src/test` - Java/Xtend code to run JUnit tests on the code generation process
35
-
-`build` - configuration scripts to setup and tear down the Python unit testing environment
36
-
-`build/build_cdm.sh` - used to create a Python package using CDM Rune definitions
37
-
-`test` - Python unit tests and scripts to run the tests
34
+
-`docs/BUILD_AND_TEST.md` - instructions on building and testing the repo
35
+
-`test` - Python unit tests of the generated code
38
36
39
37
## Development setup
40
38
41
39
### For developers
42
40
43
41
This guide is meant for everyone who wants to contribute to the Rune Python Generator and needs to get things up and running.
44
42
45
-
Detailed build and testing instructions can be found in [BUILDANDTEST.md](./BUILDANDTEST.md)
43
+
Detailed build and testing instructions can be found in [docs/BUILD_AND_TEST.md](./docs/BUILD_AND_TEST.md)
46
44
47
45
Troubleshooting: If you run into issues, please open an [issue](https://github.com/finos/rune-python-generator/issues). This helps us improve the guide for everyone.
48
46
@@ -61,7 +59,7 @@ To build the project, run `mvn clean package`.
61
59
62
60
#### UNIT Testing
63
61
64
-
Building the project using Maven will run JUNIT-based unit tests. All tests should pass. To run the Python unit tests follow the instructions in [BUILDANDTEST.md](./BUILDANDTEST.md)
62
+
Building the project using Maven will run JUNIT-based unit tests. All tests should pass. To run the Python unit tests follow the instructions in [docs/BUILD_AND_TEST.md](./docs/BUILD_AND_TEST.md)
Copy file name to clipboardExpand all lines: docs/EXPRESSION_SUPPORT.md
+22-1Lines changed: 22 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,4 +65,25 @@
65
65
| RosettaNumberLiteral | ✓ | Decimal numeric literal value |[RosettaExpression.xcore#L73](https://github.com/finos/rune-dsl/blob/38dd20e8f3f8145588de7a9586972c84caa23951/rosetta-lang/model/RosettaExpression.xcore#L73)|
66
66
| RosettaOnlyElement | ✓ | Unary list operation asserting the only element |[RosettaExpression.xcore#L300](https://github.com/finos/rune-dsl/blob/38dd20e8f3f8145588de7a9586972c84caa23951/rosetta-lang/model/RosettaExpression.xcore#L300)|
67
67
| RosettaOnlyExistsExpression | ✓ | Checks that only the listed expressions exist |[RosettaExpression.xcore#L247](https://github.com/finos/rune-dsl/blob/38dd20e8f3f8145588de7a9586972c84caa23951/rosetta-lang/model/RosettaExpression.xcore#L247)|
68
-
| RosettaReference | ✓ | Abstract base for reference expressions |[RosettaExpression.xcore#L123](https://github.com/finos/rune-dsl/blob/38dd20e8f3f8145588de7a9586972c84caa23951/rosetta-lang/model/RosettaExpression.xcore#L123)|
68
+
| RosettaReference | ✓ | Abstract base for reference expressions |[RosettaExpression.xcore#L123](https://github.com/finos/rune-dsl/blob/38dd20e8f3f8145588de7a9586972c84caa23951/rosetta-lang/model/RosettaExpression.xcore#L123)|
69
+
70
+
## Proposed Changes to ExpressionGeneration
71
+
72
+
The following changes are proposed to enhance the `ExpressionGeneration` functionality and address identified gaps:
73
+
74
+
1.**Direct Function Calling Support**: Implement support for `RosettaCallableWithArgs` to allow direct execution of other Rosetta functions within an expression.
75
+
2.**Date/Time & Math Standards**: Create explicit tests and potentially refine implementation for `ToDate`, `ToDateTime`, `Min`, `Max`, `Sort`, and `Reverse` operations to ensure full compatibility with Python's standard library.
76
+
3.**List Operations**: Add comprehensive tests for `JoinOperation` and `ReverseOperation`.
77
+
4.**Refined Existence Logic**: Investigate and correctly implement/test the `single exists` and `multiple exists` operators if present in the Rosetta DSL, ensuring they map correctly to Python logic (possibly extending `rune_attr_exists` or `rune_count`).
78
+
5.**Clean up `RosettaExistsExpressionTest`**: Enable the disabled tests, add assertions, and migrate relevant test cases to the main test suite if they represent core functionality.
79
+
80
+
## Evaluation of Current Testing
81
+
82
+
### PythonExpressionGeneratorTest
83
+
-**Coverage**: Strong coverage for arithmetic, boolean logic, basic list operations (`count`, `flatten`), `if-then-else`, and `switch`.
84
+
-**Gaps**: Missing specific tests for `To*` conversions (Date/Time), `Min/Max/Sort`, and nested function calls.
85
+
86
+
### RosettaExistsExpressionTest
87
+
-**Status**: Currently disabled (`@Disabled`) and non-functional (no assertions).
88
+
-**Analysis**: Contains valuable DSL examples for complex `exists` logic (`only exists`, `single exists`, `multiple exists` combined with `or`/`and`).
89
+
-**Plan**: Migrate valid DSL cases to `PythonExpressionGeneratorTest`. Specifically, the complex boolean logic combinations should be asserted against expected Python output to verify that `rune_attr_exists` interacts correctly with Python's `and`/`or` operators. The `single/multiple` exists concepts need to be verified against the `PythonExpressionGenerator` implementation (or lack thereof) to decide if they are supported features or need implementation.
0 commit comments