Skip to content

support class scores CSVs#102

Open
joefutrelle wants to merge 1 commit into
masterfrom
class_scores_v4_csv
Open

support class scores CSVs#102
joefutrelle wants to merge 1 commit into
masterfrom
class_scores_v4_csv

Conversation

@joefutrelle
Copy link
Copy Markdown
Owner

This mod adds a class scores version "4" which expects CSV files named {bin_lid}.csv containing ROI pids in the first column and classes in the rest. Assumes that there is a header.

@joefutrelle joefutrelle requested a review from Copilot July 15, 2025 13:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds support for version 4 class scores stored as CSV files named {bin_lid}.csv, including file lookup, key listing, and parsing into DataFrames.

  • Introduce _get_v4_file, include version 4 in __getitem__ and keys()
  • Implement _class_scores_v4 to read CSV, extract ROI numbers, and return a DataFrame
  • Update class_scores() dispatch to handle version 4
Comments suppressed due to low confidence (2)

ifcb/data/products/class_scores.py:123

  • There are no tests for version 4 CSV parsing. Add unit tests to cover _class_scores_v4, including header handling, index extraction, and dtype conversion to ensure it behaves correctly with expected CSV formats.
    def _class_scores_v4(self):

ifcb/data/products/class_scores.py:124

  • [nitpick] This comment would be clearer as a method docstring so that the contract for version 4 parsing is formally documented. Consider moving it under the signature as a """…""" docstring.
        # version 4 is a CSV file, the first column is "pid" which is a string that contains the ROI number

Comment thread ifcb/data/products/class_scores.py
Comment thread ifcb/data/products/class_scores.py
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.

2 participants