Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature activity type value mappers #1294

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

Alexander-Da-Great
Copy link

@Alexander-Da-Great Alexander-Da-Great commented Jan 22, 2024

Description

This pr adds support for using activity types as parameters from within activities. New type rules were added to recognize activity types and point to their value mappers when generating the activityMapper code. This ability required the addition of ActivityMapperRecords and ActivityValueMapperRecords for InputType records to point to the correct locations for the old ActivityMappers and new ActivityValueMappers as part of the MissionModelGenerator. One aditional autogenerated file called ActivityValueMappers will be added to the generate files of a model and will contain helper methods to retrieve value mappers for activity types to be used by activityMapper files. The ActivityValueMapper record is the interstitial layer which takes in an activityMapper and returns a valid valueMapper for said activity.

A new activity called RussianNestingBanana illustrates the various use cases for these types of parameters and has been added to the Banananation model.

Verification

There is a unit test script called RussianNestingActivityTest which tests we are able to serialize an example activity utilizing this feature (RussianNestingBanana) and simulate with calls to child activities.

Documentation

At the moment we just have comments in the RussianNestingBananaActivity but we could add info to the docs if necessary.

Future work

Perhaps we will need further testing in aerie. Further work on the aerie-ui and database is not necessary to allow this pr to work, however, applying custom UI elements for selecting presets to apply on specific activity type parameters would be very useful to help certain pointing planning workflows for the clipper model.

@Alexander-Da-Great Alexander-Da-Great force-pushed the feature--activity-type-value-mappers branch from 0577c0a to 33291f4 Compare January 22, 2024 22:14
@Alexander-Da-Great Alexander-Da-Great marked this pull request as ready for review January 23, 2024 18:11
@Alexander-Da-Great Alexander-Da-Great requested a review from a team as a code owner January 23, 2024 18:11
@Alexander-Da-Great Alexander-Da-Great force-pushed the feature--activity-type-value-mappers branch from bd321c8 to 90968ac Compare January 23, 2024 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants