Skip to content

Commit 8a75b5a

Browse files
Merge pull request #32 from finos/cdm-deployment
Prepare for integration with CDM
2 parents 41a9e7f + 46fc574 commit 8a75b5a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+779
-2580
lines changed

.github/renovate.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": ["config:base"],
4+
"prConcurrentLimit": 10,
5+
"prHourlyLimit": 20,
6+
"packageRules": [
7+
{
8+
"description": "Update the Maven property rosetta.dsl.version when com.regnosys.rosetta releases a new version",
9+
"matchManagers": ["maven"],
10+
"matchPackageNames": [
11+
"com.regnosys.rosetta:com.regnosys.rosetta",
12+
"rosetta.dsl.version"
13+
],
14+
"enabled": true
15+
},
16+
{
17+
"description": "Disable all that are not maven AND not those names",
18+
"matchManagers": ["maven"],
19+
"excludePackageNames": [
20+
"com.regnosys.rosetta:com.regnosys.rosetta",
21+
"rosetta.dsl.version"
22+
],
23+
"enabled": false
24+
}
25+
]
26+
}

.github/workflows/build-and-test-main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
with:
3333
python-version: '3.11'
3434
- name: Build with Maven
35-
run: mvn -B package --file pom.xml
35+
run: mvn -B package -Psign-artifacts --file pom.xml
3636
- name: Run Python Unit Tests
3737
run: |
3838
chmod +x build/setup_python_env.sh

.github/workflows/create-tagged-release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
name: Build JAR on Tag
1+
name: Create Tagged Release
2+
# Build JAR and create tagged release
23

34
on:
45
push:
@@ -36,7 +37,7 @@ jobs:
3637
TAG_NAME=${GITHUB_REF#refs/tags/}
3738
echo "Updating POM version to $TAG_NAME"
3839
mvn -B versions:set -DnewVersion=$TAG_NAME
39-
mvn -B package
40+
mvn -B package -Psign-artifacts
4041
4142
- name: Revert POM changes
4243
run: git checkout -- pom.xml

.github/workflows/renovate.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This workflow runs Renovate Bot on a schedule or on demand.
2+
# It uses the configuration file located at .github/renovate.json
3+
4+
name: Renovate
5+
on:
6+
# Allows you to run this workflow manually from the Actions tab
7+
workflow_dispatch:
8+
# Runs the workflow on a schedule (e.g., every day at 2 AM)
9+
schedule:
10+
- cron: '0 2 * * *'
11+
12+
jobs:
13+
renovate:
14+
runs-on: ubuntu-latest
15+
# This section is crucial. It grants the GITHUB_TOKEN the necessary
16+
# permissions for Renovate to read repository content and create pull requests.
17+
permissions:
18+
contents: write
19+
pull-requests: write
20+
steps:
21+
# Checks out your repository under $GITHUB_WORKSPACE, so your job can access it
22+
- uses: actions/checkout@v4
23+
24+
# Runs the Renovate GitHub Action
25+
- name: Renovate
26+
# Using a slightly newer version of the action
27+
uses: renovatebot/[email protected]
28+
with:
29+
# The token is required to create pull requests.
30+
# GITHUB_TOKEN is automatically created by Actions and is given
31+
# the permissions defined in the `permissions` block above.
32+
token: ${{ secrets.GITHUB_TOKEN }}
33+
# Specifies the path to your Renovate configuration file.
34+
configurationFile: .github/renovate.json
35+
env:
36+
# Use 'debug' for verbose logging, which is helpful for troubleshooting.
37+
LOG_LEVEL: 'debug'
38+
RENOVATE_REPOSITORIES: ${{ github.repository }} # This tells Renovate to scan the current repo
39+

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,5 @@ __pycache__
5757
**/test/serialization_tests/rune-common
5858
**/build/common-domain-model
5959
**/build/resources/serialization
60+
src/generated/
61+
*.todo

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Before making a contribution, please take the following steps:
88
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.
99
2. If there isn't already a relevant issue, create one, describing your contribution and the problem you're trying to solve.
1010
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.
1212
5. Submit a pull request.
1313

1414
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.

NOTICE

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
Rune Python Generator - FINOS
2-
Copyright 2023-2025 CLOUDRISK Limited ([email protected]) and FT Advisory LLC ([email protected])
3-
4-
This product includes software developed at the Fintech Open Source Foundation (https://www.finos.org/).
1+
# Rune Python Generator - FINOS
52

3+
Copyright 2023-2025 CLOUDRISK Limited (<[email protected]>) and FT Advisory LLC (<[email protected]>)
64

5+
This product includes software developed at the Fintech Open Source Foundation (<https://www.finos.org/>).

RELEASE.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,27 @@
22

33
_What is being released?_
44

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)
66

7-
Also included is support for circular dependencies and increased testing of operators.
7+
Also included is support for:
88

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):
14+
15+
```bash
16+
java -cp target/python-0.0.0.main-SNAPSHOT.jar com.regnosys.rosetta.generator.python.PythonCodeGeneratorCLI -s [rune source files] -t [target directory for generated Python]
17+
```
18+
19+
## Reading From and Writing To a String
1020

1121
The generated Python code can deserialize and serialize an object.
1222

13-
## Deserializing from a string
23+
### Deserializing from a string
1424

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:
1626

1727
`BaseDataClass.rune_deserialize` with the following parameters
1828

@@ -27,9 +37,11 @@ To deserialize from a string and create a object of the model specified in the s
2737
Returns:
2838
BaseModel: The Rune model.
2939

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:
3143

32-
`[obj].rune_serialize` with the following parameters:
44+
`obj.rune_serialize` with the following parameters:
3345

3446
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.
3547

@@ -59,7 +71,5 @@ To serialize from an object ("[obj]") of a generated class, invoke the function:
5971

6072
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.
6173

62-
6374
Returns:
6475
A string.
65-

0 commit comments

Comments
 (0)