-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit af25449
Showing
164 changed files
with
1,542 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Java Stuff | ||
|
||
# Compiled class file | ||
*.class | ||
|
||
# Log file | ||
*.log | ||
|
||
# BlueJ files | ||
*.ctxt | ||
|
||
# Mobile Tools for Java (J2ME) | ||
.mtj.tmp/ | ||
|
||
# Package Files # | ||
*.jar | ||
*.war | ||
*.nar | ||
*.ear | ||
*.zip | ||
*.tar.gz | ||
*.rar | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
|
||
|
||
## Gradle Stuff | ||
|
||
.gradle | ||
/build/ | ||
|
||
# Ignore Gradle GUI config | ||
gradle-app.setting | ||
|
||
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) | ||
!gradle-wrapper.jar | ||
|
||
# Cache of project | ||
.gradletasknamecache | ||
|
||
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 | ||
# gradle/wrapper/gradle-wrapper.properties | ||
|
||
# IDE | ||
.idea | ||
|
||
# Mac Stuff | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM openjdk:8 AS build | ||
WORKDIR /home | ||
# Grab Gradle first so it can be cached | ||
COPY gradle gradle | ||
COPY gradlew . | ||
RUN ./gradlew --version | ||
|
||
COPY settings.gradle . | ||
COPY build.gradle.kts . | ||
COPY config config | ||
COPY igs igs | ||
COPY src src | ||
|
||
RUN ./gradlew build | ||
RUN tar -xvf build/distributions/InfernoValidationService-*.tar | ||
|
||
FROM openjdk:8 | ||
WORKDIR /home | ||
ENV JAVA_OPTS="-XX:MaxRAMPercentage=75.0" | ||
|
||
COPY --from=build /home/InfernoValidationService-* . | ||
COPY igs igs | ||
RUN bin/InfernoValidationService prepare | ||
EXPOSE 4567 | ||
|
||
CMD ["./bin/InfernoValidationService"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# HL7 FHIR Validation Service | ||
|
||
The HL7® FHIR® Validation Service provides a persistent service for executing the | ||
[FHIR® Validator](https://wiki.hl7.org/Using_the_FHIR_Validator). It is intended to provide validation capabilities | ||
to other applications that integrate it. | ||
|
||
## Installation | ||
|
||
**System Requirements:** The Validation Service requires Java 1.8 or above. | ||
|
||
## Running Locally with Java | ||
|
||
To build and run the test suite: | ||
|
||
### *nix | ||
```shell script | ||
./gradlew build check test | ||
``` | ||
|
||
### Windows | ||
```shell script | ||
gradlew.bat build check test | ||
``` | ||
|
||
## Running with Docker | ||
|
||
Build | ||
```shell script | ||
./build_docker.sh | ||
``` | ||
Run | ||
```shell script | ||
docker run -p 4567:4567 hl7_validator | ||
``` | ||
## Contact Us | ||
The Inferno development team can be reached by email at [email protected]. Inferno also has a dedicated [HL7 FHIR chat channel](https://chat.fhir.org/#narrow/stream/153-inferno). | ||
|
||
## License | ||
|
||
Copyright 2019 The MITRE Corporation | ||
|
||
Licensed 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
plugins { | ||
java | ||
application | ||
checkstyle | ||
jacoco | ||
} | ||
|
||
group = "org.mitre" | ||
version = "0.0.1" | ||
|
||
repositories { | ||
mavenCentral() | ||
maven { | ||
url = uri("https://oss.sonatype.org/content/repositories/snapshots/") | ||
} | ||
} | ||
|
||
dependencies { | ||
// https://chat.fhir.org/#narrow/stream/179166-implementers/topic/New.20validator.20JAR.20location | ||
// the ig-publisher uses this one too | ||
// https://github.com/HL7/fhir-ig-publisher/blob/master/pom.xml#L68 | ||
implementation("ca.uhn.hapi.fhir", "org.hl7.fhir.validation", "4.1.22-SNAPSHOT") | ||
|
||
// validator dependencies (should be able to get these automatically?) | ||
implementation("org.apache.commons","commons-compress", "1.19") | ||
implementation("org.apache.httpcomponents", "httpclient", "4.5.10") | ||
implementation("org.fhir", "ucum", "1.0.2") | ||
|
||
// GSON for our JSON needs | ||
implementation("com.google.code.gson", "gson", "2.8.6") | ||
|
||
// Web Server | ||
implementation("com.sparkjava", "spark-core", "2.9.1") | ||
|
||
// Testing stuff | ||
testImplementation("org.junit.jupiter", "junit-jupiter", "5.5.2") | ||
} | ||
|
||
configure<JavaPluginConvention> { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
|
||
application { | ||
mainClassName = "org.mitre.inferno.App" | ||
} | ||
|
||
checkstyle { | ||
toolVersion = "8.25" | ||
} | ||
|
||
tasks.test { | ||
useJUnitPlatform() | ||
testLogging { | ||
events("passed", "skipped", "failed") | ||
} | ||
} | ||
|
||
val testCoverage by tasks.registering { | ||
group = "verification" | ||
description = "Runs the unit tests with coverage." | ||
|
||
dependsOn(":test", ":jacocoTestReport") | ||
val jacocoTestReport = tasks.findByName("jacocoTestReport") | ||
jacocoTestReport?.mustRunAfter(tasks.findByName("test")) | ||
} | ||
|
||
val fatJar = task("fatJar", type = Jar::class) { | ||
baseName = "${project.name}-fat" | ||
manifest { | ||
attributes["Implementation-Title"] = "JNferno" | ||
attributes["Implementation-Version"] = archiveVersion | ||
attributes["Main-Class"] = "org.mitre.inferno.rest.Validate" | ||
} | ||
from(configurations.runtimeClasspath.get().map({ if (it.isDirectory) it else zipTree(it) })) | ||
with(tasks.jar.get() as CopySpec) | ||
} | ||
|
||
tasks { | ||
"build" { | ||
dependsOn(fatJar) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
docker build -t hl7_validator . |
Oops, something went wrong.