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

Seqgen use json instead of xml #177

Merged
merged 5 commits into from
Jul 24, 2024

Conversation

Lex-ari
Copy link
Contributor

@Lex-ari Lex-ari commented Jul 16, 2024

Related Issue(s) #173
Has Unit Tests (y/n) n
Documentation Included (y/n) n

Change Description

This makes fprime-seqgen uses json dictionaries instead of xml for sequencing.
Small typo fixes.

Rationale

Current implementation breaks when submitting a json either through the terminal or through GDS. This small fix properly converts them into binaries (and GDS properly uploads to spacecraft).

@Joshua-Anderson @thomas-bc @timcanham

Copy link
Contributor

@Joshua-Anderson Joshua-Anderson left a comment

Choose a reason for hiding this comment

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

🔥 This is awesome - did you do any testing to validate this works?

I expected that there would be some unit tests but the only tests I saw were empty If you have some time writing a unit test for fprime-seqgen would probably be super helpful.

You may want to update the command line arguments helptext to specify that you need to supply a JSON dictionary file.

This will also require updating the fprime integration tests here

@Joshua-Anderson
Copy link
Contributor

@thomas-bc could you kick off unit tests to see if this broke any unit tests that we're not aware of?

@Lex-ari
Copy link
Contributor Author

Lex-ari commented Jul 16, 2024

🔥 This is awesome - did you do any testing to validate this works?

Tested on a sample deployment that ran a couple of CMD_NO_OPs. I used this project and this simple_sequence.seq.txt (without the .txt).

I could make the test case use a dictionary.json from a fresh deployment and generate a sequence binary off from it, but it might be a "circular" self-validating test. Any suggestions?

@Joshua-Anderson
Copy link
Contributor

Joshua-Anderson commented Jul 16, 2024

Yeah, looking at the code structure the only straightforward way to test without refactoring is to provide a simple dictionary and input sequence and make sure it matches an expected output sequence binary.

It feels a bit a circular, but does serve as a good regression test that python and other GDS infrastructure updates don't break the sequence compilation process.

@LeStarch
Copy link
Collaborator

@thomas-bc do we have tests for the JSON loader?

LeStarch
LeStarch previously approved these changes Jul 16, 2024
Copy link
Collaborator

@LeStarch LeStarch left a comment

Choose a reason for hiding this comment

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

LGTM. I'll let you and @Joshua-Anderson determine if tests belong in this PR or another.

Copy link
Contributor

@Joshua-Anderson Joshua-Anderson left a comment

Choose a reason for hiding this comment

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

🚀 Looks good to me, thanks @Lex-ari!

Make sure to fix the spellcheck errors

@LeStarch LeStarch merged commit bd9cd3d into nasa:devel Jul 24, 2024
11 checks passed
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.

3 participants