Skip to content

Add docstrings for read_file and read_file_sc - #68

Open
namurphy wants to merge 1 commit into
PlasmaPy:mainfrom
namurphy:document-l0-readers
Open

namurphy wants to merge 1 commit into
PlasmaPy:mainfrom
namurphy:document-l0-readers

Conversation

@namurphy

@namurphy namurphy commented Oct 6, 2026

Copy link
Copy Markdown
Member

Replaces the one-line docstrings of read_file and read_file_sc in ccsds_reader_pipeline.py with full docstrings. These are the two public functions for reading L0 files into Python data structures.

Each docstring now has Parameters, Returns, Raises, and Notes sections:

  • read_file reads SPC instrument packets (APIDs 0x351–0x354, 0x35E, and 0x35F).
  • read_file_sc reads spacecraft housekeeping packets. Its notes describe how the spacecraft housekeeping definition file is chosen: first from the MET of the first packet, then from a <year>/<day of year> part of the path, and finally by falling back to the newest definition file.
  • Both return a dict keyed by APID and then by mnemonic, raise RuntimeError when the file can't be opened or read, and write progress to standard output.

The documentation builds with --nitpicky --fail-on-warning.

🤖 Generated with Claude Code

Document the parameters, return value, exceptions, and behavior of the
two public functions that read L0 files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@namurphy

namurphy commented Oct 7, 2026

Copy link
Copy Markdown
Member Author

These docstrings were written by Claude. Nothing appeared to be glaringly wrong with them, but these will need careful review since I can neither confirm nor deny the veracity (truthiness?) of these docstrings. 👀

@joyvelasquez — could you read through these docstrings too, if you have the time? No worries if not.

Stuff that we aren't able to confirm should go as a comment into the code rather than be included in a docstring, perhaps. 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant