-
Notifications
You must be signed in to change notification settings - Fork 36
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
ENH: Improve file parsing #982
Conversation
Tests are failing due to some Meta thing which I believe @jklenzing has already identified. The pull request forms are passing. |
The figure you use in the example doesn't show the entire command you use for testing. Can you include that as a code snippet? |
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.
Haven't tried things out yet, but looked over the code.
Co-authored-by: Angeline Burrell <aburrell@users.noreply.github.com>
…rove_file_parsing_1
Ok, can confirm this does NOT work if you use the |
# engage the fixed width filename parser. If there is not a common | ||
# delimiter then the fixed width parser is suggested though not always | ||
# required. Given the range of standards compliance across the decades of |
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.
# engage the fixed width filename parser. If there is not a common | |
# delimiter then the fixed width parser is suggested though not always | |
# required. Given the range of standards compliance across the decades of | |
# engage the fixed width filename parser. Given the range of standards | |
# compliance across the decades of |
And fix spacing. Recommend removing that sentence because from this level, you can't specify which parser is used. I was reading this today and it took me a moment before I realized I had no control over that aspect.
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.
A developer can control which parser is used when starting here as a template. If delimiter=None or left unassigned then the fixed width parser is used.
I don't understand the fix spacing comment.
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.
"If there is not a common delimiter then the fixed width parser is suggested though not always required" is not accurate in this setting because you can ONLY differentiate between the two by providing or not providing a delimiter.
"fix spacing" means that I don't know if the lines are now too long or short as a part of the whole comment block.
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.
It is correct that you can only provide a single given delimiter or use the fixed width parser. In practice though, the delimited parser will likely work on filenames that don't have even a single instance of the given delimiter. I think I even test for that.
"fix spacing" means that I don't know if the lines are now too long or short as a part of the whole comment block.
Got it!
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.
GitHub shows me that this hasn't been addressed? Which is confusing because this is marked as outdated.
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.
Sometimes I think it gets confused. I updated the comment a bit to specifically note I am talking about modifying the function call from_os
below the comment.
You can use the '?' in the middle of specifiers though. Requires knowing ahead of time how many characters are needed. |
Also requires that the number of characters is always the same. For both reasons, this is why I couldn't use it. |
Description
Addresses #763, #762
from_os
as well as supporting methods.process_parsed_filenames
is now always sortedType of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details for
your test configuration
fixed_width
parser, two examples using the delimited parser.Test Configuration:
Checklist:
develop
(notmain
) branchCHANGELOG.md
, summarizing the changesIf this is a release PR, replace the first item of the above checklist with the release
checklist on the wiki: https://github.com/pysat/pysat/wiki/Checklist-for-Release