support class scores CSVs#102
Open
joefutrelle wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
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__andkeys() - Implement
_class_scores_v4to 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
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.
This mod adds a class scores version "4" which expects CSV files named
{bin_lid}.csvcontaining ROI pids in the first column and classes in the rest. Assumes that there is a header.