nasa / fprime-tools

F´ Python tooling and helpers.
https://github.com/nasa/fprime
Apache License 2.0
20 stars 38 forks source link

Fix/enum representation types #184

Closed JackNWhite closed 7 months ago

JackNWhite commented 9 months ago
Originating Project/Creator Jack White
Affected Component EnumType, type_exceptions
Related Issue(s) #17
Has Unit Tests (y/n) n
Documentation Included (y/n) Comments

Change Description

Rationale

Required to support GDS (de)serialisation of enums represented by other types than I32.

Accompanying PRs

JackNWhite commented 9 months ago

I fixed the spelling and the formatting. I also added a default argument rep_type="I32" for EnumType.construct_type(), which I think should fix the unit tests. I would understand if you want to add some new tests, but I would be grateful if someone who already understands the existing tests could add them.

LeStarch commented 9 months ago

It appears the tests are still failing. I will see if I can get it to work!

LeStarch commented 9 months ago

@JackNWhite can you give maintainers allowances to update this PR? I have a fix for the UTs.

JackNWhite commented 8 months ago

@LeStarch, I'm terribly sorry for not responding over Christmas - I was almost computer-free. I will try to make your update this afternoon, but I have also given the maintainer access as requested.

LeStarch commented 8 months ago

I was almost computer-free.

I can respect that. I do hope you enjoyed your time away from the computer! No rush on the updates, but I will keep my hands-off while you make the changes. Let me know if/when I should jump back in!

JackNWhite commented 7 months ago

@LeStarch, hi, is it possible to move this forward? I saw that @thomas-bc has opened a request for a release merge on fprime itself. If possible, I would like to get this into the wider package, because it has been open for some time.

The related GDS PR is still open, but my understanding is that it was waiting on an alpha release of fprime-tools, which appears to be part of the fprime update.

LeStarch commented 7 months ago

@JackNWhite thanks for pinging me. We are in the process of releasing and did want to get this in.

I made a slight change to use the constant data out of the numerical_types classes instead of a second set of constant data to reduce redundancy. Tested it, works as expected. Thank you!