tiagobento commented on code in PR #2207:
URL: 
https://github.com/apache/incubator-kie-tools/pull/2207#discussion_r1571394800


##########
packages/dmn-testing-models/README.md:
##########
@@ -0,0 +1,20 @@
+## DMN testing models
+
+This package is meant to contain all the DMN models published inside 
[kie-dmn-test-resources](https://github.com/apache/incubator-kie-drools/tree/main/kie-dmn/kie-dmn-test-resources)
 to make them available for testing purposes.
+
+Models are separated between < 1.5 version and 1.5 version; such 
classification is based on actual version-specific features, and not on the 
referenced tag itself.
+
+For future DMN versions there will be version specific folders.
+
+The original `org.kie:kie-dmn-test-resources` also contains _invalid_ models, 
but for the moment being we use only the valid ones to verify round-trip 
validation.
+
+### Usage
+
+The command `mvn clean generate-resources` downloads the jar and extract the 
models under `dist/`.
+
+To make them available for testing purpose:
+
+1. set the `KOGITO_RUNTIME_version` in the terminal (if different from the 
default one)
+2. `pnpm bootstrap` on the root directory
+3. cd dmn-testing-models
+4. `pnpm build:dev` or `pnpm build:prod` (they behave the same way - this 
executes `mvn clean generate-resources`)

Review Comment:
   Outdated.



##########
packages/dmn-testing-models/README.md:
##########
@@ -0,0 +1,20 @@
+## DMN testing models
+
+This package is meant to contain all the DMN models published inside 
[kie-dmn-test-resources](https://github.com/apache/incubator-kie-drools/tree/main/kie-dmn/kie-dmn-test-resources)
 to make them available for testing purposes.
+
+Models are separated between < 1.5 version and 1.5 version; such 
classification is based on actual version-specific features, and not on the 
referenced tag itself.
+
+For future DMN versions there will be version specific folders.
+
+The original `org.kie:kie-dmn-test-resources` also contains _invalid_ models, 
but for the moment being we use only the valid ones to verify round-trip 
validation.
+
+### Usage
+
+The command `mvn clean generate-resources` downloads the jar and extract the 
models under `dist/`.

Review Comment:
   Outdated.



##########
packages/dmn-marshaller-backend-compatibility-tester/package.json:
##########
@@ -0,0 +1,34 @@
+{
+  "private": true,
+  "name": "@kie-tools/dmn-marshaller-backend-compatibility-tester",
+  "version": "0.0.0",
+  "description": "",
+  "license": "Apache-2.0",
+  "keywords": [],
+  "homepage": "https://github.com/apache/incubator-kie-tools";,
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/apache/incubator-kie-tools.git";
+  },
+  "bugs": {
+    "url": "https://github.com/apache/incubator-kie-tools/issues";
+  },
+  "types": "./dist/index.d.ts",
+  "main": "dist/index.js",
+  "files": [
+    "dist",
+    "src"
+  ],
+  "scripts": {
+    "build:dev": "rimraf dist && tsc -p tsconfig.json && pnpm prefetch",
+    "build:prod": "pnpm build:dev",
+    "prefetch": "node dist/dependenciesFetch.js"
+  },
+  "devDependencies": {
+    "@jbangdev/jbang": "0.2.0",

Review Comment:
   Based on a previous conversation we had, I think this needs to be in the 
`dependencies` section, since it is required to run.



##########
packages/dmn-testing-models/pom.xml:
##########
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~ 
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~ 
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.      
+-->
+<project
+  xmlns="http://maven.apache.org/POM/4.0.0";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
https://maven.apache.org/xsd/maven-4.0.0.xsd";
+>
+
+  <parent>
+    <groupId>org.kie</groupId>
+    <artifactId>kie-tools-maven-base</artifactId>
+    <version>${revision}</version>
+    <relativePath>./node_modules/@kie-tools/maven-base/pom.xml</relativePath>

Review Comment:
   👍



##########
packages/dmn-marshaller-backend-compatibility-tester/src/index.ts:
##########
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import * as path from "path";
+const buildEnv = require("../env");
+const jbang = require("@jbangdev/jbang");
+
+const parentScriptPath = path.join(__dirname, "..", "src", 
"DmnMarshallerBackendCompatibilityTesterScript.java");
+const dmnValidationScriptPath = path.join(__dirname, "..", "src", 
"DmnValidation.java");
+const dmnSemanticComparisonPath = path.join(__dirname, "..", "src", 
"DmnSemanticComparison.java");
+
+export function executeParentScript() {
+  executeScript(parentScriptPath);
+}
+
+export function checkDMNValidation(dmnFilePath: string) {
+  const command = "--command=no_imports";
+  const dmnFilePathCommand = "--dmnFilePath=" + dmnFilePath;
+  const importedDmnFilesPaths = "--importedDmnFilesPaths=";
+
+  executeScript(dmnValidationScriptPath, [command, dmnFilePathCommand]);
+}

Review Comment:
   ```suggestion
   export function checkDmnValidation(data: { dmnFilePath: string }) {
     const command = "--command=no_imports";
     const dmnFilePathCommand = "--dmnFilePath=" + data.dmnFilePath;
     const importedDmnFilesPaths = "--importedDmnFilesPaths=";
   
     executeScript(dmnValidationScriptPath, [command, dmnFilePathCommand]);
   }
   ```
   
   ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to