Use message_subtype instaed of subservice in PUS C code paths#135
Merged
Conversation
mokagio
commented
Mar 11, 2026
Comment on lines
+49
to
+50
| if message_subtype is not None and subservice is not None and message_subtype != subservice: | ||
| raise ValueError("message_subtype and subservice must have the same value") |
Contributor
Author
There was a problem hiding this comment.
Alternatively, we could fail if both values are given, pointing users to only pass message_subtype. The models suggests this is a more common approach and friendlier to migrations that maintain compatibility, so I left it as is.
Adopt ECSS-E-ST-70-41C wording in PUS C by using `message_subtype` across packet APIs and service helpers. Preserve compatibility by keeping legacy `subservice` constructor/property aliases and the `Subservice` enum alias, with deprecation markers and warnings to guide migration. PUS A implementation remains unchanged. --- Generated with the help of Codex (GPT-5) Co-Authored-By: OpenAI Codex <noreply@openai.com>
f6423fa to
972ab21
Compare
The constant `DEPRECATED_IN_SUBSERVICE_ALIAS` was placed between import groups, causing E402 (module level import not at top of file) for the two imports that followed it. --- Generated with the help of Claude Code, https://claude.ai/code Co-Authored-By: Claude Code Opus 4.6 <noreply@anthropic.com>
The backward-compatible `subservice` alias pushes the parameter count to 11, one over the limit. This is intentional for the deprecation period. --- Generated with the help of Claude Code, https://claude.ai/code Co-Authored-By: Claude Code Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #135 +/- ##
=======================================
Coverage 99.85% 99.85%
=======================================
Files 43 43
Lines 3511 3534 +23
=======================================
+ Hits 3506 3529 +23
Misses 5 5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
this looks great. Could you also update the |
Document the PUS-C message_subtype rename accurately.\nNote that legacy subservice aliases remain available but deprecated.\n\n---\n\nGenerated with the help of Codex (GPT-5)\n\nCo-Authored-By: OpenAI Codex <noreply@openai.com>
mokagio
added a commit
to mokagio/tmtccmd
that referenced
this pull request
Mar 15, 2026
See abba178451e39974ad96d0a4478a554365a14e05 in spacepackages-py, us-irs/spacepackets-py#135
This was referenced Mar 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses #130 by aligning PUS C terminology with ECSS-E-ST-70-41C:
subservice->message_subtypein PUS C code pathsBackground
Hi all, I hope you don't mind an out of the blue contribution. I've been interested in space for a long time and recently decided it would be fun (and hopefully useful) to contribute to some open-source projects. Not knowing where to start and not having industry know how to offer, I set out an AI research agent to discover projects with open issues that required software help rather than domain knowledge. That's how I discovered this project and #130.
From there, I planned a rename with GPT-5.3-Codex and executed it.
I hope this is useful. Feel free to push back strongly if it misses the mark. Happy to go back to the drawing board.
Details
message_subtypeas the primary PUS C API term.subserviceconstructor args/propertiesSubserviceenum alias (where renamed)subserviceusage in PUS C.subservicecalls still workCompatibility
This is non-breaking for existing PUS C users:
subserviceusage continues to work in this releasemessage_subtypeincrementallyValidation
Full suite passed locally: