Skip to content

Comments

Deprecate pds3.py#191

Merged
jnspitale merged 2 commits intomainfrom
jns-cleanup
Feb 18, 2026
Merged

Deprecate pds3.py#191
jnspitale merged 2 commits intomainfrom
jns-cleanup

Conversation

@jnspitale
Copy link
Collaborator

@jnspitale jnspitale commented Feb 11, 2026

Fixes #184, #185, and #186

Summary by CodeRabbit

  • Refactor

    • Updated label parsing across Cassini and Galileo instrument modules to use a new parsing approach.
  • Bug Fixes

    • Fixed an iteration bug in Cassini UVIS that could skip processing of windowed data.
  • Chores

    • Added test framework import to support unit testing.

- update uvis.py, vims.py, and galileo/ssi/_init__.py to use pdsparser.Pds3Label()
- move pds3.py to ideas/
@coderabbitai
Copy link

coderabbitai bot commented Feb 11, 2026

Walkthrough

Replaces legacy PDS3 label handling with pdsparser.Pds3Label(...).as_dict() in Cassini (UVIS, VIMS) and Galileo (SSI) hosts; removes a pds3 public import; fixes an iteration bug in uvis.get_qube; and adds a unittest import to tests/hosts/hst/__init__.py.

Changes

Cohort / File(s) Summary
Cassini UVIS
oops/hosts/cassini/uvis.py
Replaced pds3.fast_dict(filespec) with pdsparser.Pds3Label(filespec, method='fast').as_dict(); removed from oops.hosts import pds3 import; fixed loop for w in range(len(line0)) (previously for w in len(line0)).
Cassini VIMS
oops/hosts/cassini/vims.py
Replaced multiple pds3.fast_dict(...) usages (constants and from_file) with pdsparser.Pds3Label(..., method='fast').as_dict() to obtain label dicts.
Galileo SSI
oops/hosts/galileo/ssi/__init__.py
Replaced pds3.get_label(filespec) with pdsparser.Pds3Label(filespec).as_dict() and removed dependence on pds3 import for label retrieval.
Tests (HST)
tests/hosts/hst/__init__.py
Added import unittest at module top.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Deprecate pds3.py' is clear and directly related to the main change: replacing pds3 module usage with pdsparser across multiple files.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]

This comment was marked as resolved.

@jnspitale jnspitale changed the title Hosts cleanup Deprecate pds3.py Feb 12, 2026
@jnspitale jnspitale marked this pull request as ready for review February 12, 2026 20:08
Copy link
Collaborator

@markshowalter markshowalter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One optional comment is that, in general, you should probably use method='fast' by default, and only abandon it if you discover empirically that it doesn't always work for some data set. But that's up to Joe.

@jnspitale jnspitale merged commit d0f0664 into main Feb 18, 2026
14 checks passed
@jnspitale jnspitale deleted the jns-cleanup branch February 18, 2026 18:06
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.

Deprecate pds3.py

3 participants