-
Notifications
You must be signed in to change notification settings - Fork 262
ENH: support alternative header field name variants in .PAR files #507
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking at this.
@@ -206,6 +206,14 @@ | |||
'Max. number of gradient orients': ('max_gradient_orient', int), | |||
# Line below added for par / rec version > 4.1 | |||
'Number of label types <0=no ASL>': ('nr_label_types', int), | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vague preferernce for removing blank line here, comments do enough of a job of spacing.
|
||
# The following are duplicates of the above fields, but with slightly | ||
# different abbreviation, spelling, or capatilization. Both variants have | ||
# been observed in the wild in V4.2 PAR files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add link to issue?
@@ -0,0 +1,101 @@ | |||
# === DATA DESCRIPTION FILE ====================================================== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have permission to distribute this file? Add to COPYING
file if so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a copy of one of the existing "phantom_XXX.PAR" files from the data folder where I just changed the 4 lines in the header, so there shouldn't be an issue. If we get clearance to use the file from #505, I can substitute it in here instead.
Current coverage is 94.03% (diff: 100%)@@ master #507 diff @@
==========================================
Files 166 166
Lines 21992 22000 +8
Methods 0 0
Messages 0 0
Branches 2343 2343
==========================================
+ Hits 20679 20687 +8
Misses 878 878
Partials 435 435
|
made the suggested changes. haven't determined why there was one test failure for each Appveyor run last time around. There were several other warnings there as well. |
The Windows test failure is real and is because I truncated the PAR file too much so that the data doesn't match the number of slices in the header. It only passes on Linux/OSX because there apparently the *.PAR search is case sensitive and doesn't find the new ".par" file. |
Sorry for the delay - looks good -merging. |
This is a workaround for the alternative header naming variants observed in #505.
I modified one of the existing .PAR files. I just truncated it and changed 4 header lines to have the entries from the .PAR file in #505. We can swap the file out for that other actual .par file prior to merging if the license terms permit.