Skip to content

Commit

Permalink
Fix for transformer junit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jschm42 committed Mar 4, 2024
1 parent 0ef68e6 commit dd4772a
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 33 deletions.
53 changes: 31 additions & 22 deletions backend/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2023 Jean Schmitz.
~ Copyright (c) 2023-2024 Jean Schmitz.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
Expand All @@ -16,29 +16,38 @@
-->

<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.talkforgeai</groupId>
<artifactId>talkforgeai</artifactId>
<version>0.1.0-SNAPSHOT</version>
</parent>
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.talkforgeai</groupId>
<artifactId>talkforgeai</artifactId>
<version>0.1.0-SNAPSHOT</version>
</parent>

<artifactId>backend</artifactId>
<packaging>jar</packaging>
<artifactId>backend</artifactId>
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>com.talkforgeai</groupId>
<artifactId>service</artifactId>
<version>0.1.0-SNAPSHOT</version>
</dependency>
<dependencies>
<dependency>
<groupId>com.talkforgeai</groupId>
<artifactId>service</artifactId>
<version>0.1.0-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>net.sourceforge.plantuml</groupId>
<artifactId>plantuml</artifactId>
</dependency>
</dependencies>
<dependency>
<groupId>net.sourceforge.plantuml</groupId>
<artifactId>plantuml</artifactId>
</dependency>

<dependency>
<groupId>com.theokanning.openai-gpt3-java</groupId>
<artifactId>service</artifactId>
</dependency>
<dependency>
<groupId>com.theokanning.openai-gpt3-java</groupId>
<artifactId>api</artifactId>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ public void codeBlockWithLangGetsTransformed() {
<!-- start no-lb -->
<pre>
<code class="language-java">int[] numbers = { 5, 3, 9, 1, 7 };
Arrays.sort(numbers);
</code>
<code class="language-java"
>int[] numbers = { 5, 3, 9, 1, 7 };
Arrays.sort(numbers);</code>
</pre>
<!-- end no-lb -->
Expand Down Expand Up @@ -67,16 +67,15 @@ public void codeBlockWithoutLangGetsTransformed() {

String expected = """
Here's an example of how to use the "Arrays.sort()" method:
<!-- start no-lb -->
<pre>
<code >int[] numbers = { 5, 3, 9, 1, 7 };
Arrays.sort(numbers);
</code>
Arrays.sort(numbers);</code>
</pre>
<!-- end no-lb -->
<smiley>""";

CodeBlockTransformer transformer = new CodeBlockTransformer();
Expand Down
33 changes: 33 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,39 @@
<artifactId>plantuml</artifactId>
<version>1.2023.11</version>
</dependency>

<!-- https://mvnrepository.com/artifact/com.theokanning.openai-gpt3-java/client -->
<dependency>
<groupId>com.theokanning.openai-gpt3-java</groupId>
<artifactId>client</artifactId>
<version>0.18.2</version>
</dependency>
<dependency>
<groupId>com.theokanning.openai-gpt3-java</groupId>
<artifactId>service</artifactId>
<version>0.18.2</version>
</dependency>
<dependency>
<groupId>com.theokanning.openai-gpt3-java</groupId>
<artifactId>api</artifactId>
<version>0.18.2</version>
</dependency>

</dependencies>
</dependencyManagement>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.5</version>
<configuration>
<skipTests>false</skipTests>
<testFailureIgnore>true</testFailureIgnore>
<forkMode>once</forkMode>
</configuration>
</plugin>
</plugins>
</build>
</project>
5 changes: 2 additions & 3 deletions service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,20 @@
<groupId>net.sourceforge.plantuml</groupId>
<artifactId>plantuml</artifactId>
</dependency>

<!-- https://mvnrepository.com/artifact/com.theokanning.openai-gpt3-java/client -->
<dependency>
<groupId>com.theokanning.openai-gpt3-java</groupId>
<artifactId>client</artifactId>
<version>0.18.2</version>
</dependency>
<dependency>
<groupId>com.theokanning.openai-gpt3-java</groupId>
<artifactId>service</artifactId>
<version>0.18.2</version>
</dependency>
<dependency>
<groupId>com.theokanning.openai-gpt3-java</groupId>
<artifactId>api</artifactId>
<version>0.18.2</version>
</dependency>

</dependencies>
</project>

0 comments on commit dd4772a

Please sign in to comment.