Issue #1861 inconsistent ipf, report file name in the log#1876
Merged
Conversation
…to the warning text
…ends up in the log warning message
JoerivanEngelen
requested changes
Jul 2, 2026
JoerivanEngelen
left a comment
Contributor
There was a problem hiding this comment.
Looks good, I like the approach. And thanks for adding a test. There are a few typo's that I'd like to see fixed first before this is ready to be merged
| log_message = ( | ||
| f"Inconsistent IPF: header states {ncol} columns," | ||
| + " first line of file:\n{f.name} \ncontains {len(line.split())} whitespace-delimited" | ||
| + " columns and {len(next(csv.reader([line])))} comma-delimited columns." |
Contributor
There was a problem hiding this comment.
You forgot to add a "f" for a formatted string here
Suggested change
| + " columns and {len(next(csv.reader([line])))} comma-delimited columns." | |
| + f" columns and line {len(next(csv.reader([line])))} comma-delimited columns." |
| if not has_expected_cols: | ||
| log_message = ( | ||
| f"Inconsistent IPF: header states {ncol} columns," | ||
| + " first line of file:\n{f.name} \ncontains {len(line.split())} whitespace-delimited" |
Contributor
There was a problem hiding this comment.
You forgot to add a "f" for a formatted string here
Suggested change
| + " first line of file:\n{f.name} \ncontains {len(line.split())} whitespace-delimited" | |
| + f" first line of file:\n{f.name} \ncontains {len(line.split())} whitespace-delimited" |
| if not has_expected_cols: | ||
| log_message = ( | ||
| f"Inconsistent IPF: header states {ncol} columns," | ||
| + " first datablock of file:\n{f.name} \ncontains {len(line.split())} whitespace-delimited" |
Contributor
There was a problem hiding this comment.
You forgot to add a "f" for a formatted string here
Suggested change
| + " first datablock of file:\n{f.name} \ncontains {len(line.split())} whitespace-delimited" | |
| + f" first datablock of file:\n{f.name} \ncontains {len(line.split())} whitespace-delimited" |
| log_message = ( | ||
| f"Inconsistent IPF: header states {ncol} columns," | ||
| + " first datablock of file:\n{f.name} \ncontains {len(line.split())} whitespace-delimited" | ||
| + " columns and {len(next(csv.reader([line])))} comma-delimited columns." |
Contributor
There was a problem hiding this comment.
You forgot to add a "f" for a formatted string here
Suggested change
| + " columns and {len(next(csv.reader([line])))} comma-delimited columns." | |
| + f" columns and line {len(next(csv.reader([line])))} comma-delimited columns." |
| log_message = ( | ||
| f"Inconsistent IPF: header states {ncol} columns," | ||
| + f" first line of file [{f.name}] contains {len(line.split())} whitespace-delimited" | ||
| + f" columns and {len(next(csv.reader([line])))} comma-delimited columns." |
Contributor
There was a problem hiding this comment.
Suggested change
| + f" columns and {len(next(csv.reader([line])))} comma-delimited columns." | |
| + f" columns and line {len(next(csv.reader([line])))} comma-delimited columns." |
|
JoerivanEngelen
approved these changes
Jul 2, 2026
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.



Fixes #
Description
Checklist
Issue #nr, e.g.Issue #737pixi run generate-sbomand committed changes