Skip to content

Detections csv weak comment rejection - #507

Open
Gautzilla wants to merge 8 commits into
Project-OSmOSE:mainfrom
Gautzilla:detections-csv-weak-comment-rejection
Open

Gautzilla wants to merge 8 commits into
Project-OSmOSE:mainfrom
Gautzilla:detections-csv-weak-comment-rejection

Conversation

@Gautzilla

Copy link
Copy Markdown
Contributor

This PR avoids the raise of an error if some lines of a detection csv file can't be parsed as Detection instances.

This is notably the case for APLOSE's weak comments.

Now, the records that can't be parsed are skipped and a warning containing their indexes is logged:

ds = Detection.from_csv(Path(r"aplose_result.csv"))
>>> The following line(s) couldn't be parsed as detections: [10, 11]

@Gautzilla Gautzilla self-assigned this Oct 8, 2026
@Gautzilla Gautzilla added the Bug Something's fishy label Oct 8, 2026
@coveralls

coveralls commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 98.937% (+0.005%) from 98.932% — Gautzilla:detections-csv-weak-comment-rejection into Project-OSmOSE:main

@ElodieENSTA ElodieENSTA left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe raise a higher error if none of the lies could be parsed?

@Gautzilla

Copy link
Copy Markdown
Contributor Author

Maybe raise a higher error if none of the lies could be parsed?

Yup, looks like a good idea!

@Gautzilla
Gautzilla requested a review from ElodieENSTA October 19, 2026 15:14

This branch has not been deployed

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

Labels

Bug Something's fishy

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants