Skip to content

Commit b631976

Browse files
Merge pull request #29 from dschwartznyc/main
CDM Deployment Prep
2 parents a57fda0 + bb3490c commit b631976

File tree

5 files changed

+60
-247
lines changed

5 files changed

+60
-247
lines changed

.github/workflows/build-and-tag-release-rosetta-bundle.yml

Lines changed: 0 additions & 74 deletions
This file was deleted.

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

Lines changed: 2 additions & 1 deletion
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:

CDM-Build-Integration.md

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,64 @@
1-
## Feature Request - CDM Python Generator Integration
1+
# Feature Request - CDM Python Generator Integration
2+
3+
## Description of Problem
24

3-
### Description of Problem:
45
With the Python generator now a standalone component, its integration with the CDM build needs to be updated. This presents two main challenges:
56

6-
1. **Consistency with CDM's Rosetta Bundle Version:**
7-
To keep CDM in sync with all elements of the Rune DSL infrastructure (rosetta-common, rosetta-testing, rosetta-code-generators, rosetta-ingest), the CDM build specifies which version to use. Previously, the Python generator was kept in sync as part of the rosetta-code-generators repository, with updates whenever there was an update to the version in that repository. While the generated Python code does not directly depend on the Rune bundle, coordinating updates across all elements of the Rune infrastructure helps prevent inconsistencies in enterprise production enviroments — especially if a bundle update addresses a defect or changes behavior in a way that impacts the generators.
7+
1. **Consistency with CDM's Rosetta Bundle Version:**
8+
To keep CDM in sync with all elements of the Rune DSL infrastructure (rosetta-common, rosetta-testing, rosetta-code-generators, rosetta-ingest), the CDM build specifies which version to use. Previously, the Python generator was kept in sync as part of the rosetta-code-generators repository, with updates whenever there was an update to the version in that repository. While the generated Python code does not directly depend on it, coordinating updates across all elements of the Rune infrastructure helps prevent inconsistencies in enterprise production enviroments — especially if a dsl update addresses a defect or changes behavior in a way that impacts the generators.
89

910
2. **Invocation of the standalone Python generator**:
1011
The CDM build now needs to explicitly invoke the unbundled Python generator.
1112

1213
---
13-
### Potential Solutions:
14+
15+
## Potential Solutions
1416

1517
Below are both a target state and interim steps to enable integration before the target state is fully realized.
1618

17-
### Target state:
19+
### Target state
20+
21+
#### Assumptions
1822

19-
#### Assumptions:
2023
- The generator includes an executable Main class that accepts a Rune source and a target folder for the generated Python.
2124
- The Rune Python Runtime is available via PyPI.
2225

23-
#### Process:
24-
1. An update to the Rosetta Bundle Version triggers a rebuild of the generator. If successful, a release tagged with the bundle version is generated.
25-
- Question: What is a viable source for the trigger? Rosetta-Common?
26-
- Question: Is the generator uploaded to a central Maven repository or is it solely an artifact of the generator repository.
27-
2. The CDM build sources a generator version that matches its Rosetta Bundle Version. The sequence is:
26+
#### Process
27+
28+
1. An update to the Rosetta DSL Version triggers a rebuild of the generator. If successful, a release tagged with the DSL version is generated.
29+
30+
2. The CDM build sources a generator version that matches its Rosetta DSL Version. The sequence is:
2831

2932
1. Source the generator
3033
2. If found:
3134
1. Generate Python by invoking the new Main class using the source CDM Rune files.
3235
2. Package the resultung Python.
3336
3. Upload the package to PyPI.
34-
35-
Question: Should the package also be made available as a Maven artifact?
3637
3. If not found: fail gracefully generating notice of the error.
3738

38-
### Interim state:
39+
### Interim state
40+
41+
#### Assumptions
3942

40-
#### Assumptions:
4143
- The generator is invoked using the current mechanism.
4244
- Python artifacts are distributed via the CDM Maven Repository.
4345

4446
1. A scheduled action rebuilds the generator if the Rosetta Bundle Version used in CDM does not match any of tagged versions. If successful, a release tagged with the bundle version is generated and stored as a repo artifact.
4547

4648
_Note: The downside of this approach is that there will be CDM builds that will not find a matching generator._
47-
4849
2. The CDM build sources a generator that matches its Rosetta Bundle Version by querying the generator repo. The sequence is:
4950
1. Source the generator
5051
2. If found:
51-
1. Generate Python by executing:
52+
1. Generate Python by executing
53+
5254
```sh
5355
mvn clean install -DskipTests -P python
54-
```
56+
```
57+
5558
2. Package the Python.
5659
3. Upload the package to the Maven repository.
57-
3. If not found: fail gracefully generating notice of the error.
60+
3. If not found: fail gracefully generating notice of the error
61+
62+
## Questions
63+
64+
- Should the package also be made available as a Maven artifact?

RELEASE.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@ _What is being released?_
44

55
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)
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+
13+
## Reading From and Writing To a String
1014

1115
The generated Python code can deserialize and serialize an object.
1216

13-
## Deserializing from a string
17+
### Deserializing from a string
1418

1519
To deserialize from a string and create a object of the model specified in the string invoke the function:
1620

@@ -27,9 +31,11 @@ To deserialize from a string and create a object of the model specified in the s
2731
Returns:
2832
BaseModel: The Rune model.
2933

30-
To serialize from an object ("[obj]") of a generated class, invoke the function:
34+
### Serialize to a string
35+
36+
To serialize from a Rune object ("obj"), invoke the function:
3137

32-
`[obj].rune_serialize` with the following parameters:
38+
`obj.rune_serialize` with the following parameters:
3339

3440
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.
3541

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

6066
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.
6167

62-
6368
Returns:
6469
A string.
65-

0 commit comments

Comments
 (0)