Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9ed1191
add support for v4 CQL
raleigh-g-thompson Dec 11, 2025
39a39bb
fixes issue with missing CqlFormattingProvider
raleigh-g-thompson Dec 11, 2025
1d11683
spotless applied
raleigh-g-thompson Dec 11, 2025
0c0d2d2
fixes issues with Trackable extensions
raleigh-g-thompson Dec 12, 2025
476abd4
add IgStandard Repository support
raleigh-g-thompson Dec 17, 2025
0037cf4
updates IgStandard Repository
raleigh-g-thompson Dec 18, 2025
c5f5bbd
removes unused IgConventionsHelper
raleigh-g-thompson Dec 18, 2025
1ab51c4
code clean-up
raleigh-g-thompson Dec 19, 2025
3e0918b
logging for test debugging when run in github
raleigh-g-thompson Dec 19, 2025
399be17
disabled test
raleigh-g-thompson Dec 19, 2025
1fab7a6
spotless applied
raleigh-g-thompson Dec 19, 2025
0c60a6a
adds converters tests
raleigh-g-thompson Dec 19, 2025
df70e89
adds converters multi-line test
raleigh-g-thompson Dec 19, 2025
5b3943d
spotless applied
raleigh-g-thompson Dec 19, 2025
e717380
enabled resource/repo test
raleigh-g-thompson Dec 19, 2025
acc71c6
more testing logs - debugging github issues
raleigh-g-thompson Dec 20, 2025
44f3aaf
added @TempDir - debugging github issues
raleigh-g-thompson Dec 20, 2025
e0ea9f0
adds CQL IgStandardContent tests
raleigh-g-thompson Dec 20, 2025
5a9b25b
adds IgStandardRepo test coverage
raleigh-g-thompson Dec 20, 2025
ae4c244
disables failing github test
raleigh-g-thompson Dec 20, 2025
a9064cf
debugging failing github test
raleigh-g-thompson Dec 20, 2025
2f860a8
debugging failing github test
raleigh-g-thompson Dec 20, 2025
0c2ea37
debugging failing github test
raleigh-g-thompson Dec 20, 2025
4dc53e9
debugging failing github test
raleigh-g-thompson Dec 20, 2025
e85dc0d
renames test resource files
raleigh-g-thompson Dec 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

<modelVersion>4.0.0</modelVersion>

<groupId>org.opencds.cqf.cql.ls</groupId>
<artifactId>cql-ls-core</artifactId>
<packaging>jar</packaging>
<name>CQL Language Server Core</name>
Expand All @@ -21,6 +20,16 @@
<dependency>
<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir-cr</artifactId>
<exclusions>
<exclusion>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
</exclusion>
<exclusion>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-common</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package org.opencds.cqf.cql.ls.core.utility;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import kotlinx.io.Buffer;
import kotlinx.io.Source;

public class Converters {

public static String inputStreamToString(InputStream inputStream) throws IOException {
StringBuilder resultStringBuilder = new StringBuilder();
try (BufferedReader br = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8))) {
String line;
while ((line = br.readLine()) != null) {
if (!resultStringBuilder.isEmpty()) resultStringBuilder.append("\n"); // Append newline if needed
resultStringBuilder.append(line);
}
}
return resultStringBuilder.toString();
}

public static Source stringToSource(String text) {
Buffer buffer = new Buffer();
// Write the string to the buffer using a specific character encoding
buffer.write(text.getBytes(), 0, text.length());
// Return the buffer as a Source
return buffer;
}

public static Source inputStreamToSource(InputStream inputStream) throws IOException {
return stringToSource(inputStreamToString(inputStream));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
package org.opencds.cqf.cql.ls.core.utility;

import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import org.junit.jupiter.api.Test;

public class ConvertersTest {

@Test
void should_returnString_when_inputStreamExists() {
var expected = "The quick brown fox jumps over the lazy dog";
try {
var actual =
Converters.inputStreamToString(new ByteArrayInputStream(expected.getBytes(StandardCharsets.UTF_8)));
assertEquals(actual, expected);
} catch (IOException e) {
fail("Unexpected exception thrown. {}", e);
}
}

@Test
void should_returnStringWithLineBreaks_when_inputStreamHasLineBreaksExists() {
var expected = "the first day in spring –\n" + "a wind from the ocean\n" + "but no ocean in sight";
try {
var actual =
Converters.inputStreamToString(new ByteArrayInputStream(expected.getBytes(StandardCharsets.UTF_8)));
assertEquals(actual, expected);
} catch (IOException e) {
fail("Unexpected exception thrown. {}", e);
}
}

@Test
void should_throwIOException_when_inputStreamToStringHasAnIOError() throws IOException {
InputStream inputStream = mock(InputStream.class);
when(inputStream.read()).thenThrow(new IOException("Simulated failure"));
assertThrows(IOException.class, () -> Converters.inputStreamToString(inputStream));
}

@Test
void should_returnSource_when_stringExists() {
var expected = Converters.stringToSource("The quick brown fox jumps over the lazy dog");
assertNotNull(expected);
}

@Test
void should_returnSource_when_inputStreamExists() {
try {
var expected = Converters.inputStreamToSource(new ByteArrayInputStream(
"The quick brown fox jumps over the lazy dog".getBytes(StandardCharsets.UTF_8)));
assertNotNull(expected);
} catch (IOException e) {
fail("Unexpected exception thrown. {}", e);
}
}

@Test
void should_throwIOException_when_inputStreamToSourceCalledWithNull() throws IOException {
InputStream inputStream = mock(InputStream.class);
when(inputStream.read()).thenThrow(new IOException("Simulated failure"));
assertThrows(IOException.class, () -> Converters.inputStreamToSource(inputStream));
}
}
12 changes: 11 additions & 1 deletion debug/server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,17 @@
<dependency>
<groupId>org.opencds.cqf.cql.ls</groupId>
<artifactId>cql-ls-core</artifactId>
<version>3.9.0-SNAPSHOT</version>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
</exclusion>
<exclusion>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-common</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.eclipse.lsp4j</groupId>
Expand Down
4 changes: 1 addition & 3 deletions debug/service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,15 @@
<dependency>
<groupId>org.opencds.cqf.cql.debug</groupId>
<artifactId>cql-debug-server</artifactId>
<version>3.9.0-SNAPSHOT</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
<version>${spring.boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
<version>${spring.boot.version}</version>
</dependency>
</dependencies>
<build>
Expand Down
68 changes: 42 additions & 26 deletions ls/server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

<modelVersion>4.0.0</modelVersion>

<groupId>org.opencds.cqf.cql.ls</groupId>
<artifactId>cql-ls-server</artifactId>
<packaging>jar</packaging>
<name>CQL Language Server - Server Component</name>
Expand All @@ -21,8 +20,9 @@
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-caching-caffeine</artifactId>
<version>7.0.0</version>
<version>8.6.0</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
Expand All @@ -31,18 +31,37 @@
<dependency>
<groupId>org.opencds.cqf.cql.ls</groupId>
<artifactId>cql-ls-core</artifactId>
<version>3.9.0-SNAPSHOT</version>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir-cr</artifactId>
<exclusions>
<exclusion>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
</exclusion>
<exclusion>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-common</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir-jackson</artifactId>
<type>pom</type>
<groupId>org.cqframework</groupId>
<artifactId>cql-formatter</artifactId>
<exclusions>
<exclusion>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
</exclusion>
<exclusion>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-common</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand All @@ -58,26 +77,11 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency
>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</dependency>


<!-- CQL-to-ELM Translator -->
<dependency>
<groupId>info.cqframework</groupId>
<artifactId>cql-to-elm</artifactId>
</dependency>
<dependency>
<groupId>info.cqframework</groupId>
<artifactId>model</artifactId>
</dependency>
<dependency>
<groupId>info.cqframework</groupId>
<artifactId>cql-formatter</artifactId>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</dependency>

<!-- Java implementation of VS Code language server protocol -->
Expand All @@ -95,6 +99,21 @@
<groupId>info.picocli</groupId>
<artifactId>picocli</artifactId>
</dependency>

<!-- Generated annotation -->
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<version>2.1.1</version>
</dependency>

<!-- Testing Only -->
<dependency>
<groupId>org.opencds.cqf.fhir</groupId>
<artifactId>cqf-fhir-test</artifactId>
<scope>test</scope>
</dependency>

</dependencies>
<build>
<pluginManagement>
Expand All @@ -104,9 +123,6 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.0</version>
<configuration>
<release>11</release>
<source>11</source>
<target>11</target>
<failOnError>true</failOnError>
<failOnWarning>true</failOnWarning>
<showWarnings>true</showWarnings>
Expand Down
Loading