Skip to content

Commit e378145

Browse files
Merge pull request #1 from dschwartznyc/cdm-deployment
Cdm deployment
2 parents dac2bda + c3acd1c commit e378145

File tree

17 files changed

+235
-97
lines changed

17 files changed

+235
-97
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Build and Tag with Rosetta Bundle Version
2+
3+
on:
4+
workflow_dispatch:
5+
# Optionally, you can trigger on push to main or other events
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
permissions:
12+
contents: write
13+
packages: write
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Set up JDK
20+
uses: actions/setup-java@v4
21+
with:
22+
distribution: 'temurin'
23+
java-version: '21'
24+
cache: maven
25+
26+
- name: Cache Maven dependencies
27+
uses: actions/cache@v4
28+
with:
29+
path: ~/.m2/repository
30+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
31+
restore-keys: |
32+
${{ runner.os }}-maven-
33+
34+
- name: Download external POM
35+
run: |
36+
curl -L -o cdm-pom.xml https://raw.githubusercontent.com/finos/common-domain-model/main/pom.xml
37+
38+
- name: Extract rosetta.bundle.version from external POM
39+
id: extract_version
40+
run: |
41+
# Try to extract from <properties> first, fallback to profile if needed
42+
version=$(xmllint --xpath "string(//properties/rosetta.bundle.version)" cdm-pom.xml)
43+
if [ -z "$version" ]; then
44+
version=$(xmllint --xpath "string(//profile/properties/rosetta.bundle.version)" cdm-pom.xml)
45+
fi
46+
echo "rosetta.bundle.version=$version"
47+
echo "version=$version" >> $GITHUB_OUTPUT
48+
49+
- name: Override rosetta.bundle.version in local pom.xml
50+
run: |
51+
version="${{ steps.extract_version.outputs.version }}"
52+
# Replace in <properties>
53+
sed -i "s|<rosetta.bundle.version>.*</rosetta.bundle.version>|<rosetta.bundle.version>${version}</rosetta.bundle.version>|" pom.xml
54+
# Replace in <profile> (if present)
55+
sed -i "s|<rosetta.bundle.version>.*</rosetta.bundle.version>|<rosetta.bundle.version>${version}</rosetta.bundle.version>|" pom.xml
56+
57+
- name: Set POM version to rosetta.bundle.version
58+
run: |
59+
version="${{ steps.extract_version.outputs.version }}"
60+
echo "Setting POM version to $version"
61+
mvn -B versions:set -DnewVersion=$version
62+
63+
- name: Build with Maven
64+
run: mvn -B package
65+
66+
- name: Revert POM changes
67+
run: git checkout -- pom.xml
68+
69+
- name: Upload JAR files
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: jar-files
73+
path: target/*.jar
74+
75+
- name: Create GitHub Tag and Release
76+
uses: softprops/action-gh-release@v2
77+
with:
78+
tag_name: ${{ steps.extract_version.outputs.version }}
79+
name: Release ${{ steps.extract_version.outputs.version }}
80+
files: target/*.jar
81+
env:
82+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![FINOS - Incubating](https://cdn.jsdelivr.net/gh/finos/contrib-toolbox@master/images/badge-incubating.svg)](https://community.finos.org/docs/governance/Software-Projects/stages/incubating)[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/10725/badge)](https://www.bestpractices.dev/projects/10725)[![Maven CI](https://github.com/regnosys/rune-python-generator/actions/workflows/cve-scanning.yml/badge.svg)](https://github.com/regnosys/rune-python-generator/actions/workflows/cve-scanning.yml)
1+
[![FINOS - Incubating](https://cdn.jsdelivr.net/gh/finos/contrib-toolbox@master/images/badge-incubating.svg)](https://community.finos.org/docs/governance/Software-Projects/stages/incubating)[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/10725/badge)](https://www.bestpractices.dev/projects/10725)[![Maven CI](https://github.com/finos/rune-python-generator/actions/workflows/cve-scanning.yml/badge.svg)](https://github.com/finos/rune-python-generator/actions/workflows/cve-scanning.yml)
22

33

44
<img align="right" width="15%" src="https://www.finos.org/hubfs/FINOS/finos-logo/FINOS_Icon_Wordmark_Name_RGB_horizontal.png">
@@ -7,7 +7,7 @@
77

88
*Rune Python Generator* - the generator enables creation of Python from [Rune](https://github.com/finos/rune-dsl). It supports the full Rune type syntax, and, as described in [EXPRESSION_SUPPORT.md](./EXPRESSION_SUPPORT.md), expression coverage is comprehensive. The generator does not yet fully implement function generation.
99

10-
The generated Python relies upon the [RunePythonRuntime](https://github.com/regnosys/rune-python-runtime) library and requires Python version 3.11+.
10+
The generated Python relies upon the [RunePythonRuntime](https://github.com/finos/rune-python-runtime) library and requires Python version 3.11+.
1111

1212
## Release Notes
1313
The features of the current version can be found in the [release notes](./RELEASE.md)
@@ -33,7 +33,7 @@ Detailed build and testing instructions can be found in [BUILDANDTEST.md](./BUIL
3333
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.
3434

3535
### 1. Building with Maven
36-
Start by cloning the project: `git clone https://github.com/regnosys/rune-python-generator`
36+
Start by cloning the project: `git clone https://github.com/finos/rune-python-generator`
3737

3838
Our project runs with Java 21. Make sure that your Maven also uses this version of Java by running `mvn -v`.
3939

@@ -47,7 +47,7 @@ Building the project using Maven will run JUNIT-based unit tests. All tests sho
4747
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.
4848

4949
#### Configure Eclipse with the right version of Java
50-
Xtend files cannot be build 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.
50+
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.
5151

5252
#### Install the Checkstyle plugin
5353
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/#!/).
@@ -69,17 +69,12 @@ To use a different version of CDM, update CDM_VERSION in the script.
6969

7070
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.
7171

72-
## Contributors
73-
- [CLOUDRISK Limited](https://www.cloudrisk.uk), email: [email protected]
74-
- [FT Advisory LLC](https://www.ftadvisory.co), email: [email protected]
75-
- [TradeHeader SL](https://www.tradeheader.com), email: [email protected]
76-
7772
## Contributing
78-
For any questions, bugs or feature requests please open an [issue](https://github.com/regnosys/rune-python-generator/issues)
73+
For any questions, bugs or feature requests please open an [issue](https://github.com/finos/rune-python-generator/issues)
7974
For anything else please send an email to {project mailing list}.
8075

8176
To submit a contribution:
82-
1. Fork it (<https://github.com/regnosys/rune-python-generator/fork>)
77+
1. Fork it (<https://github.com/finos/rune-python-generator/fork>)
8378
2. Create your feature branch (`git checkout -b feature/fooBar`)
8479
3. Read our [contribution guidelines](.github/CONTRIBUTING.md) and [Community Code of Conduct](https://www.finos.org/code-of-conduct)
8580
4. Commit your changes (`git commit -am 'Add some fooBar'`)
@@ -92,7 +87,7 @@ Unsure if you are covered under an existing CCLA? Email [email protected]*
9287

9388
## Get in touch with the Rune Python Generator Team
9489

95-
Get in touch with the Rune team by creating a [GitHub issue](https://github.com/REGnosys/rune-python-generator/issues/new) and labelling it with "help wanted".
90+
Get in touch with the Rune team by creating a [GitHub issue](https://github.com/finos/rune-python-generator/issues/new) and labelling it with "help wanted".
9691

9792
We encourage the community to get in touch via the [FINOS Slack](https://www.finos.org/blog/finos-announces-new-community-slack).
9893

pom.xml

Lines changed: 75 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,23 @@
1212
</parent>
1313

1414
<groupId>com.regnosys.rosetta.code-generators</groupId>
15-
<artifactId>rune-python-generator</artifactId>
15+
<artifactId>python</artifactId>
1616
<version>0.0.0.main-SNAPSHOT</version>
1717
<packaging>jar</packaging>
1818
<name>code-gen-python</name>
1919

2020
<description>Generator to create Python from Rune</description>
2121

2222
<scm>
23-
<developerConnection>scm:git:https://github.com/REGnosys/rosetta-code-generators</developerConnection>
24-
<connection>scm:git:git://github.com/REGnosys/rosetta-code-generators.git</connection>
23+
<developerConnection>scm:git:https://github.com/finos/rune-python-generator</developerConnection>
24+
<connection>scm:git:git://github.com/finos/rune-python-generator.git</connection>
2525
<tag>HEAD</tag>
26-
<url>https://github.com/REGnosys/rosetta-code-generators</url>
26+
<url>https://github.com/finos/rune-python-generator</url>
2727
</scm>
2828

29-
<url>https://github.com/REGnosys/rosetta-code-generators</url>
29+
<url>https://github.com/finos/rune-python-generators</url>
3030
<organization>
31-
<name>REGnosys Limited</name>
32-
<url>https://www.regnosys.com/</url>
31+
<name>CLOUDRISK Limited and FT Advisory LLC</name>
3332
</organization>
3433

3534
<licenses>
@@ -162,8 +161,8 @@
162161
<repoServerHost>s01.oss.sonatype.org</repoServerHost>
163162
<stagingTimeoutInMinutes>20</stagingTimeoutInMinutes>
164163

165-
<rosetta.dsl.version>9.54.0</rosetta.dsl.version>
166-
<rosetta.bundle.version>11.64.0</rosetta.bundle.version>
164+
<rosetta.dsl.version>9.56.0</rosetta.dsl.version>
165+
<rosetta.bundle.version>11.68.3</rosetta.bundle.version>
167166

168167
<xtext.version>2.38.0</xtext.version>
169168
<guice.version>6.0.0</guice.version>
@@ -191,7 +190,7 @@
191190
<nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>
192191
<maven-gpg-plugin.version>3.2.4</maven-gpg-plugin.version>
193192
<!-- Used by the Python generator -->
194-
<cdm.rosetta.source.path>build/common-domain-model/rosetta-source/src/main/rosetta</cdm.rosetta.source.path>
193+
<cdm.rosetta.source.path>/Users/dls/projects/cdm/common-domain-model/trade-header/common-domain-model/rosetta-source/src/main/rosetta</cdm.rosetta.source.path>
195194
<cdm.python.output.path>target/python-cdm</cdm.python.output.path>
196195
<unittest.rosetta.source.path>test/python_unit_tests/rosetta</unittest.rosetta.source.path>
197196
<unittest.python.output.path>target/python-tests/unit_tests</unittest.python.output.path>
@@ -262,6 +261,11 @@
262261
</exclusion>
263262
</exclusions>
264263
</dependency>
264+
<dependency>
265+
<groupId>org.eclipse.xtext</groupId>
266+
<artifactId>org.eclipse.xtext.ecore</artifactId>
267+
<version>${xtext.version}</version>
268+
</dependency>
265269
<!-- xtext END -->
266270

267271
<dependency>
@@ -285,7 +289,6 @@
285289
<artifactId>logback-core</artifactId>
286290
<version>${logback.version}</version>
287291
</dependency>
288-
289292
<dependency>
290293
<groupId>com.regnosys.rosetta</groupId>
291294
<artifactId>com.regnosys.rosetta</artifactId>
@@ -330,6 +333,11 @@
330333
<artifactId>commons-io</artifactId>
331334
<version>${commons-io.version}</version>
332335
</dependency>
336+
<dependency>
337+
<groupId>commons-logging</groupId>
338+
<artifactId>commons-logging</artifactId>
339+
<version>1.3.4</version>
340+
</dependency>
333341
</dependencies>
334342
</dependencyManagement>
335343

@@ -379,8 +387,10 @@
379387
<dependency>
380388
<groupId>org.jgrapht</groupId>
381389
<artifactId>jgrapht-core</artifactId>
382-
<version>1.5.2</version>
390+
<version>1.5.2</version>
383391
</dependency>
392+
393+
384394
<!-- extra dependencies -->
385395
<dependency>
386396
<groupId>org.eclipse.emf</groupId>
@@ -574,28 +584,65 @@
574584
<artifactId>xtend-maven-plugin</artifactId>
575585
<executions>
576586
<execution>
577-
<id>Generate xtend sources</id>
578-
<phase>generate-sources</phase>
579-
<goals>
580-
<goal>compile</goal>
581-
</goals>
582-
<configuration>
583-
<outputDirectory>${project.basedir}/target/main/generated/xtend</outputDirectory>
584-
</configuration>
587+
<id>Generate xtend sources</id>
588+
<phase>generate-sources</phase>
589+
<goals>
590+
<goal>compile</goal>
591+
</goals>
592+
<configuration>
593+
<outputDirectory>${project.basedir}/target/main/generated/xtend</outputDirectory>
594+
</configuration>
585595
</execution>
586596
<execution>
587-
<id>Generate xtend test sources</id>
588-
<phase>generate-test-sources</phase>
589-
<goals>
590-
<goal>testCompile</goal>
591-
</goals>
592-
<configuration>
593-
<testOutputDirectory>${project.basedir}/target/test/generated/xtend</testOutputDirectory>
594-
</configuration>
597+
<id>Generate xtend test sources</id>
598+
<phase>generate-test-sources</phase>
599+
<goals>
600+
<goal>testCompile</goal>
601+
</goals>
602+
<configuration>
603+
<testOutputDirectory>${project.basedir}/target/test/generated/xtend</testOutputDirectory>
604+
</configuration>
595605
</execution>
596606
</executions>
597607
</plugin>
598608
<!--- migrated from PYTHON POM: end -->
609+
<plugin>
610+
<groupId>org.apache.maven.plugins</groupId>
611+
<artifactId>maven-install-plugin</artifactId>
612+
<version>${maven-install-plugin.version}</version>
613+
<executions>
614+
<execution>
615+
<id>install-python-default-version</id>
616+
<phase>install</phase>
617+
<goals>
618+
<goal>install-file</goal>
619+
</goals>
620+
<configuration>
621+
<file>${project.build.directory}/${project.build.finalName}.jar</file>
622+
<groupId>com.regnosys.rosetta.code-generators</groupId>
623+
<artifactId>python</artifactId>
624+
<version>${project.version}</version>
625+
<packaging>jar</packaging>
626+
<generatePom>true</generatePom>
627+
</configuration>
628+
</execution>
629+
<execution>
630+
<id>install-python-bundle-version</id>
631+
<phase>install</phase>
632+
<goals>
633+
<goal>install-file</goal>
634+
</goals>
635+
<configuration>
636+
<file>${project.build.directory}/${project.build.finalName}.jar</file>
637+
<groupId>com.regnosys.rosetta.code-generators</groupId>
638+
<artifactId>python</artifactId>
639+
<version>${rosetta.bundle.version}</version>
640+
<packaging>jar</packaging>
641+
<generatePom>true</generatePom>
642+
</configuration>
643+
</execution>
644+
</executions>
645+
</plugin>
599646
</plugins>
600647
</build>
601648
</project>

0 commit comments

Comments
 (0)