-
Notifications
You must be signed in to change notification settings - Fork 27
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
add methods to get driver shortname from filename extension #174
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, I like the approach taken here!
Currently I'm actually returning the driver |
Those test failures seem to be unrelated |
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, it looks good now! Can we introduce unit tests for the functions before I merge this PR?
Regarding #174 (comment), I like the shortname and don't know of any reason offhand to go with the longer driver name for now.
And yeah the test failures looks unrelated so I won't worry about them in the setting of this PR.
### Returns | ||
The metadata item on success, or an empty string on failure. | ||
""" | ||
function metadataitem(obj, name::AbstractString; domain::AbstractString = "") |
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 introduce unit tests for this?
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.
where do you want to put this test I made a test_utils.jl file :)
|
||
So `extensiondriver("/my/file.tif") == "GTiff"`. | ||
""" | ||
function extensiondriver(filename::AbstractString) |
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 introduce unit tests for this?
This is ready to go. |
Thank you! :) |
I'm not sure if these methods are the best way to organise this kind of functionality, or the best names. But it's useful for writing arbitrary drivers without specifying them.
Closes #173