IMAP-Science-Operations-Center / imap_processing

IMAP
MIT License
6 stars 12 forks source link

Xtce build follow up: make updates on closed PR #72 #75

Closed GFMoraga closed 11 months ago

GFMoraga commented 1 year ago

Summary

This is a way to track the progress of updating the xtce files and parsing tools

Completed

Requirements

The more specific the better.

Related tickets

72

GFMoraga commented 1 year ago

@bourque I copied your comment from the PR as a starter. I will go back and edit/update.

bourque commented 1 year ago

Thanks @GFMoraga. I am also happy to help out with some of this!

GFMoraga commented 1 year ago

@maxinelasp can you suggest names for classes? Or do you think these are fine? I am working on this comment:

"It is best practice to have the main function be really small and call out to other methods (IMO). Ideally, this would look something like:"

df = parse_excel_file(filename) header = generate_header() integer_parameter_types = generate_integer_parameter_types() codice_parameters = generate_codice_parameters() tree = generate_xml_tree(df, header, integer_parameter_types, codice_parameters) tree.write(...)

GFMoraga commented 1 year ago

@tech3371 how do I do this? "We need to add pandas, openpyxl to poetry dependency list" in poety.toml?

maxinelasp commented 1 year ago

Make sure your names are clear, with spelled out names (per the style guide). Ideally, it should be clear what the class is without other developers needing to read any documentation or comments. If you're having trouble describing a class in 2-3 words, that is a sign the class is too complicated and may need to be split down further.

Here's an interesting discussion that might help. Naming things is difficult and annoying 😆

maxinelasp commented 1 year ago

You can also look at space_packet_parser for examples of class names/structure.

maxinelasp commented 1 year ago

Also, per your poetry question, I will write up a document about using poetry which we can use as a start.

GFMoraga commented 1 year ago

Sounds good! I will take a look, and yes, naming things, I am learning is harder than I thought!

tech3371 commented 1 year ago

@GFMoraga I found this book very helpful. I read first few chapters. Chapter 2 talks about how to name functions well. I hope it helps. https://github.com/jnguyen095/clean-code/blob/master/Clean.Code.A.Handbook.of.Agile.Software.Craftsmanship.pdf