Skip to content

Commit

Permalink
Update to Taskit 3.0.0 (#4)
Browse files Browse the repository at this point in the history
* initial changes

* update version
update taskit version

* add manual test

* step up test code to work with taskit 3.0.0

* format, organize imports, clean up warns

* fix tests

* make person properties input file more dense

* update manual test for person props

* update to taskit 3.0.0 proper

* update actions
  • Loading branch information
bischoffz authored Nov 28, 2023
1 parent acb6d88 commit 48c7465
Show file tree
Hide file tree
Showing 191 changed files with 969 additions and 1,118 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/create_release_on_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
push:
tags:
- 'v*'
branches: ["main_temp"]
branches: ["main"]

jobs:
create-release:
Expand All @@ -26,13 +26,27 @@ jobs:
uses: actions/checkout@v3
with:
repository: HHS/ASPR-ms-taskit
path: taskit
- name: Checkout Util
uses: actions/checkout@v3
with:
repository: HHS/ASPR-ms-util
path: util
- name: Checkout GCM
uses: actions/checkout@v3
with:
repository: HHS/ASPR-8
path: gcm
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build Util
run: mvn clean install -DskipTests --file util/pom.xml
- name: Build GCM
run: mvn clean install -DskipTests --file gcm/gcm/pom.xml
- name: Build Taskit
run: mvn clean install -DskipTests --file taskit/pom.xml
- name: Build GCM Taskit
Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/dev-pre-mavencentral.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ name: Development Build Pre Maven Central

on:
push:
branches: [ "dev_temp" ]
branches: [ "dev" ]
paths:
- '**.xml'
- '**.java'
pull_request:
branches: [ "dev_temp", "main_temp" ]
branches: [ "dev" ]

jobs:
build:
Expand All @@ -28,12 +28,26 @@ jobs:
with:
repository: HHS/ASPR-ms-taskit
path: taskit
- name: Checkout Util
uses: actions/checkout@v3
with:
repository: HHS/ASPR-ms-util
path: util
- name: Checkout GCM
uses: actions/checkout@v3
with:
repository: HHS/ASPR-8
path: gcm
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build Util
run: mvn clean install -DskipTests --file util/pom.xml
- name: Build GCM
run: mvn clean install -DskipTests --file gcm/gcm/pom.xml
- name: Build Taskit
run: mvn clean install -DskipTests --file taskit/pom.xml
- name: Build GCM Taskit
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/pr_for_main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Pull Request for Main Build

on:
pull_request:
branches: [ "main" ]

jobs:
main-build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout GCM Taskit
uses: actions/checkout@v3
- name: Checkout Taskit
uses: actions/checkout@v3
with:
repository: HHS/ASPR-ms-taskit
path: taskit
- name: Checkout Util
uses: actions/checkout@v3
with:
repository: HHS/ASPR-ms-util
path: util
- name: Checkout GCM
uses: actions/checkout@v3
with:
repository: HHS/ASPR-8
path: gcm
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build Util
run: mvn clean install -DskipTests --file util/pom.xml
- name: Build GCM
run: mvn clean install -DskipTests --file gcm/gcm/pom.xml
- name: Build Taskit
run: mvn clean install -DskipTests --file taskit/pom.xml
- name: Build GCM Taskit
run: mvn clean install -Prelease --file protobuf/pom.xml
4 changes: 2 additions & 2 deletions protobuf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<!-- Properties -->
<properties>
<!-- basic project properties -->
<revision>2.4.0</revision>
<revision>2.5.0</revision>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
Expand All @@ -58,7 +58,7 @@
<maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version>

<!-- dependency versions -->
<taskit-protobuf.version>2.4.0</taskit-protobuf.version>
<taskit-protobuf.version>3.0.0</taskit-protobuf.version>
<proto-definitions.version>1.12.0</proto-definitions.version>
<gcm.version>4.0.0</gcm.version>
<protoc.version>3.21.12</protoc.version>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.translationSpecs;

import gov.hhs.aspr.ms.gcm.nucleus.PlanData;
import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.input.PlanDataInput;
import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec;
import gov.hhs.aspr.ms.gcm.nucleus.PlanData;

/**
* TranslationSpec that defines how to convert between
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@

/**
* TranslationSpec that defines how to convert between
* {@linkplain PlanQueueDataInput} and
* {@linkplain PlanQueueData}
* {@linkplain PlanQueueDataInput} and {@linkplain PlanQueueData}
*/
public class PlanQueueDataTranslationSpec extends ProtobufTranslationSpec<PlanQueueDataInput, PlanQueueData> {

Expand Down Expand Up @@ -43,8 +42,7 @@ protected PlanQueueData convertInputObject(PlanQueueDataInput inputObject) {
protected PlanQueueDataInput convertAppObject(PlanQueueData appObject) {
PlanQueueDataInput.Builder builder = PlanQueueDataInput.newBuilder();

builder
.setActive(appObject.isActive())
builder.setActive(appObject.isActive())
.setArrivalId(appObject.getArrivalId())
.setPlannerId(appObject.getPlannerId())
.setTime(appObject.getTime());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.translationSpecs;

import gov.hhs.aspr.ms.gcm.nucleus.Planner;
import gov.hhs.aspr.ms.gcm.taskit.protobuf.nucleus.input.PlannerInput;
import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec;
import gov.hhs.aspr.ms.gcm.nucleus.Planner;

/**
* TranslationSpec that defines how to convert between {@linkplain PlannerInput}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@

/**
* TranslationSpec that defines how to convert between
* {@linkplain SimulationStateInput} and
* {@linkplain SimulationState}
* {@linkplain SimulationStateInput} and {@linkplain SimulationState}
*/
public class SimulationStateTranslationSpec extends ProtobufTranslationSpec<SimulationStateInput, SimulationState> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

import com.google.protobuf.Any;

import gov.hhs.aspr.ms.gcm.plugins.globalproperties.datamanagers.GlobalPropertiesPluginData;
import gov.hhs.aspr.ms.gcm.plugins.globalproperties.support.GlobalPropertyId;
import gov.hhs.aspr.ms.gcm.plugins.util.properties.PropertyDefinition;
import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.globalproperties.data.input.GlobalPropertiesPluginDataInput;
import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.support.input.PropertyDefinitionInput;
import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.support.input.PropertyDefinitionMapInput;
import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.properties.support.input.PropertyValueMapInput;
import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec;
import gov.hhs.aspr.ms.gcm.plugins.globalproperties.datamanagers.GlobalPropertiesPluginData;
import gov.hhs.aspr.ms.gcm.plugins.globalproperties.support.GlobalPropertyId;
import gov.hhs.aspr.ms.gcm.plugins.util.properties.PropertyDefinition;

/**
* TranslationSpec that defines how to convert between
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import com.google.protobuf.Any;

import gov.hhs.aspr.ms.gcm.plugins.globalproperties.support.GlobalPropertyDimension;
import gov.hhs.aspr.ms.gcm.plugins.globalproperties.support.GlobalPropertyId;
import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.globalproperties.support.input.GlobalPropertyDimensionInput;
import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.globalproperties.support.input.GlobalPropertyIdInput;
import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec;
import gov.hhs.aspr.ms.gcm.plugins.globalproperties.support.GlobalPropertyDimension;
import gov.hhs.aspr.ms.gcm.plugins.globalproperties.support.GlobalPropertyId;

public class GlobalPropertyDimensionTranslationSpec
extends ProtobufTranslationSpec<GlobalPropertyDimensionInput, GlobalPropertyDimension> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.globalproperties.translationSpecs;

import gov.hhs.aspr.ms.gcm.plugins.globalproperties.support.GlobalPropertyId;
import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.globalproperties.support.input.GlobalPropertyIdInput;
import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec;
import gov.hhs.aspr.ms.gcm.plugins.globalproperties.support.GlobalPropertyId;

/**
* TranslationSpec that defines how to convert between
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.globalproperties.translationSpecs;

import gov.hhs.aspr.ms.gcm.plugins.globalproperties.reports.GlobalPropertyReportPluginData;
import gov.hhs.aspr.ms.gcm.plugins.globalproperties.support.GlobalPropertyId;
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel;
import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.globalproperties.reports.input.GlobalPropertyReportPluginDataInput;
import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.globalproperties.support.input.GlobalPropertyIdInput;
import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.support.input.ReportLabelInput;
import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec;
import gov.hhs.aspr.ms.gcm.plugins.globalproperties.reports.GlobalPropertyReportPluginData;
import gov.hhs.aspr.ms.gcm.plugins.globalproperties.support.GlobalPropertyId;
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel;

/**
* TranslationSpec that defines how to convert between
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.globalproperties.translationSpecs;

import gov.hhs.aspr.ms.gcm.plugins.globalproperties.testsupport.TestGlobalPropertyId;
import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.globalproperties.testsupport.input.TestGlobalPropertyIdInput;
import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec;
import gov.hhs.aspr.ms.gcm.plugins.globalproperties.testsupport.TestGlobalPropertyId;

/**
* TranslationSpec that defines how to convert between
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.translationSpecs;

import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupId;
import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupIdInput;
import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec;
import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupId;

/**
* TranslationSpec that defines how to convert between {@linkplain GroupIdInput}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.translationSpecs;

import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupMemberFilter;
import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupIdInput;
import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupMemberFilterInput;
import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec;
import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupMemberFilter;

public class GroupMemberFilterTranslationSpec
extends ProtobufTranslationSpec<GroupMemberFilterInput, GroupMemberFilter> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import com.google.protobuf.Any;

import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupId;
import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupPropertyDimension;
import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupPropertyId;
import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupIdInput;
import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupPropertyDimensionInput;
import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupPropertyIdInput;
import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec;
import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupId;
import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupPropertyDimension;
import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupPropertyId;

public class GroupPropertyDimensionTranslationSpec
extends ProtobufTranslationSpec<GroupPropertyDimensionInput, GroupPropertyDimension> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

/**
* TranslationSpec that defines how to convert between
* {@linkplain GroupPropertyIdInput} and
* {@linkplain GroupPropertyId}
* {@linkplain GroupPropertyIdInput} and {@linkplain GroupPropertyId}
*/
public class GroupPropertyIdTranslationSpec extends ProtobufTranslationSpec<GroupPropertyIdInput, GroupPropertyId> {

Expand All @@ -18,8 +17,7 @@ protected GroupPropertyId convertInputObject(GroupPropertyIdInput inputObject) {

@Override
protected GroupPropertyIdInput convertAppObject(GroupPropertyId appObject) {
return GroupPropertyIdInput.newBuilder()
.setId(this.translationEngine.getAnyFromObject(appObject)).build();
return GroupPropertyIdInput.newBuilder().setId(this.translationEngine.getAnyFromObject(appObject)).build();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.translationSpecs;

import gov.hhs.aspr.ms.gcm.plugins.groups.reports.GroupPropertyReportPluginData;
import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupPropertyId;
import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupTypeId;
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel;
import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.reports.input.GroupPropertyReportPluginDataInput;
import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.reports.input.GroupPropertyReportPropertyMap;
import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupPropertyIdInput;
import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupTypeIdInput;
import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.reports.support.input.ReportLabelInput;
import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec;
import gov.hhs.aspr.ms.gcm.plugins.groups.reports.GroupPropertyReportPluginData;
import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupPropertyId;
import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupTypeId;
import gov.hhs.aspr.ms.gcm.plugins.reports.support.ReportLabel;

/**
* TranslationSpec that defines how to convert between
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.translationSpecs;

import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupTypeId;
import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupTypeIdInput;
import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec;
import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupTypeId;

/**
* TranslationSpec that defines how to convert between
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.translationSpecs;

import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupTypeId;
import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupsForPersonAndGroupTypeFilter;
import gov.hhs.aspr.ms.gcm.plugins.partitions.support.Equality;
import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupTypeIdInput;
import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.groups.support.input.GroupsForPersonAndGroupTypeFilterInput;
import gov.hhs.aspr.ms.gcm.taskit.protobuf.plugins.partitions.support.input.EqualityInput;
import gov.hhs.aspr.ms.taskit.protobuf.ProtobufTranslationSpec;
import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupTypeId;
import gov.hhs.aspr.ms.gcm.plugins.groups.support.GroupsForPersonAndGroupTypeFilter;
import gov.hhs.aspr.ms.gcm.plugins.partitions.support.Equality;

public class GroupsForPersonAndGroupTypeFilterTranslationSpec
extends ProtobufTranslationSpec<GroupsForPersonAndGroupTypeFilterInput, GroupsForPersonAndGroupTypeFilter> {
Expand Down
Loading

0 comments on commit 48c7465

Please sign in to comment.