Skip to content

Commit

Permalink
Merge pull request #37 from HHS/dev
Browse files Browse the repository at this point in the history
Taskit v3.2.0 release
  • Loading branch information
bischoffz authored Feb 28, 2024
2 parents 18f3799 + 39586be commit 598dd7c
Show file tree
Hide file tree
Showing 60 changed files with 608 additions and 476 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dev_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Build Util
run: mvn clean install -DskipTests --file util/pom.xml
- name: Build Taskit
run: mvn clean package --file pom.xml
run: mvn clean install --file pom.xml

# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
# - name: Update dependency graph
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ Distributed under the GPLv3 License. See [LICENSE](LICENSE) for more information
[tag-url]: https://github.com/HHS/ASPR-ms-taskit/releases/latest
[license-shield]: https://img.shields.io/github/license/HHS/ASPR-ms-taskit
[license-url]: LICENSE
[dev-build-shield]: https://img.shields.io/github/actions/workflow/status/HHS/ASPR-ms-taskit/dev-pre-mavencentral.yml?label=dev-build
[dev-build-url]: https://github.com/HHS/ASPR-ms-taskit/actions/workflows/dev-pre-mavencentral.yml
[build-shield]: https://img.shields.io/github/actions/workflow/status/HHS/ASPR-ms-taskit/create_release_on_tag.yml?label=release-build
[build-url]: https://github.com/HHS/ASPR-ms-taskit/actions/workflows/create_release_on_tag.yml
[dev-build-shield]: https://img.shields.io/github/actions/workflow/status/HHS/ASPR-ms-taskit/dev_build.yml?label=dev-build
[dev-build-url]: https://github.com/HHS/ASPR-ms-taskit/actions/workflows/dev_build.yml
[build-shield]: https://img.shields.io/github/actions/workflow/status/HHS/ASPR-ms-taskit/release_build.yml?label=release-build
[build-url]: https://github.com/HHS/ASPR-ms-taskit/actions/workflows/release_build.yml.yml

6 changes: 3 additions & 3 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
<!-- parent -->
<parent>
<groupId>gov.hhs.aspr.ms.taskit</groupId>
<artifactId>taskit</artifactId>
<artifactId>parent</artifactId>
<version>${revision}</version>
</parent>

<!-- Artifact -->
<groupId>gov.hhs.aspr.ms.taskit</groupId>
<artifactId>taskit-core</artifactId>
<artifactId>core</artifactId>
<packaging>jar</packaging>

<name>Translation and Serialization Toolkit: Core</name>
<name>Translation and Serialization Toolkit (Taskit): Core</name>
<description>The core components of a toolkit that aids in the conversion between two Java objects, primiarly for use with coverting between an input Java object and a application Java object.</description>

</project>
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package gov.hhs.aspr.ms.taskit.core;

import util.errors.ContractError;
import gov.hhs.aspr.ms.util.errors.ContractError;

public enum CoreTranslationError implements ContractError {

CIRCULAR_TRANSLATOR_DEPENDENCIES("Circular translator dependencies: "),
DUPLICATE_CLASSREF("Duplicate ClassRef"),
DUPLICATE_CLASSREF_SCENARIO_PAIR("Duplicate ClassRef and Scenario Pair"),
DUPLICATE_OUTPUT_PATH_KEY("Duplicate ClassRef and Scenario Pair"),
DUPLICATE_DEPENDENCY("Duplicate Dependency"),
DUPLICATE_INPUT_PATH("Duplicate Input Path"),
DUPLICATE_OUTPUT_PATH("Duplicate Output Path"),
Expand Down Expand Up @@ -40,7 +40,9 @@ public enum CoreTranslationError implements ContractError {
"Translators were added to the builder but were not initialized. Make sure to call super.initTranslators() during your custom engine build method"),
UNKNOWN_OBJECT("Object is not Translatable by this TranslationSpec"),
UNKNWON_TRANSLATION_ENGINE_TYPE("Translation Engine Type was not set"),
UNKNOWN_CLASSREF("No object has been read in with the specified classRef");
UNKNOWN_CLASSREF("No object has been read in with the specified classRef"),
UNKNOWN_OUTPUT_PATH_KEY("The provided key does not exist"),
MISSING_OUTPUT_PATH_KEYS("The number of keys provided does not match the number of objects to be written");

private final String description;

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
import java.util.Set;
import java.util.stream.Collectors;

import util.errors.ContractException;
import util.graph.Graph;
import util.graph.GraphDepthEvaluator;
import util.graph.Graphs;
import util.graph.MutableGraph;
import gov.hhs.aspr.ms.util.errors.ContractException;
import gov.hhs.aspr.ms.util.graph.Graph;
import gov.hhs.aspr.ms.util.graph.GraphDepthEvaluator;
import gov.hhs.aspr.ms.util.graph.Graphs;
import gov.hhs.aspr.ms.util.graph.MutableGraph;

/**
* Main Translator Class Initializes all {@link TranslationSpec}s and maintains
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.util.Objects;

import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* Core implementation of the {@link BaseTranslationSpec} that must be
Expand Down Expand Up @@ -112,24 +112,24 @@ public boolean equals(Object obj) {
}

/**
* Returns the class of the app object
* Given an inputObject, converts it to it's appObject equivalent
*/
public abstract Class<A> getAppObjectClass();
protected abstract A convertInputObject(I inputObject);

/**
* Returns the class of the input object
* Given an appObject, converts it to it's inputObject equivalent
*/
public abstract Class<I> getInputObjectClass();
protected abstract I convertAppObject(A appObject);

/**
* Given an inputObject, converts it to it's appObject equivalent
* Returns the class of the app object
*/
protected abstract A convertInputObject(I inputObject);
public abstract Class<A> getAppObjectClass();

/**
* Given an appObject, converts it to it's inputObject equivalent
* Returns the class of the input object
*/
protected abstract I convertAppObject(A appObject);
public abstract Class<I> getInputObjectClass();

void checkInit() {
if (!this.initialized) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.util.Set;
import java.util.function.Consumer;

import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* The Translator class serves as a wrapper around one or more
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package gov.hhs.aspr.ms.taskit.core;

import util.errors.ContractException;
import gov.hhs.aspr.ms.util.errors.ContractException;

/**
* Context that is used by {@link Translator}s
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ public <U, M extends U> void writeOutput(Path path, M appObject, Optional<Class<
FileWriter writer = new FileWriter(path.toFile());
writer.write(stringToWrite);
writer.flush();
writer.close();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import org.junit.jupiter.api.Test;

import util.annotations.UnitTestMethod;
import gov.hhs.aspr.ms.util.annotations.UnitTestMethod;

public class AT_CoreTranslationError {

Expand Down
Loading

0 comments on commit 598dd7c

Please sign in to comment.