Skip to content

Commit

Permalink
Taskit 3.0.0 (#5)
Browse files Browse the repository at this point in the history
* update version 3.0.0-SNAPSHOT

* Allow multiple translation engines; Taskit 3.0.0 (#4)

* initial design impl
fix and add tests

* Update README.md

* Update README.md

* move translators to translation engine

* add parentchildmap to engine
add missing tests
jacoco back to 100%

* fix translation engine builder inheritance issue

* fix for tests

* method scope reduction where possible

* update engine to use paths instead of readers

* update engine to use paths instead of writers

* update to 3.0.0 proper
  • Loading branch information
bischoffz authored Nov 28, 2023
1 parent 379cc93 commit 7f56250
Show file tree
Hide file tree
Showing 27 changed files with 1,344 additions and 996 deletions.
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
[![GPL LICENSE][license-shield]][license-url]
[![GitHub tag (with filter)][tag-shield]][tag-url]
[![GitHub contributors][contributors-shield]][contributors-url]
[![GitHub Workflow Status (with event)][dev-build-shield]][dev-build-url]
[![GitHub Workflow Status (with event)][build-shield]][build-url]

# Translation And Serialization Toolkit
A toolkit made to help with converting between input files and Java Objects. This will herein be reffered to as Taskit.
Expand Down Expand Up @@ -46,8 +49,7 @@ See [TestObject](protobuf/src/main/proto/gov/hhs/aspr/ms/taskit/protobuf/testobj
- Modeling Util located [here](https://github.com/HHS/ASPR-ms-util)

## Building
To build, first navigate into the ```core``` directory and run the command ```mvn clean install```
Then go into the ```protobuf``` directory and run the command ```mvn clean install```
To build, navigate into the root directory and run the command ```mvn clean install```

## Documentation
Documentation has yet to be created. In the interim, the code is mostly commented and the javadocs do provide good detail with regards to method and class expectations.
Expand All @@ -59,7 +61,12 @@ Distributed under the GPLv3 License. See [LICENSE](LICENSE) for more information
<!-- MARKDOWN LINKS & IMAGES -->
[contributors-shield]: https://img.shields.io/github/contributors/HHS/ASPR-ms-taskit
[contributors-url]: https://github.com/HHS/ASPR-ms-taskit/graphs/contributors
<!-- [tag-shield]: https://img.shields.io/github/v/tag/HHS/ASPR-ms-util -->
<!-- [tag-url]: https://github.com/HHS/ASPR-8/releases/tag/v4.0.0-RC1 -->
[tag-shield]: https://img.shields.io/github/v/tag/HHS/ASPR-ms-taskit
[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

Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,43 @@

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_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(
"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"),
INVALID_TRANSLATION_ENGINE(
"The given Translation Engine classRef does not match the class of the actual Translation Engine"),
INVALID_TRANSLATION_ENGINE_BUILDER(
"The given Translation Engine Builder classRef does not match the class of the actual Translation Engine Builder"),
DUPLICATE_TRANSLATOR("Duplicate Translator"),
MISSING_TRANSLATOR("Missing Translator: "),
CIRCULAR_TRANSLATOR_DEPENDENCIES("Circular translator dependencies: "),
NULL_INIT_CONSUMER("Null Initilizer Consumer"),
NULL_DEPENDENCY("Null dependency"),
DUPLICATE_DEPENDENCY("Duplicate Dependency"),
NULL_PATH("Null Path"),
DUPLICATE_INPUT_PATH("Duplicate Input Path"),
INVALID_INPUT_PATH("The given input file path does not exist"),
NULL_CLASS_REF("Null Class Ref"),
INVALID_OUTPUT_CLASSREF("The given class does not have a output file path associated with it."),
DUPLICATE_OUTPUT_PATH("Duplicate Output Path"),
INVALID_OUTPUT_PATH(
"The given output file path does not exist. While the file will be created on write, the directory will not."),
DUPLICATE_CLASSREF_SCENARIO_PAIR("Duplicate ClassRef and Scenario Pair"),
DUPLICATE_CLASSREF("Duplicate ClassRef"),
UNKNOWN_CLASSREF("No object has been read in with the specified classRef"),
NULL_TRANSLATION_SPEC("Null TranslationSpec"),
NULL_TRANSLATION_SPEC_APP_CLASS("Null TranslationSpec App Class"),
NULL_TRANSLATION_SPEC_INPUT_CLASS("Null TranslationSpec Input Class"),
DUPLICATE_TRANSLATION_SPEC("Duplicate TranslationSpec"),
UNKNOWN_TRANSLATION_SPEC("No translation spec was provided for the given class"),
UNITIALIZED_TRANSLATION_SPEC("TranslationSpec not initialized"),
UNKNOWN_OBJECT("Object is not Translatable by this TranslationSpec");
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");

private final String description;

Expand Down
Loading

0 comments on commit 7f56250

Please sign in to comment.