-
Notifications
You must be signed in to change notification settings - Fork 2
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
Updates to File Parsing #105
Conversation
srvasude
commented
Jul 25, 2024
- Push test files in to separate subdirectory (for each of the data types).
- Rename files to use _ naming everywhere.
- Update util_io to do CSV parsing for the observations. This allows for spaces in the values (which is what we see in the PCLean datasets + other real datasets).
- Improve error handling in file parsing.
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, this LG -- could you update the README too?
cxx/util_io.cc
Outdated
} | ||
}, | ||
schema.at(relname))); | ||
} catch(const std::out_of_range& e) { |
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.
Can we check schema.contains(relname)
instead of try/catch? Do you know if try/catch here will make it harder to run this inside Google eventually, given the prohibition on exceptions?
I've been thinking about whether it's worth it to implement more graceful error handling at this stage (maybe propagating error codes up to main
) and using asserts only to check for invalid program state. Let's talk next week about what to do with that -- in the meantime, I'd kind of prefer to just stick with assert
everywhere for consistency.
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.
Updated. Sticking with assert seems reasonable, since that is Google compatible. Do you mean using abseil Status and passing that around (to be Google compatible)?
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.
I was thinking abseil Status, but I haven't done much thinking/investigating other options (there's std::expected
, but that's not until C++23)