You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by se...@apache.org on 2020/09/21 09:47:59 UTC

[incubator-nlpcraft] branch NLPCRAFT-132 updated (f0c729f -> 95a77dc)

This is an automated email from the ASF dual-hosted git repository.

sergeykamov pushed a change to branch NLPCRAFT-132
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git.


    from f0c729f  NCConversationSpec test excluded from maven integration tests.
     new 54d5155  Tests configuration fixes fr maven.
     new 95a77dc  WIP.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 nlpcraft/pom.xml                                                   | 7 +++++++
 .../test/scala/org/apache/nlpcraft/NCTestExampleModelsSpec.scala   | 7 ++++++-
 .../server/nlp/enrichers/date/tools/NCDateGeneratorSpec.scala      | 5 ++---
 3 files changed, 15 insertions(+), 4 deletions(-)


[incubator-nlpcraft] 01/02: Tests configuration fixes fr maven.

Posted by se...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sergeykamov pushed a commit to branch NLPCRAFT-132
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git

commit 54d5155d132375da4300279b465450b7adc547ff
Author: Sergey Kamov <se...@apache.org>
AuthorDate: Mon Sep 21 12:07:36 2020 +0300

    Tests configuration fixes fr maven.
---
 nlpcraft/pom.xml                                    | 21 +++++++++++++++++++++
 .../apache/nlpcraft/NCTestExampleModelsSpec.scala   |  9 ++++++++-
 .../enrichers/date/tools/NCDateGeneratorSpec.scala  |  5 ++---
 pom.xml                                             |  1 +
 4 files changed, 32 insertions(+), 4 deletions(-)

diff --git a/nlpcraft/pom.xml b/nlpcraft/pom.xml
index ea34cdb..e7662bc 100644
--- a/nlpcraft/pom.xml
+++ b/nlpcraft/pom.xml
@@ -270,6 +270,26 @@
 
         <plugins>
             <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>properties-maven-plugin</artifactId>
+                <version>${maven.read.project.properties.plugin.ver}</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>set-system-properties</goal>
+                        </goals>
+                        <configuration>
+                            <properties>
+                                <property>
+                                    <name>tests.env.maven</name>
+                                    <value>true</value>
+                                </property>
+                            </properties>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
                 <groupId>com.bazaarvoice.maven.plugins</groupId>
                 <artifactId>process-exec-maven-plugin</artifactId>
                 <version>${maven.bazaarvoice.plugin.ver}</version>
@@ -338,6 +358,7 @@
                             </includes>
                             <excludes>
                                 <exclude>**/NCConversationSpec.*</exclude>
+                                <exclude>**/NCDateGeneratorSpec.*</exclude>
                             </excludes>
                         </configuration>
                     </execution>
diff --git a/nlpcraft/src/test/scala/org/apache/nlpcraft/NCTestExampleModelsSpec.scala b/nlpcraft/src/test/scala/org/apache/nlpcraft/NCTestExampleModelsSpec.scala
index 2e57177..8000ba0 100644
--- a/nlpcraft/src/test/scala/org/apache/nlpcraft/NCTestExampleModelsSpec.scala
+++ b/nlpcraft/src/test/scala/org/apache/nlpcraft/NCTestExampleModelsSpec.scala
@@ -26,12 +26,19 @@ import org.junit.jupiter.api.{Assertions, Test}
 class NCTestExampleModelsSpec {
     @Test
     def test(): Unit = {
-        val models = "" +
+        var models = "" +
             "org.apache.nlpcraft.examples.alarm.AlarmModel," +
             "org.apache.nlpcraft.examples.time.TimeModel," +
             "org.apache.nlpcraft.examples.lightswitch.LightSwitchModel," +
             "org.apache.nlpcraft.examples.echo.EchoModel"
 
+        val testEnvMavenStr = System.getProperty("tests.env.maven")
+
+        println("testEnvMavenStr="+testEnvMavenStr)
+
+        if (testEnvMavenStr == null || testEnvMavenStr.toLowerCase != "true")
+            models = s"$models,org.apache.nlpcraft.examples.weather.WeatherModel"
+
         // Instruct auto-validator what models to test.
         System.setProperty("NLPCRAFT_TEST_MODELS", models)
 
diff --git a/nlpcraft/src/test/scala/org/apache/nlpcraft/server/nlp/enrichers/date/tools/NCDateGeneratorSpec.scala b/nlpcraft/src/test/scala/org/apache/nlpcraft/server/nlp/enrichers/date/tools/NCDateGeneratorSpec.scala
index 4db3503..7c817e3 100644
--- a/nlpcraft/src/test/scala/org/apache/nlpcraft/server/nlp/enrichers/date/tools/NCDateGeneratorSpec.scala
+++ b/nlpcraft/src/test/scala/org/apache/nlpcraft/server/nlp/enrichers/date/tools/NCDateGeneratorSpec.scala
@@ -26,18 +26,17 @@ import org.apache.nlpcraft.server.nlp.enrichers.date.NCDateFormatType._
 import org.apache.nlpcraft.server.nlp.enrichers.date.tools.NCDateGenerator.LHM_SS
 import org.apache.nlpcraft.server.nlp.enrichers.date.{NCDateParser, NCDateRange}
 import org.junit.jupiter.api.Assertions.{assertTrue, fail}
-import org.junit.jupiter.api.{Disabled, Test}
+import org.junit.jupiter.api.Test
 
 import scala.collection.JavaConverters._
 import scala.collection._
-import scala.collection.mutable.{LinkedHashMap ⇒ LHM}
+import scala.collection.mutable.{LinkedHashMap => LHM}
 import scala.language.implicitConversions
 
 /**
  * Tests for dates templates generators.
  * Excluded from suite because added for manual testing.
  */
-@Disabled
 class NCDateGeneratorSpec  {
     private def print(
         f: LHM[String, String] ⇒ Unit, cnt: Int = 500, asc: Boolean = true, keys2Check: Option[Seq[String]] = None
diff --git a/pom.xml b/pom.xml
index 86c7009..44a6c20 100644
--- a/pom.xml
+++ b/pom.xml
@@ -120,6 +120,7 @@
         <maven.source.plugin.ver>3.0.1</maven.source.plugin.ver>
         <maven.gpg.plugin.ver>1.6</maven.gpg.plugin.ver>
         <maven.bazaarvoice.plugin.ver>0.9</maven.bazaarvoice.plugin.ver>
+        <maven.read.project.properties.plugin.ver>1.0.0</maven.read.project.properties.plugin.ver>
         <apache.rat.plugin.ver>0.13</apache.rat.plugin.ver>
         <org.antlr4.ver>4.8</org.antlr4.ver>
         <akka.http.2.12.ver>10.2.0</akka.http.2.12.ver>


[incubator-nlpcraft] 02/02: WIP.

Posted by se...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sergeykamov pushed a commit to branch NLPCRAFT-132
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git

commit 95a77dca21cabf61fe756197f12f8ca75820860b
Author: Sergey Kamov <se...@apache.org>
AuthorDate: Mon Sep 21 12:47:52 2020 +0300

    WIP.
---
 nlpcraft/pom.xml                                   | 26 +++++-----------------
 .../apache/nlpcraft/NCTestExampleModelsSpec.scala  |  6 ++---
 pom.xml                                            |  1 -
 3 files changed, 8 insertions(+), 25 deletions(-)

diff --git a/nlpcraft/pom.xml b/nlpcraft/pom.xml
index e7662bc..0ecfe8d 100644
--- a/nlpcraft/pom.xml
+++ b/nlpcraft/pom.xml
@@ -270,26 +270,6 @@
 
         <plugins>
             <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>properties-maven-plugin</artifactId>
-                <version>${maven.read.project.properties.plugin.ver}</version>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>set-system-properties</goal>
-                        </goals>
-                        <configuration>
-                            <properties>
-                                <property>
-                                    <name>tests.env.maven</name>
-                                    <value>true</value>
-                                </property>
-                            </properties>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
                 <groupId>com.bazaarvoice.maven.plugins</groupId>
                 <artifactId>process-exec-maven-plugin</artifactId>
                 <version>${maven.bazaarvoice.plugin.ver}</version>
@@ -341,6 +321,12 @@
                 <configuration>
                     <!-- Skips all tests on phase `test`. -->
                     <skip>true</skip>
+                    <systemProperties>
+                        <property>
+                            <name>testsEnvMaven</name>
+                            <value>true</value>
+                        </property>
+                    </systemProperties>
                 </configuration>
                 <executions>
                     <!-- All tests are defined as integration. -->
diff --git a/nlpcraft/src/test/scala/org/apache/nlpcraft/NCTestExampleModelsSpec.scala b/nlpcraft/src/test/scala/org/apache/nlpcraft/NCTestExampleModelsSpec.scala
index 8000ba0..cfcbacb 100644
--- a/nlpcraft/src/test/scala/org/apache/nlpcraft/NCTestExampleModelsSpec.scala
+++ b/nlpcraft/src/test/scala/org/apache/nlpcraft/NCTestExampleModelsSpec.scala
@@ -32,11 +32,9 @@ class NCTestExampleModelsSpec {
             "org.apache.nlpcraft.examples.lightswitch.LightSwitchModel," +
             "org.apache.nlpcraft.examples.echo.EchoModel"
 
-        val testEnvMavenStr = System.getProperty("tests.env.maven")
+        val testsEnvMaven = System.getProperty("testsEnvMaven")
 
-        println("testEnvMavenStr="+testEnvMavenStr)
-
-        if (testEnvMavenStr == null || testEnvMavenStr.toLowerCase != "true")
+        if (testsEnvMaven == null || testsEnvMaven.toLowerCase != "true")
             models = s"$models,org.apache.nlpcraft.examples.weather.WeatherModel"
 
         // Instruct auto-validator what models to test.
diff --git a/pom.xml b/pom.xml
index 44a6c20..86c7009 100644
--- a/pom.xml
+++ b/pom.xml
@@ -120,7 +120,6 @@
         <maven.source.plugin.ver>3.0.1</maven.source.plugin.ver>
         <maven.gpg.plugin.ver>1.6</maven.gpg.plugin.ver>
         <maven.bazaarvoice.plugin.ver>0.9</maven.bazaarvoice.plugin.ver>
-        <maven.read.project.properties.plugin.ver>1.0.0</maven.read.project.properties.plugin.ver>
         <apache.rat.plugin.ver>0.13</apache.rat.plugin.ver>
         <org.antlr4.ver>4.8</org.antlr4.ver>
         <akka.http.2.12.ver>10.2.0</akka.http.2.12.ver>