nasa / fprime-gds

F´ Python Ground Data System (GDS).
https://github.com/nasa/fprime
Apache License 2.0
18 stars 37 forks source link

Seqgen use json instead of xml #177

Closed Lex-ari closed 4 months ago

Lex-ari commented 4 months ago
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

Joshua-Anderson commented 4 months ago

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

Lex-ari commented 4 months ago

🔥 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 commented 4 months ago

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 commented 4 months ago

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