Skip to content

Describe tests to add to the decommutator - #107

Open
namurphy wants to merge 1 commit into
PlasmaPy:mainfrom
namurphy:readme-tests
Open

namurphy wants to merge 1 commit into
PlasmaPy:mainfrom
namurphy:readme-tests

Conversation

@namurphy

@namurphy namurphy commented Nov 4, 2026

Copy link
Copy Markdown
Member

Summary

Add a "Tests to add" section to src/pyfaradaycup/decommutator/README.md. It lists the decommutator's untested functionality, most important first. Coverage is 67% overall: ccsds_reader_pipeline.py is at 50%, l0_to_l05.py at 71%, and main.py at 88%.

The main gaps:

  • Spacecraft housekeeping (--spacecraft): _read_file_sc and _get_layout_sc are never run, including how the flight software version is chosen.
  • Time conversion: the spacecraft=True scaling in _secsubsec2scet is never run, and subseconds are truncated rather than rounded (up to 20 µs early).
  • Expanding packets into measurements: the IT+ST fallback, AllGain packets that don't start a NYS, and skipped corrupt 0x352 packets. A bug in any of these gives wrong times rather than an error.
  • Error handling in main, plus the --gzip and PTP inputs and the CLI usage errors.

Several entries describe current behavior that a test should decide on, such as:

  • _get_layout_sc raising UnboundLocalError when an APID's section has no ( Block[ line.
  • _cdf35e_35f writing no data while main reports the CDF as written.

The two existing testing items move out of the Dagster section into the new section, since most of these tests aren't specific to Dagster.

This changes documentation only.

🤖 Generated with Claude Code

List the functionality in the decommutator that is not tested, most
important first, so that tests can be added for it. About a third of
the code is never run by the tests, mostly in the spacecraft
housekeeping path, the handling of unusual packets, and the handling
of errors. Several entries describe behavior that a test should
decide on, such as functions that raise UnboundLocalError or that log
an error without reporting a failure.

Move the existing testing items out of the Dagster section, since
most of these tests are not specific to Dagster.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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