The Rune Python Generator creates Python code from Rune. It fully supports the Rune type syntax and has comprehensive expression coverage, though function generation is not yet fully implemented.
The generated code requires the RunePythonRuntime library and Python 3.11+.
Releases are triggered manually and follow a four-part semantic versioning scheme (x.y.z.n). The first three numbers match the rosetta.dsl.version in the pom.xml, and the fourth number tracks generator changes.
For example, when the DSL version updates to 9.64.1, the first release will be tagged 9.64.1.0. Subsequent releases will only increment the fourth digit (e.g., 9.64.1.1) until the DSL version changes again.
Releases should not be manually tagged.
The features of the current version can be found in the release notes
The Renovate bot automatically handles DSL updates by creating a pull request. Maintainers can merge this PR if it passes the automated build and unit tests. Manual changes including a new PR are required if the tests fail.
README.md
- this file, for documentation purposesBUILDANDTEST.md
- instructions on building and testing the repoRELEASE.md
- information about the current releasesrc/main
- Java/Xtend code to generate Python from Runesrc/test
- Java/Xtend code to run JUnit tests on the code generation processbuild
- configuration scripts to setup and tear down the Python unit testing environmentbuild/build_cdm.sh
- used to create a Python package using CDM Rune definitionstest
- Python unit tests and scripts to run the tests
This guide is meant for everyone who wants to contribute to the Rune Python Generator and needs to get things up and running.
Detailed build and testing instructions can be found in BUILDANDTEST.md
Troubleshooting: If you run into issues, please open an issue. This helps us improve the guide for everyone.
Start by cloning the project: git clone https://github.com/finos/rune-python-generator
Our project runs with Java 21. Make sure that your Maven also uses this version of Java by running mvn -v
.
To build the project, run mvn clean package
.
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
Install version 2025-06
of the "Eclipse IDE for Java and DSL Developers" using the Eclipse Installer. You might have to enable "Advanced Mode" in the settings of the Eclipse Installer to install a specific version.
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.
We use Checkstyle for enforcing good coding practices. The Eclipse plugin for Checkstyle can be found here: https://checkstyle.org/eclipse-cs/#!/.
Go to Import... > Existing Maven Project, select the right folder, click Finish.
To generate Python code from a single file or directory, after building the project use the standalone CLI by executing the following command:
java -cp target/python-0.0.0.main-SNAPSHOT.jar com.regnosys.rosetta.generator.python.PythonCodeGeneratorCLI
To generate the Python version of the Common Domain Model (CDM), use the build_cdm.sh script. This script uses the branch specified in the file and creates a wheel in target/python-cdm.
test/cdm_tests/cdm_setup/build_cdm.sh
To use a different version of CDM, simply update the CDM_VERSION variable in the script.
The project roadmap is aligned with the Rune-DSL and CDM roadmaps.
We welcome contributions! Please follow these steps to get started:
- Fork the repository (https://github.com/finos/rune-python-generator/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Read our contribution guidelines and Community Code of Conduct
- Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request
NOTE: FINOS repositories require an executed and active FINOS Individual Contributor License Agreement (ICLA) or an executed and active FINOS Corporate Contribution License Agreement (CCLA). The FINOS Clabot tool (or EasyCLA) will flag and block commits from individuals not covered. Please note that some CCLAs require individuals/employees to be explicitly named on the CCLA.
If you are unsure if you are covered under an existing CCLA send an email to [email protected]
Get in touch with the Rune Python Generator team by creating a GitHub issue and labelling it with "help wanted".
We also encourage the community to get in touch via the FINOS Slack.
This project is governed by the FINOS Open Source Software Project Governance https://community.finos.org/docs/governance/#open-source-software-projects
Copyright 2023-2025 CLOUDRISK Limited and FT Advisory LLC
Distributed under the Apache License, Version 2.0.
- CLOUDRISK Limited, email: [email protected]
- FT Advisory LLC, email: [email protected]
- TradeHeader SL, email: [email protected]
SPDX-License-Identifier: Apache-2.0