Skip to content

Commit

Permalink
testWrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
AFine-gs committed Nov 6, 2024
1 parent 3508d91 commit ec8bea1
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@ function meta::pure::functions::meta::findPackagableElement(fe : ValueSpecificat
i:ClassConstraintValueSpecificationContext[1] | $i.type->cast(@PackageableElement),
i:InstanceValueSpecificationContext[1] | $i.instanceValue->meta::pure::functions::meta::findPackagableElement(),
p:ParameterValueSpecificationContext[1] | $p.functionExpression->meta::pure::functions::meta::findPackagableElement(),
k:KeyValueValueSpecificationContext[1] | $k.functionExpression->meta::pure::functions::meta::findPackagableElement()
k:KeyValueValueSpecificationContext[1] | $k.functionExpression->meta::pure::functions::meta::findPackagableElement(),
p:PropertyMappingValueSpecificationContext[1] | $p.propertyMapping.owner.parent->toOne()
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@
<parent>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-core-testable</artifactId>
<version>4.62.2-SNAPSHOT</version>
<version>4.65.3-SNAPSHOT</version>
</parent>

<artifactId>legend-engine-executable-test-pure</artifactId>
<packaging>jar</packaging>
<name>Legend Engine - Execution -Test Wrapper - PAR/JAVA</name>

<properties>
<maven.compiler.source>11</maven.compiler.source>
Expand All @@ -44,10 +46,10 @@
<repository>platform</repository>
<repository>core</repository>
<repository>core_relational</repository>
<repository>core_analytics_lineage</repository>
<repository>core_executable_test_wrapper</repository>
</repositories>
<extraRepositories>
<extraRepository>${project.basedir}/src/main/resources/core_analytics_lineage.definition.json</extraRepository>
<extraRepository>${project.basedir}/src/main/resources/core_executable_test_wrapper.definition.json</extraRepository>
</extraRepositories>
</configuration>
<executions>
Expand All @@ -69,11 +71,7 @@
<artifactId>legend-pure-m2-dsl-diagram-grammar</artifactId>
<version>${legend.pure.version}</version>
</dependency>
<dependency>
<groupId>org.finos.legend.pure</groupId>
<artifactId>legend-pure-m2-dsl-graph-grammar</artifactId>
<version>${legend.pure.version}</version>
</dependency>

<dependency>
<groupId>org.finos.legend.pure</groupId>
<artifactId>legend-pure-m2-dsl-path-grammar</artifactId>
Expand Down Expand Up @@ -116,7 +114,7 @@
<generationType>modular</generationType>
<useSingleDir>true</useSingleDir>
<repositories>
<repository>core_analytics_lineage</repository>
<repository>core_executable_test_wrapper</repository>
</repositories>
</configuration>
</execution>
Expand Down Expand Up @@ -183,22 +181,12 @@
<groupId>org.finos.legend.pure</groupId>
<artifactId>legend-pure-m3-core</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.pure</groupId>
<artifactId>legend-pure-m2-dsl-path-pure</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.pure</groupId>
<artifactId>legend-pure-m2-dsl-graph-pure</artifactId>
</dependency>


<dependency>
<groupId>org.finos.legend.pure</groupId>
<artifactId>legend-pure-m2-dsl-mapping-pure</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.pure</groupId>
<artifactId>legend-pure-m2-store-relational-pure</artifactId>
</dependency>

<dependency>
<groupId>org.finos.legend.pure</groupId>
Expand All @@ -209,11 +197,7 @@
<artifactId>legend-engine-pure-functions-standard-pure</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.finos.legend.pure</groupId>
<artifactId>legend-pure-m2-dsl-graph-pure</artifactId>
<version>${legend.pure.version}</version>
</dependency>


<!-- ENGINE -->
<dependency>
Expand All @@ -224,18 +208,11 @@
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-platform-java</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-platform-store-relational-java</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-runtime-java-extension-compiled-functions-unclassified</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-runtime-java-extension-compiled-functions-json</artifactId>
</dependency>

<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-platform-dsl-mapping-java</artifactId>
Expand All @@ -245,10 +222,7 @@
<artifactId>legend-engine-pure-platform-dsl-store-java</artifactId>
</dependency>

<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-xt-relationalStore-core-pure</artifactId>
</dependency>

<!-- ENGINE -->

<dependency>
Expand All @@ -260,11 +234,5 @@
<artifactId>eclipse-collections-api</artifactId>
</dependency>

<!-- TEST -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<!-- TEST -->
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ import meta::pure::mapping::*;
import meta::pure::test::testWrapper::*;
function meta::pure::test::testWrapper::getLineage(result:Map<TestType,meta::pure::test::testWrapper::Result>[1]):meta::pure::lineage::result::LineageResult[1]
{
$result->get(TestType.lineage)->cast(@meta::pure::test::testWrapper::LineageResult).result->toOne();
$result->get(TestType.lineage)->cast(@meta::pure::test::testWrapper::LineageResult).result->toOne();

}

function meta::pure::test::testWrapper::getTabularDatasetResult(result:Map<TestType,meta::pure::test::testWrapper::Result>[1]):meta::pure::mapping::Result<TabularDataSet|*>[1]
{
$result->get(TestType.execution)->cast(@ExecuteResult<TabularDataSet>).result->toOne();
$result->get(TestType.execution)->cast(@ExecuteResult<TabularDataSet>).result->toOne();

}

function meta::pure::test::testWrapper::testWrapper<T|y>(f:FunctionDefinition<{->T[y]}>[1], m:Mapping[1], runtime:Runtime[1], extensions:meta::pure::extension::Extension[*]):Map<TestType,meta::pure::test::testWrapper::Result>[1]
{

newMap([meta::pure::test::testWrapper::executeWrapper($f,$m,$runtime,$extensions),
meta::pure::test::testWrapper::lineageWrapper($f,$m,$runtime,$extensions)
meta::pure::test::testWrapper::lineageWrapper($f,$m,$runtime,$extensions)
]);
}

Expand All @@ -47,8 +47,8 @@ function meta::pure::test::testWrapper::lineageWrapper<T|y>(f:FunctionDefinitio
{
let fStr = 'meta::analytics::lineage::computeTestLineage_FunctionDefinition_1__Mapping_1__Runtime_$0_1$__Extension_MANY__LineageResult_1_';
let func = $fStr->pathToElement()->cast(@Function<{FunctionDefinition<Any>[1], Mapping[1], Runtime[1], meta::pure::extension::Extension[*]->meta::pure::lineage::result::LineageResult[1]}>);
$func->eval($f, $m,$runtime, $extensions);
pair(TestType.lineage,^meta::pure::test::testWrapper::LineageResult(result= $func->eval($f, $m,$runtime, $extensions)));
let result = $func->eval($f, $m,$runtime, $extensions);
pair(TestType.lineage,^meta::pure::test::testWrapper::LineageResult(result= $result));
}

Enum meta::pure::test::testWrapper::TestType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-executable-test-pure</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.finos.legend.pure</groupId>
<artifactId>legend-pure-m2-dsl-mapping-grammar</artifactId>
Expand Down Expand Up @@ -299,6 +304,10 @@
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-code-compiled-core</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-executable-test-pure</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-code-core-extension</artifactId>
Expand Down

0 comments on commit ec8bea1

Please sign in to comment.