{"action":"created","issue":{"url":"https://api.github.com/repos/sestei/pydaqconfig/issues/6","labels_url":"https://api.github.com/repos/sestei/pydaqconfig/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/sestei/pydaqconfig/issues/6/comments","events_url":"https://api.github.com/repos/sestei/pydaqconfig/issues/6/events","html_url":"https://github.com/sestei/pydaqconfig/pull/6","id":118188578,"number":6,"title":"Float rounding fix and refactoring","user":{"login":"SeanDS","id":5225190,"avatar_url":"https://avatars.githubusercontent.com/u/5225190?v=3","gravatar_id":"","url":"https://api.github.com/users/SeanDS","html_url":"https://github.com/SeanDS","followers_url":"https://api.github.com/users/SeanDS/followers","following_url":"https://api.github.com/users/SeanDS/following{/other_user}","gists_url":"https://api.github.com/users/SeanDS/gists{/gist_id}","starred_url":"https://api.github.com/users/SeanDS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeanDS/subscriptions","organizations_url":"https://api.github.com/users/SeanDS/orgs","repos_url":"https://api.github.com/users/SeanDS/repos","events_url":"https://api.github.com/users/SeanDS/events{/privacy}","received_events_url":"https://api.github.com/users/SeanDS/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-21T10:42:43Z","updated_at":"2015-11-23T14:00:17Z","closed_at":"2015-11-21T11:28:49Z","pull_request":{"url":"https://api.github.com/repos/sestei/pydaqconfig/pulls/6","html_url":"https://github.com/sestei/pydaqconfig/pull/6","diff_url":"https://github.com/sestei/pydaqconfig/pull/6.diff","patch_url":"https://github.com/sestei/pydaqconfig/pull/6.patch"},"body":"The string formatter uses floor() to round floats to the required precision, leading to small rounding errors. Using round() before the formatter fixes this.\r\n\r\nAlso renamed get_bytes_per_second() to get_acquisition_rate(). Perhaps eventually this function could return the rate in a user-defined unit instead of always MiB/h."},"comment":{"url":"https://api.github.com/repos/sestei/pydaqconfig/issues/comments/158939315","html_url":"https://github.com/sestei/pydaqconfig/pull/6#issuecomment-158939315","issue_url":"https://api.github.com/repos/sestei/pydaqconfig/issues/6","id":158939315,"user":{"login":"sestei","id":10315681,"avatar_url":"https://avatars.githubusercontent.com/u/10315681?v=3","gravatar_id":"","url":"https://api.github.com/users/sestei","html_url":"https://github.com/sestei","followers_url":"https://api.github.com/users/sestei/followers","following_url":"https://api.github.com/users/sestei/following{/other_user}","gists_url":"https://api.github.com/users/sestei/gists{/gist_id}","starred_url":"https://api.github.com/users/sestei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sestei/subscriptions","organizations_url":"https://api.github.com/users/sestei/orgs","repos_url":"https://api.github.com/users/sestei/repos","events_url":"https://api.github.com/users/sestei/events{/privacy}","received_events_url":"https://api.github.com/users/sestei/received_events","type":"User","site_admin":false},"created_at":"2015-11-23T14:00:17Z","updated_at":"2015-11-23T14:00:17Z","body":"Hm, actually I cannot reproduce that there are rounding errors? For me, '{0:1f}'.format(0.149) gives '0.1', and '{0:1f}'.format(0.151) gives '0.2'. 0.15 gets rounded down to 0.1, but that doesn't change for round() as well."}}