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

FPrime Dictionary Support #1542

Merged
merged 9 commits into from
Oct 14, 2024
Merged

FPrime Dictionary Support #1542

merged 9 commits into from
Oct 14, 2024

Conversation

goetzrrGit
Copy link
Contributor

@goetzrrGit goetzrrGit commented Sep 3, 2024

Description

Frontend PR: NASA-AMMOS/aerie-ui#1447

This PR introduces a plugin system for the sequencing server in efforts for Seq 2.0:

Plugin loader: A flexible plugin loader has been added to support various dictionary parsers. By default, the AMPCS dictionary parser is loaded from /ampcs-dictionary-parser/ampcs-parser.js.

Plugin manager: The PluginManager has been implemented to manage the loaded parsers and their use in dictionary uploads.

Dictionary parsing: Dictionary uploads now leverage the parsers provided by the PluginManager, allowing for more diverse dictionary formats.

Nested repeat arguments: Support for nested repeat arguments has been added to the eDSL generation, enabling better handling of Fprime dictionaries. Sequence expansion is experimental with FPrime dictionaries

New environment variable: A new environment variable has been introduced to specify the path to a custom dictionary parser, providing flexibility in parser selection.

Dictionary parser plugins: Two new plugins have been created:

  • AMPCS Dictionary Parser Plugin: This plugin moves the parsing code from the sequencing server into a separate Node.js project, built using Gradlew assemble.

  • FPrime Dictionary Parser Plugin: This plugin is also a Node.js project, built using gradlew assemble from the sequencing server.

Sequencing server configuration: The sequencing server has been configured to build the Aerie-supported dictionary parser plugins.

Testing:

  1. In the docker-compose file uncomment line DICTIONARY_PARSER_PLUGIN to use the FPrime parser
  2. Build the sequencing server ./gradlew sequence-server:clean; ./gradlew sequencing-server:assemble;
  3. Destroy and Rebuild the sequencing server container
  4. Ensure you use the UI branch linked to this PR.
  5. You can now upload the FPrime dictionary via the UI under the 'Dictionary Section'. ./sequencing-server/plugins/fprime-dictionary-parser/test/dictionary/RefTopologyDictionary.json
  6. Git Clone the aerie-fprime-adaptation and build the adaptation. Use the readme
  7. Upload the adaptation via the UI under the 'Dictionary Section'
  8. Make a Parcel containing the FPrime dictionary and adaptation
  9. With the Sequence Editor, create a workspace, and new sequence
  10. Select the Parcel within the editor that contains the Fprime and Adatapion
  11. Play around with the editor and see that the output generates an FPrime sequence.
  12. Export and import a sequence to verify round-tripping.

Verification

Still got to update e2e test...

@goetzrrGit goetzrrGit requested a review from a team as a code owner September 3, 2024 18:47
@goetzrrGit goetzrrGit force-pushed the feature/fprime-sequencing branch from b4766a8 to e990933 Compare September 3, 2024 19:52
@goetzrrGit goetzrrGit force-pushed the feature/fprime-sequencing branch from e990933 to bf08b40 Compare September 3, 2024 20:22
@cohansen cohansen assigned goetzrrGit and unassigned cohansen Sep 3, 2024
@goetzrrGit goetzrrGit force-pushed the feature/fprime-sequencing branch from bf08b40 to 6bc1951 Compare September 10, 2024 15:29
@goetzrrGit goetzrrGit force-pushed the feature/fprime-sequencing branch from 7c3d375 to ad4a62f Compare September 13, 2024 18:48
@goetzrrGit goetzrrGit force-pushed the feature/fprime-sequencing branch from ad4a62f to 21ef9fd Compare September 13, 2024 18:50
@dandelany dandelany added the publish Tells GH to publish docker images for this PR label Sep 16, 2024
Copy link

Copy link
Contributor

@skovati skovati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great for a first pass at this. A few non-blocking comments mostly about how this plugin architecture will evolve in the future

deployment/docker-compose.yml Show resolved Hide resolved
docker-compose.yml Outdated Show resolved Hide resolved
sequencing-server/src/utils/PluginManager.ts Show resolved Hide resolved
sequencing-server/src/app.ts Show resolved Hide resolved
* Right now we are support a dictionary parser, but we can add other plugins in the future.
* By default it will load the ampcs dictionary parser. '/ampcs-dictionary-parser/ampcs-parser.js'
* Dictionary upload will use the parsers loaded by the PluginManager.
* A parser can return up to 3 AMPCS supported dictionaries per parse. The first is a CommandDictionary. The second is a ChannelDictionary. The third is a ParameterDictionary.
* Fprime dictionaries use nested data structures so we need the eDSL to support that. Sequence expansion isn't recommended yet for Fprime dictionaries.
* The parser should know about the types of dictionaries that the sequencing server could have parsed.
* Return information about the 3 dictionary that the sequencing server could have parsed.
* This variable is a file path for the dictionary parser.
* By default use the built in ampcs dictionary parser.
* Move the parsing code from the sequencing server to this plugin
* This is a node project that will be build by gradlew assemble
* This is a node project that will be build by gradlew assemble from the sequencing server
* Updated how to upload the dictionaries.
@goetzrrGit goetzrrGit force-pushed the feature/fprime-sequencing branch from b0f5f1f to 3b46aad Compare October 14, 2024 23:29
@goetzrrGit goetzrrGit merged commit 6f5a6aa into develop Oct 14, 2024
22 checks passed
@goetzrrGit goetzrrGit deleted the feature/fprime-sequencing branch October 14, 2024 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
publish Tells GH to publish docker images for this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Aerie/FPrime Sequencing Integration
4 participants