Skip to content

Commit bc1bcfa

Browse files
shift to jakarta.inject from google. added DefaultExternalGeneratorsProvider
1 parent 4d05cb0 commit bc1bcfa

28 files changed

+68
-27
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2025 CLOUDRISK Limited and FT Advisory LLC
189+
Copyright 2023-2025 CLOUDRISK Limited and FT Advisory LLC
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

NOTICE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Rune Python Generator - FINOS
2-
Copyright 2025 - 2025 CLOUDRISK Limited ([email protected]) and FT Advisory LLC ([email protected])
2+
Copyright 2023-2025 CLOUDRISK Limited ([email protected]) and FT Advisory LLC ([email protected])
33

44
This product includes software developed at the Fintech Open Source Foundation (https://www.finos.org/).
55

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
# Rune Python Generator
66

77
This repository creates a generator that will produce Python from a model developed using [Rune](https://github.com/finos/rune-dsl). The generated Python relies upon the [RunePythonRuntime]() library.
8+
9+
The generator supports creation of Python for 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.
810

911
The Python package requires Python version 3.11+.
1012

build/build_cdm.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
#!/bin/bash
2+
#
3+
# utility script - builds CDM using PythonFilesGeneratorTest::generateCDMPythonFromRosetta
4+
# to use:
5+
# 1. remove disabled test by commenting @Disabled
6+
# 2. specify which version of CDM to pull in get_cdm.sh
7+
# 3. run this script
8+
#
29
function error
310
{
411
echo

build/get_cdm.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
#!/bin/bash
2+
#
3+
# utility script - pulls the version of CDM specified by CDM_VERSION
4+
# supports build_cdm.sh
5+
#
6+
27
function error
38
{
49
echo

pom.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,6 @@
386386
<groupId>org.eclipse.emf</groupId>
387387
<artifactId>org.eclipse.emf.codegen.ecore</artifactId>
388388
</dependency>
389-
<dependency>
390-
<groupId>com.google.inject</groupId>
391-
<artifactId>guice</artifactId>
392-
</dependency>
393389
<dependency>
394390
<groupId>org.apache.maven</groupId>
395391
<artifactId>maven-model</artifactId>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package com.regnosys.rosetta.generator.python;
2+
3+
import java.util.Arrays;
4+
import java.util.Iterator;
5+
import java.util.List;
6+
7+
import jakarta.inject.Inject;
8+
import jakarta.inject.Provider;
9+
import com.regnosys.rosetta.generator.external.ExternalGenerator;
10+
import com.regnosys.rosetta.generator.external.ExternalGenerators;
11+
12+
public final class DefaultExternalGeneratorsProvider implements Provider<ExternalGenerators> {
13+
14+
@Inject
15+
private PythonCodeGenerator pythonGenerator;
16+
17+
@Override
18+
public ExternalGenerators get() {
19+
return new DefaultGenerators();
20+
}
21+
22+
private final class DefaultGenerators implements ExternalGenerators {
23+
24+
private List<ExternalGenerator> gens = Arrays.asList(pythonGenerator);
25+
26+
@Override
27+
public Iterator<ExternalGenerator> iterator() {
28+
return gens.iterator();
29+
}
30+
}
31+
}

src/main/java/com/regnosys/rosetta/generator/python/PythonCodeGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// TODO: review migrating choice alias processor to PythonModelObjectGenerator
77

88

9-
import com.google.inject.Inject;
9+
import jakarta.inject.Inject;
1010
import com.regnosys.rosetta.generator.external.AbstractExternalGenerator;
1111
import com.regnosys.rosetta.generator.python.enums.PythonEnumGenerator;
1212
import com.regnosys.rosetta.generator.python.func.PythonFunctionGenerator;

src/main/java/com/regnosys/rosetta/generator/python/func/FunctionDependencyProvider.xtend

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.regnosys.rosetta.generator.python.func;
22

3-
import com.google.inject.Inject
3+
import jakarta.inject.Inject
44
import com.regnosys.rosetta.rosetta.RosettaEnumValueReference
55
import com.regnosys.rosetta.rosetta.RosettaEnumeration
66
import com.regnosys.rosetta.rosetta.RosettaExternalFunction

src/main/java/com/regnosys/rosetta/generator/python/func/PythonFunctionGenerator.xtend

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.regnosys.rosetta.generator.python.func
22

3-
import com.google.inject.Inject
3+
import jakarta.inject.Inject
44
import com.regnosys.rosetta.generator.python.expressions.PythonExpressionGenerator
55
import com.regnosys.rosetta.generator.python.util.PythonCodeGeneratorUtil
66
import com.regnosys.rosetta.generator.python.util.RuneToPythonMapper

0 commit comments

Comments
 (0)