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: CONTRIBUTING.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ Before making a contribution, please take the following steps:
8
8
1. Check whether there's already an open issue related to your proposed contribution. If there is, join the discussion and propose your contribution there.
9
9
2. If there isn't already a relevant issue, create one, describing your contribution and the problem you're trying to solve.
10
10
3. Respond to any questions or suggestions raised in the issue by other developers.
11
-
4. Fork the project repository and prepare your proposed contribution.
11
+
4. Fork the project repository and prepare your proposed contribution. The contribution must include unit tests to confirm that it behaves as expected.
12
12
5. Submit a pull request.
13
13
14
14
NOTE: All contributors must have a contributor license agreement (CLA) on file with FINOS before their pull requests will be merged. Please review the FINOS [contribution requirements](https://community.finos.org/docs/governance/Software-Projects/contribution-compliance-requirements) and submit (or have your employer submit) the required CLA before submitting a pull request.
The generated Python relies upon the [RunePythonRuntime](https://github.com/finos/rune-python-runtime) library and requires Python version 3.11+.
11
10
12
11
## Release Notes
12
+
13
13
The features of the current version can be found in the [release notes](./RELEASE.md)
14
14
15
15
## Repository Organization
@@ -26,41 +26,59 @@ The features of the current version can be found in the [release notes](./RELEAS
26
26
## Development setup
27
27
28
28
### Setup for developers
29
+
29
30
This guide is meant for everyone who wants to contribute to the Rune Python Generator and needs to get things up and running.
30
31
31
32
Detailed build and testing instructions can be found in [BUILDANDTEST.md](./BUILDANDTEST.md)
32
33
33
34
If this guide does not work for you, be sure to raise an issue. This way we can help you figure out what the problem is and update this guide to prevent the same problem for future users.
34
35
35
36
### 1. Building with Maven
37
+
36
38
Start by cloning the project: `git clone https://github.com/finos/rune-python-generator`
37
39
38
40
Our project runs with Java 21. Make sure that your Maven also uses this version of Java by running `mvn -v`.
39
41
40
-
To build the project, run `mvn clean install`.
42
+
To build the project, run `mvn clean package`.
41
43
42
44
#### UNIT Testing
45
+
43
46
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)
44
47
45
48
### 2. Setting things up in Eclipse
49
+
46
50
#### Install Eclipse IDE for Java and DSL Developers
51
+
47
52
Install version `2025-06` of the "Eclipse IDE for Java and DSL Developers" using the [Eclipse Installer](https://www.eclipse.org/downloads/packages/installer). You might have to enable "Advanced Mode" in the settings of the Eclipse Installer to install a specific version.
48
53
49
54
#### Configure Eclipse with the right version of Java
55
+
50
56
Xtend files cannot be built with any Java version later than 21. In Eclipse, go to Settings... > Java > Installed JREs and make sure the checked JRE points to a Java version of 21.
51
57
52
58
#### Install the Checkstyle plugin
59
+
53
60
We use [Checkstyle](https://checkstyle.sourceforge.io/) for enforcing good coding practices. The Eclipse plugin for Checkstyle can be found here: [https://checkstyle.org/eclipse-cs/#!/](https://checkstyle.org/eclipse-cs/#!/).
54
61
55
62
#### Open the project in Eclipse
63
+
56
64
Go to Import... > Existing Maven Project, select the right folder, click Finish.
57
65
66
+
### Standalone CLI
67
+
68
+
The generator includes a standalone CLI which can be invoked to generate Python from a single file or from directory. To invoke the CLI, first build the project and then:
Use this script to generated the Python version of CDM
77
+
61
78
```sh
62
-
build/build_cdm.sh
79
+
test/cdm_tests/cdm_setup/build_cdm.sh
63
80
```
81
+
64
82
The script will use the CDM from the branch specified in the file (E.G. master) of the [FINOS Repo](https://github.com/finos/common-domain-model) and generate a wheel in the project directory `target/python-cdm`
65
83
66
84
To use a different version of CDM, update CDM_VERSION in the script.
@@ -69,21 +87,33 @@ To use a different version of CDM, update CDM_VERSION in the script.
69
87
70
88
The Roadmap will be aligned to the [Rune-DSL](https://github.com/finos/rune-dsl/) and [CDM](https://github.com/finos/common-domain-model/blob/master/ROADMAP.md) roadmaps.
71
89
90
+
### Rune-DSL Updates
91
+
92
+
Renovate will generate a PR when the version of the DSL has been updated at com.regnosys.rosetta:com.regnosys.rosetta. The PR will clarify whether the change succsessfully builds and passes JUNIT and Python unit testing.
93
+
94
+
Any maintainer can merge changes that successfully build and pass the tests. To make the revised generator available to CDM, post merge a new release tagged with the version # of the updated DSL will be required.
95
+
96
+
Build or testing failures should be escalated to [@plamen-neykov](https://github.com/plamen-neykov) or [@dschwartznyc](https://github.com/dschwartznyc) for remediation.
97
+
72
98
## Contributing
99
+
73
100
For any questions, bugs or feature requests please open an [issue](https://github.com/finos/rune-python-generator/issues)
74
101
For anything else please send an email to {project mailing list}.
75
102
76
103
To submit a contribution:
104
+
77
105
1. Fork it (<https://github.com/finos/rune-python-generator/fork>)
78
106
2. Create your feature branch (`git checkout -b feature/fooBar`)
79
107
3. Read our [contribution guidelines](.github/CONTRIBUTING.md) and [Community Code of Conduct](https://www.finos.org/code-of-conduct)
80
108
4. Commit your changes (`git commit -am 'Add some fooBar'`)
81
109
5. Push to the branch (`git push origin feature/fooBar`)
82
110
6. Create a new Pull Request
83
111
84
-
_NOTE:_ Commits and pull requests to FINOS repositories will only be accepted from those contributors with an active, executed Individual Contributor License Agreement (ICLA) with FINOS OR who are covered under an existing and active Corporate Contribution License Agreement (CCLA) executed with FINOS. Commits from individuals not covered under an ICLA or CCLA will be flagged and blocked by the FINOS Clabot tool (or EasyCLA). Please note that some CCLAs require individuals/employees to be explicitly named on the CCLA.
112
+
*_NOTE:* Commits and pull requests to FINOS repositories will only be accepted from those contributors with an active, executed Individual Contributor License Agreement (ICLA) with FINOS OR
113
+
who are covered under an existing and active Corporate Contribution License Agreement (CCLA) executed with FINOS. Commits from individuals not covered under an ICLA or CCLA will be flagged
114
+
and blocked by the FINOS Clabot tool (or EasyCLA). Please note that some CCLAs require individuals/employees to be explicitly named on the CCLA.
85
115
86
-
Unsure if you are covered under an existing CCLA? Email [email protected]*
116
+
If you are unsure if you are covered under an existing CCLA send an email to <[email protected]>
87
117
88
118
## Get in touch with the Rune Python Generator Team
89
119
@@ -93,7 +123,7 @@ Unsure if you are covered under an existing CCLA? Email [email protected]*
93
123
94
124
## Governance
95
125
96
-
This project implements https://community.finos.org/docs/governance/#open-source-software-projects
126
+
This project implements <https://community.finos.org/docs/governance/#open-source-software-projects>
Copy file name to clipboardExpand all lines: RELEASE.md
+19-9Lines changed: 19 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,17 +2,27 @@
2
2
3
3
_What is being released?_
4
4
5
-
This release adds support for meta data and for serialization / deserialization consistent with the [serialization specifications in CDM issue #3236](https://github.com/finos/common-domain-model/issues/3236)
5
+
This release adds support for metadata and for serialization / deserialization consistent with the [serialization specifications in CDM issue #3236](https://github.com/finos/common-domain-model/issues/3236)
6
6
7
-
Also included is support for circular dependencies and increased testing of operators.
7
+
Also included is support for:
8
8
9
-
# Reading From and Writing To a String
9
+
- circular Type definitions
10
+
- increased testing of operators
11
+
- generating Python across multiple namespaces
12
+
- Command line (CLI) generation of Python from a Rune source file or directory. To execute the CLI (assuming
13
+
the default process wherein the JAR is built in the target directory):
The generated Python code can deserialize and serialize an object.
12
22
13
-
## Deserializing from a string
23
+
###Deserializing from a string
14
24
15
-
To deserialize from a string and create a object of the model specified in the string invoke the function:
25
+
To deserialize from a string and create an object of the model specified in the string invoke the function:
16
26
17
27
`BaseDataClass.rune_deserialize` with the following parameters
18
28
@@ -27,9 +37,11 @@ To deserialize from a string and create a object of the model specified in the s
27
37
Returns:
28
38
BaseModel: The Rune model.
29
39
30
-
To serialize from an object ("[obj]") of a generated class, invoke the function:
40
+
### Serialize to a string
41
+
42
+
To serialize from a Rune object ("obj"), invoke the function:
31
43
32
-
`[obj].rune_serialize` with the following parameters:
44
+
`obj.rune_serialize` with the following parameters:
33
45
34
46
validate_model (bool, optional): Validate that the model passes all Rune defined constraings prior to serialization. Setting to False allows serialization of an invalid Model. Defaults to True.
35
47
@@ -59,7 +71,5 @@ To serialize from an object ("[obj]") of a generated class, invoke the function:
59
71
60
72
exclude_none (bool, optional): Determines whether to exclude fields that have a value of `None`. If True, fields set to None will be included. Defaults to False.
0 commit comments