-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added fix for issue #196 and unit test #199
Conversation
I'm sorry, I tried. This is a stupidly simple thing, but I can't figure out what the issue is without seeing what pre-commit.ci is checking. |
You can ignore the pre-commit.ci for now. We can fix that later. I'll check you PR ASAP. Thanks for submitting it! |
Yes, looks good if that's how you want to tackle it Co-authored-by: Filipe <[email protected]>
I should have read that last update more closely before accepting it. It's ok to skip the check to see if the '*' or '#' characters are at the beginning of the line if the line is blank, but the character check is still necessary along with the logic on how to handle it, which was being skipped because of where 'continue' was located. 😄 |
Just wondering if there's any update on this PR. |
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
End of the year is always a bit slow. Thanks for your patience. I'll try to tag a new release soon. |
Thanks a bunch ocefpaf! |
I've added a BTL file containing blank header lines and a unit test explaining a ValueError is thrown when there is a blank line in a BTL files header.
The reason is that the _parse_seabird() method assumes it's done reading if a line doesn't start with a '#' or '*' character. True if the line contains other strings like the column names, but not true if it's just a blank line in the header section.
If it is just a blank line, the _parse_seabird() function doesn't set the metadata['names'] correctly, then back in the read_btl() function when the function checks the metadata['names'].index('Date'), there is no 'Date' element, which causes the ValueError.