{"action":"created","issue":{"url":"https://api.github.com/repos/OMS-NetZero/FAIR/issues/22","repository_url":"https://api.github.com/repos/OMS-NetZero/FAIR","labels_url":"https://api.github.com/repos/OMS-NetZero/FAIR/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/OMS-NetZero/FAIR/issues/22/comments","events_url":"https://api.github.com/repos/OMS-NetZero/FAIR/issues/22/events","html_url":"https://github.com/OMS-NetZero/FAIR/pull/22","id":300298895,"number":22,"title":"Fix tests for array equality using Numpy helper","user":{"login":"rgieseke","id":198537,"avatar_url":"https://avatars2.githubusercontent.com/u/198537?v=4","gravatar_id":"","url":"https://api.github.com/users/rgieseke","html_url":"https://github.com/rgieseke","followers_url":"https://api.github.com/users/rgieseke/followers","following_url":"https://api.github.com/users/rgieseke/following{/other_user}","gists_url":"https://api.github.com/users/rgieseke/gists{/gist_id}","starred_url":"https://api.github.com/users/rgieseke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgieseke/subscriptions","organizations_url":"https://api.github.com/users/rgieseke/orgs","repos_url":"https://api.github.com/users/rgieseke/repos","events_url":"https://api.github.com/users/rgieseke/events{/privacy}","received_events_url":"https://api.github.com/users/rgieseke/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-26T16:12:13Z","updated_at":"2018-03-07T08:27:55Z","closed_at":"2018-03-07T08:27:55Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/OMS-NetZero/FAIR/pulls/22","html_url":"https://github.com/OMS-NetZero/FAIR/pull/22","diff_url":"https://github.com/OMS-NetZero/FAIR/pull/22.diff","patch_url":"https://github.com/OMS-NetZero/FAIR/pull/22.patch"},"body":"I'm getting occasional test failures for \r\n\r\ntests/test_fair.py::test_division\r\n\r\nand\r\n\r\ntests/test_fair.py::test_co2_scale \r\n\r\ndue to float precision problems, so differences like\r\n\r\n```\r\nprint(C2[:,0]  - C1[:,0])\r\n```    \r\nlook like\r\n```\r\n0.00000000e+00  0.00000000e+00  0.00000000e+00  5.68434189e-14\r\n 0.00000000e+00  0.00000000e+00  0.00000000e+00  0.00000000e+00\r\n 0.00000000e+00 -5.68434189e-14  0.00000000e+00  0.00000000e+00\r\n```\r\n\r\nThis pull request is incomplete, as it doesn't cover yet the \"greater than\" comparisions -- not sure how to handle that, round before comparing or use both `assert_allclose` and `assert_array_less` somehow?"},"comment":{"url":"https://api.github.com/repos/OMS-NetZero/FAIR/issues/comments/371061468","html_url":"https://github.com/OMS-NetZero/FAIR/pull/22#issuecomment-371061468","issue_url":"https://api.github.com/repos/OMS-NetZero/FAIR/issues/22","id":371061468,"user":{"login":"rgieseke","id":198537,"avatar_url":"https://avatars2.githubusercontent.com/u/198537?v=4","gravatar_id":"","url":"https://api.github.com/users/rgieseke","html_url":"https://github.com/rgieseke","followers_url":"https://api.github.com/users/rgieseke/followers","following_url":"https://api.github.com/users/rgieseke/following{/other_user}","gists_url":"https://api.github.com/users/rgieseke/gists{/gist_id}","starred_url":"https://api.github.com/users/rgieseke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgieseke/subscriptions","organizations_url":"https://api.github.com/users/rgieseke/orgs","repos_url":"https://api.github.com/users/rgieseke/repos","events_url":"https://api.github.com/users/rgieseke/events{/privacy}","received_events_url":"https://api.github.com/users/rgieseke/received_events","type":"User","site_admin":false},"created_at":"2018-03-07T08:27:55Z","updated_at":"2018-03-07T08:27:55Z","author_association":"CONTRIBUTOR","body":"It seems that dropping the pickle dependency in\r\n\r\nhttps://github.com/OMS-NetZero/FAIR/commit/67695b6bbf21822852ea012c06c806b66555b02d \r\n\r\nalso fixed this testing problem. I only got this error on Mac, not on Linux, so I assume reading the pickle file from a different platform caused this.\r\n\r\nFor future reference, I used this script for testing:\r\n\r\n```bash\r\n#!/bin/bash\r\nMAX_TRIES=5\r\nERRORED=0\r\n\r\nfor (( i=1; i<=$MAX_TRIES; i++ ))\r\n  do\r\n    pytest tests/test_fair.py::test_division --verbose\r\n    if [ $? -eq 1 ]; then\r\n      ERRORED=$((ERRORED + 1))\r\n    fi\r\n  done\r\necho $ERRORED of $MAX_TRIES failed.\r\nif [ $ERRORED -eq 0 ]; then\r\n  exit 0\r\nfi\r\nexit 1\r\n```"}}
{"actor":{"display_login":"rgieseke"}}