-
Notifications
You must be signed in to change notification settings - Fork 16
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
Create a template file for XTCE Packets #67
Comments
@tech3371 Maybe you want to take this one on? |
This is related! I think the Python code I have will help with this. The is to format the code with '''information''' so the user can understand/change inputs when needed. '''Create CCSDS Header parameters, which should be the same for all IMAP instruments''' 'ccsds_parameters = [ |
Or are you suggesting something like: CCSDS headersxtce:ParameterSet SequenceContainer<xtce:SequenceContainer name="CCSDSPacket"> |
Either is fine, depending on how your script works. But, it's my preference that it's in a different file, so it's easy to update and to see when it's getting updated. |
Gotcha. Something that is named "xtce_packet_temp.md/yml/py/xml" ? |
Yes, except write out "template", because I read that as "temporary"! But yes, basically some kind of template which can be shared across different instruments. But, don't make it markdown, because that will be annoying for programming. If you make it something non-xml (which I think would make it easier to edit) make sure you add something in your script to output it as XML. That way, someone who is using the template but not your script can still use the template. |
@maxinelasp I just saw this, and I think I could add this to my current PR, but can do a new one too. Could you look at the open PR and see what you like in the sense of making a template? I tried to add guidelines in the script, so I would take from those to make this template. |
Either adding it to the current PR or adding to a later one would be fine. It looks like what you have is good in the PR, you would just need to pull out some of the template generation into a new "generate_ccsds_header_xml" type function, and then it is easy to import that method and call it to get the XML. I will take a look at that PR some time this week, ping me if I haven't by like Thursday or Friday. |
I am checking in to see if I need to create XTCE template file (which I don't mind doing) or what @GFMoraga has done this? |
@tech3371 look at my PR and see. I was going to make a CCSDS header template like Maxine suggested. |
I think what you have is great, Gabriel! Maybe Tenzin can look through my suggestions and see if that PR completes this ticket, or if there's some additional work to be done there. It might be worth just merging that PR quickly and then coming back to it to rework it to be more of a general template. But I think what you have for the template and the code generation tools in that PR looks good! (PR: #72 ) |
If we can generalized his work on current PR #72 , Then what he has done is far better than what I would have done, which is just XTCE file with same example and more comments. |
So, I add a new file to #72 which is the 'generate_ccsds_header_xml.py' How do we close this issue and do y'all @maxinelasp @tech3371 think this is a good start? We can move the file too. |
Yes, I think that's definitely sufficient for this issue! |
Topic:
Create a template with common fields and parameters for all (or most) XTCE packet files.
Description:
This file should include things like the CCSDS header, which are common to all files. The goal is to have one template which we can copy out of for other XTCE files.
Requirements
Include some kind of comment making it clear that it came from a template and where you can find the template.
The text was updated successfully, but these errors were encountered: