-
Notifications
You must be signed in to change notification settings - Fork 149
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
Make _object_value_int more robust by accepting decimals as well #133
Make _object_value_int more robust by accepting decimals as well #133
Conversation
What is the use case of this? This might lead to unexpected behavior for users, since values are not rounded, i.e. the literal "3.8" will be saved as the integer 3. As far as I can see this method is currently used for the |
Thank's for your feedback, @metaodi . Some of our harvested datasets contain values like 16.0 in You are right, results could be unexpected for users. But silently loosing the value is worse in our opinion. So we suggest one of those options:
|
@metaodi Please let me know what your preferred choice for the implementation is. If you think it's completely not wanted we can also close the pull request. |
@seitenbau-govdata I think it's fine like it is, cutting is better than losing. And rounding the value might not be expected as well. |
@metaodi Ok, great. Who is responsible merging the PR? You or @amercader ? Of course, I'm always interested in @amercader opinion. :-) |
@seitenbau-govdata I'm not (yet 😉 ) a maintainer of this repo. So @amercader is responsible 😊 |
Ah, ok. Then I confused it with the repo https://github.com/ckan/ckanext-harvest. 😊 But there your'e a maintainer. |
Thanks @seitenbau-govdata and @metaodi @metaodi I can always use a pair of hands, would you like to be a maintainer? |
@amercader sure, I'd like to help and I'm anyway reviewing PRs |
@metaodi fantastic thanks! You should now have write permissions 😎 |
Parsing values containing dots led to value loss in
_object_value_int
.This also parses floating point values to integers, which makes parsing more robust.
GovDataOfficial/ckanext-dcatde#6