nyx-space / anise

ANISE provides a toolkit and files for Attitude, Navigation, Instrument, Spacecraft, and Ephemeris data. It's a modern replacement of the NAIF SPICE toolkit.
Mozilla Public License 2.0
55 stars 13 forks source link

Refactor CLI code #286

Closed cmleinz closed 1 month ago

cmleinz commented 1 month ago

Summary

This is a draft PR for addressing #240. So far I've made one change to the CLI main function. I'm looking for feedback as to if this is a good path forward for the refactor, if it is I can proceed with making changes to the rest of the actions in a similar way.

Architectural Changes

Adjust the CLI code to be more generic and reduce duplication

ChristopherRabotin commented 1 month ago

Thanks for your work, @cmleinz ! This is a great start, I've just made a recommendation on the change to NAIFSummary which I think will make it more generic.

cmleinz commented 1 month ago

I addressed the comments thus far, still haven't made the rest of the changes though. Let me know what you think! As for your comment on how the CLI will change with Args, I believe it will remain the same. I compared the outputs of the help commands for trunc-daf-by-id between this branch and master and couldn't find any differences.

Additionally for another CLI I maintain I derive Args and I'm pretty sure everything automagically works the same, I'll look a little deeper though to be sure

ChristopherRabotin commented 1 month ago

Great work! I especially like the changes to file2heap and NAIFPrettyPrint. which I hadn't considered. The failing tests are because there is an ephem that's behind a Github secret that only the maintainers can use in CI.