{"action":"created","issue":{"url":"https://api.github.com/repos/SciTools/iris/issues/2989","repository_url":"https://api.github.com/repos/SciTools/iris","labels_url":"https://api.github.com/repos/SciTools/iris/issues/2989/labels{/name}","comments_url":"https://api.github.com/repos/SciTools/iris/issues/2989/comments","events_url":"https://api.github.com/repos/SciTools/iris/issues/2989/events","html_url":"https://github.com/SciTools/iris/pull/2989","id":306515953,"number":2989,"title":"Fix imagehash hex_to_hash","user":{"login":"bjlittle","id":2051656,"avatar_url":"https://avatars2.githubusercontent.com/u/2051656?v=4","gravatar_id":"","url":"https://api.github.com/users/bjlittle","html_url":"https://github.com/bjlittle","followers_url":"https://api.github.com/users/bjlittle/followers","following_url":"https://api.github.com/users/bjlittle/following{/other_user}","gists_url":"https://api.github.com/users/bjlittle/gists{/gist_id}","starred_url":"https://api.github.com/users/bjlittle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjlittle/subscriptions","organizations_url":"https://api.github.com/users/bjlittle/orgs","repos_url":"https://api.github.com/users/bjlittle/repos","events_url":"https://api.github.com/users/bjlittle/events{/privacy}","received_events_url":"https://api.github.com/users/bjlittle/received_events","type":"User","site_admin":false},"labels":[{"id":728150363,"url":"https://api.github.com/repos/SciTools/iris/labels/SemVer:%20Minor","name":"SemVer: Minor","color":"0e8a16","default":false},{"id":365079235,"url":"https://api.github.com/repos/SciTools/iris/labels/Status:%20Work%20in%20progress","name":"Status: Work in progress","color":"fef2c0","default":false},{"id":10968491,"url":"https://api.github.com/repos/SciTools/iris/labels/Type:%20Bug","name":"Type: Bug","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-03-19T15:38:58Z","updated_at":"2018-03-22T09:21:57Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/SciTools/iris/pulls/2989","html_url":"https://github.com/SciTools/iris/pull/2989","diff_url":"https://github.com/SciTools/iris/pull/2989.diff","patch_url":"https://github.com/SciTools/iris/pull/2989.patch"},"body":"This PR addresses the issue of the `imagehash` package releasing version `4.0`, which addresses an error in the creation of hashes, see https://github.com/JohannesBuchner/imagehash#changelog\r\n\r\n- [x] Apply fix to `idiff`\r\n- [x] Investigate new test failure image and update `imagerepo.json` and `test-iris-imagehash` repo\r\n- [x] Check `.travis-ci` for `test-iris-imagehash` repo\r\n\r\nCloses #2973, #2974 "},"comment":{"url":"https://api.github.com/repos/SciTools/iris/issues/comments/375230229","html_url":"https://github.com/SciTools/iris/pull/2989#issuecomment-375230229","issue_url":"https://api.github.com/repos/SciTools/iris/issues/2989","id":375230229,"user":{"login":"bjlittle","id":2051656,"avatar_url":"https://avatars2.githubusercontent.com/u/2051656?v=4","gravatar_id":"","url":"https://api.github.com/users/bjlittle","html_url":"https://github.com/bjlittle","followers_url":"https://api.github.com/users/bjlittle/followers","following_url":"https://api.github.com/users/bjlittle/following{/other_user}","gists_url":"https://api.github.com/users/bjlittle/gists{/gist_id}","starred_url":"https://api.github.com/users/bjlittle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjlittle/subscriptions","organizations_url":"https://api.github.com/users/bjlittle/orgs","repos_url":"https://api.github.com/users/bjlittle/repos","events_url":"https://api.github.com/users/bjlittle/events{/privacy}","received_events_url":"https://api.github.com/users/bjlittle/received_events","type":"User","site_admin":false},"created_at":"2018-03-22T09:21:56Z","updated_at":"2018-03-22T09:21:56Z","author_association":"OWNER","body":"@corinnebosley Going forwards, we'll definitely need to retain the old hashes, so that prior versions of iris will have functional image testing. If we remove the old hashes in `test-iris-imagehash`, then we break iris testing prior to 2.0 - which is a bad thing. So we need to keep them.\r\n\r\nThat said, it should be possible to not double up the size of the `test-iris-imagehash` repo, but simply keeping all the images with old hash filenames, but also create links to those files but with new hash names and store those links in say a new `images/v4` folder. So the new and old hashes are not mixed (the same is true for the `imagerepo.json` file within iris) and the new hash images could be referenced from the URL `https://scitools.github.io/test-iris-imagehash/images/v4/...`\r\n\r\nWith this approach, we keep the old and new separate, we don't double up the `test-iris-imagehash` repo, and we simplify the code going forwards i.e. we not supporting retro versions of `imagehash` within iris. So, from henceforth we're using `imagehash` v4, our `imagerepo.json` references the `images/v4` images and the code in iris does not use `old_hex_to_hash`.\r\n\r\nThis seems like a cleaner approach to me, plus we can (easily) rip the perceptual imagehash functionality out of iris into a separate package, if we want to at a future date.\r\n\r\nThe `test-iris-imagehash` repo hasn't really grown that much since we first created it, which is what I hoped for, as the perceptual hashing gives us a more controlled tolerance on image testing, than say using RMS of an image ... so it's kinda stood the test of time so far. However, the next BIG change will be unpinning matplotlib from 1.5 for iris to use matplotlib 2+ ... I would expect this to have an impact on the image testing, but I'd hope that the impact is limited given what perceptual image hashing purports to provide. But when we do start using mpl 2+ within iris, then we'd only generate new hashes using `imagehash` v4 and store any new images in the `images/v4` of `test-iris-imagehash` ... we wouldn't do this retrospectively for iris 1.13 and the old hashes - there is no LTS for iris 1.13, only bug fixes"}}
{"actor":{"display_login":"bjlittle"}}