Skip to content

Commit

Permalink
Merge pull request #47 from HHS/dev
Browse files Browse the repository at this point in the history
Taskit 4.0.0
  • Loading branch information
bischoffz committed Apr 15, 2024
2 parents f00c050 + 9cfa3c4 commit 7d556d5
Show file tree
Hide file tree
Showing 16 changed files with 269 additions and 650 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dev_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
branches-ignore: ["main"]

jobs:
build:
dev-build:
runs-on: ubuntu-latest
steps:
- name: Checkout Taskit
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
branches: ["main"]

jobs:
create-release:
release:
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/release_pr_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
branches: ["main"]

jobs:
main-build:
release-pr-build:
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -26,6 +26,16 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'

- name: Get Version
run: |
echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout --file pom.xml)" >> "$GITHUB_ENV"
- name: Version Is Snapshot
if: ${{ endsWith(env.version, 'SNAPSHOT') }}
run: |
echo "::error Version is a SNAPSHOT. Update version to proper version."
exit 1
- name: Build Taskit
run: mvn clean install -Pjavadoc,jacoco --file pom.xml
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ See [TestObject](protobuf/src/main/proto/gov/hhs/aspr/ms/taskit/protobuf/testobj
- Maven 3.8.x
- Java 17
- Favorite IDE for Java development
- Modeling Util located [here](https://github.com/HHS/ASPR-ms-util)
- Modeling Utilities located [here](https://github.com/HHS/ASPR-ms-util)

*Note that Modeling Util is in Maven Central, so there is no need to download and build it.
*Note that Modeling Utilities is in Maven Central, so there is no need to clone and build it.

### Building
To build this project:
Expand Down
3 changes: 2 additions & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

<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>

<url>https://github.com/HHS/aspr-ms-taskit</url>

<!-- SCM Information -->
<scm>
<connection>scm:git:git://github.com/HHS/aspr-ms-taskit.git</connection>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,54 +4,48 @@

public enum CoreTranslationError implements ContractError {

CIRCULAR_TRANSLATOR_DEPENDENCIES("Circular translator dependencies: "),
DUPLICATE_CLASSREF("Duplicate ClassRef"),
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"),
DUPLICATE_TRANSLATOR("Duplicate Translator"),
DUPLICATE_TRANSLATION_SPEC("Duplicate TranslationSpec"),
INVALID_TRANSLATION_ENGINE_CLASS_REF(
"The given Translation Engine classRef does not match the class of the actual Translation Engine"),
INVALID_TRANSLATION_ENGINE_BUILDER_CLASS_REF(
"The given Translation Engine Builder classRef does not match the class of the actual Translation Engine Builder"),
INVALID_OUTPUT_CLASSREF("The given class does not have a output file path associated with it."),
INVALID_OUTPUT_PATH(
CIRCULAR_TRANSLATOR_DEPENDENCIES("Circular translator dependencies: "),
DUPLICATE_CLASSREF("Duplicate ClassRef"),
DUPLICATE_DEPENDENCY("Duplicate Dependency"),
DUPLICATE_INPUT_PATH("Duplicate Input Path"),
DUPLICATE_TRANSLATOR("Duplicate Translator"),
DUPLICATE_TRANSLATION_SPEC("Duplicate TranslationSpec"),
INVALID_INPUT_PATH("The given input file path does not exist"),
INVALID_OUTPUT_PATH(
"The given output file path does not exist. While the file will be created on write, the directory will not."),
INVALID_INPUT_PATH("The given input file path does not exist"),
MISSING_TRANSLATOR("Missing Translator: "),
NO_TRANSLATION_ENGINES("There are no translation engines added to this controller."),
NULL_TRANSLATOR_ID("Null TranslatorId"),
NULL_TRANSLATOR("Null Translator"),
NULL_TRANSLATION_ENGINE_BUILDER("Null Translation Engine Builder"),
NULL_TRANSLATION_ENGINE("Null Translation Engine"),
NULL_OBJECT_FOR_TRANSLATION("The object to be translated was null"),
NULL_INIT_CONSUMER("Null Initilizer Consumer"),
NULL_DEPENDENCY("Null dependency"),
NULL_PATH("Null Path"),
NULL_CLASS_REF("Null Class Ref"),
NULL_TRANSLATION_SPEC("Null TranslationSpec"),
NULL_TRANSLATION_SPEC_APP_CLASS("Null TranslationSpec App Class"),
NULL_TRANSLATION_SPEC_INPUT_CLASS("Null TranslationSpec Input Class"),
UNKNOWN_TRANSLATION_SPEC("No translation spec was provided for the given class"),
UNITIALIZED_TRANSLATION_SPEC("TranslationSpec not initialized"),
UNINITIALIZED_TRANSLATORS(
"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_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");
INVALID_TRANSLATION_ENGINE_BUILDER_CLASS_REF(
"The given Translation Engine Builder classRef does not match the class of the actual Translation Engine Builder"),
MISSING_TRANSLATOR("Missing Translator: "),
NO_TRANSLATION_ENGINES("There are no translation engines added to this controller."),
NULL_CLASS_REF("Null Class Ref"),
NULL_DEPENDENCY("Null dependency"),
NULL_INIT_CONSUMER("Null Initilizer Consumer"),
NULL_OBJECT_FOR_TRANSLATION("The object to be translated was null"),
NULL_PATH("Null Path"),
NULL_TRANSLATION_ENGINE("Null Translation Engine"),
NULL_TRANSLATION_ENGINE_BUILDER("Null Translation Engine Builder"),
NULL_TRANSLATION_SPEC("Null TranslationSpec"),
NULL_TRANSLATION_SPEC_APP_CLASS("Null TranslationSpec App Class"),
NULL_TRANSLATION_SPEC_INPUT_CLASS("Null TranslationSpec Input Class"),
NULL_TRANSLATOR("Null Translator"),
NULL_TRANSLATOR_ID("Null TranslatorId"),
UNINITIALIZED_TRANSLATION_SPEC("TranslationSpec not initialized"),
UNINITIALIZED_TRANSLATORS(
"Translators were added to the builder but were not initialized. Make sure to call super.initTranslators() during your custom engine build method"),
UNKNOWN_CLASSREF("No object has been read in with the specified classRef"),
UNKNOWN_OBJECT("Object is not Translatable by this TranslationSpec"),
UNKNWON_TRANSLATION_ENGINE_TYPE("Translation Engine Type was not set"),
UNKNOWN_TRANSLATION_SPEC("No translation spec was provided for the given class"),
UNSUPPORTED_VERSION("The given version is not supported");

private final String description;
private final String description;

private CoreTranslationError(final String description) {
this.description = description;
}
private CoreTranslationError(final String description) {
this.description = description;
}

@Override
public String getDescription() {
return description;
}
@Override
public String getDescription() {
return description;
}
}
Loading

0 comments on commit 7d556d5

Please sign in to comment.