{"action":"created","issue":{"url":"https://api.github.com/repos/ganga-devs/ganga/issues/229","repository_url":"https://api.github.com/repos/ganga-devs/ganga","labels_url":"https://api.github.com/repos/ganga-devs/ganga/issues/229/labels{/name}","comments_url":"https://api.github.com/repos/ganga-devs/ganga/issues/229/comments","events_url":"https://api.github.com/repos/ganga-devs/ganga/issues/229/events","html_url":"https://github.com/ganga-devs/ganga/issues/229","id":136645875,"number":229,"title":"Job equality broken","user":{"login":"milliams","id":61316,"avatar_url":"https://avatars.githubusercontent.com/u/61316?v=3","gravatar_id":"","url":"https://api.github.com/users/milliams","html_url":"https://github.com/milliams","followers_url":"https://api.github.com/users/milliams/followers","following_url":"https://api.github.com/users/milliams/following{/other_user}","gists_url":"https://api.github.com/users/milliams/gists{/gist_id}","starred_url":"https://api.github.com/users/milliams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milliams/subscriptions","organizations_url":"https://api.github.com/users/milliams/orgs","repos_url":"https://api.github.com/users/milliams/repos","events_url":"https://api.github.com/users/milliams/events{/privacy}","received_events_url":"https://api.github.com/users/milliams/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ganga-devs/ganga/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/ganga-devs/ganga/labels/Core","name":"Core","color":"d4c5f9"},{"url":"https://api.github.com/repos/ganga-devs/ganga/labels/question","name":"question","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/ganga-devs/ganga/milestones/5","html_url":"https://github.com/ganga-devs/ganga/milestones/6.1.17","labels_url":"https://api.github.com/repos/ganga-devs/ganga/milestones/5/labels","id":1583200,"number":5,"title":"6.1.17","description":null,"creator":{"login":"rob-c","id":1102021,"avatar_url":"https://avatars.githubusercontent.com/u/1102021?v=3","gravatar_id":"","url":"https://api.github.com/users/rob-c","html_url":"https://github.com/rob-c","followers_url":"https://api.github.com/users/rob-c/followers","following_url":"https://api.github.com/users/rob-c/following{/other_user}","gists_url":"https://api.github.com/users/rob-c/gists{/gist_id}","starred_url":"https://api.github.com/users/rob-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rob-c/subscriptions","organizations_url":"https://api.github.com/users/rob-c/orgs","repos_url":"https://api.github.com/users/rob-c/repos","events_url":"https://api.github.com/users/rob-c/events{/privacy}","received_events_url":"https://api.github.com/users/rob-c/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":1,"state":"open","created_at":"2016-02-15T12:24:07Z","updated_at":"2016-02-26T13:57:22Z","due_on":null,"closed_at":null},"comments":21,"created_at":"2016-02-26T09:43:05Z","updated_at":"2016-02-26T14:29:15Z","closed_at":null,"body":"There is a test in the legacy suite (*JobCopyConstructor.gpi*) which looks like:\r\n```python\r\nj = Job()\r\nj2 = j.copy()\r\nj3 = Job(j)\r\n\r\nassert j == j2\r\nassert j2 == j3\r\n```\r\nNaïvely I expected this to fail as things like the `id` would have changed but I checked the `Job`'s schema and it has `comparable=0` set on the `id`  (and some other items). \r\n\r\nLooking back at previous results I see that this test was failing in 6.0.44, passing in 6.1.14, still passing in 6.1.13 and failing again in 6.1.14.\r\n\r\nThe code as written should have this test passing as `GangaObject` equivalence ignores attributes with `comparable=0`. The failure for 6.1.16 is due to `postprocessors` not equating which is a bug which needs looking into.\r\n\r\nThe larger question is *what do we want object equality to look like?* In my opinion two `GangaObject`s should only be equal if *all* their schema attributes are the same. `__eq__` at the moment seems to be performing an \"are these two objects a bit similar\" test. If we really want this latter comparison then an `is_similar_to()` function might make sense.\r\n\r\nThoughts?"},"comment":{"url":"https://api.github.com/repos/ganga-devs/ganga/issues/comments/189303227","html_url":"https://github.com/ganga-devs/ganga/issues/229#issuecomment-189303227","issue_url":"https://api.github.com/repos/ganga-devs/ganga/issues/229","id":189303227,"user":{"login":"alexanderrichards","id":4686942,"avatar_url":"https://avatars.githubusercontent.com/u/4686942?v=3","gravatar_id":"","url":"https://api.github.com/users/alexanderrichards","html_url":"https://github.com/alexanderrichards","followers_url":"https://api.github.com/users/alexanderrichards/followers","following_url":"https://api.github.com/users/alexanderrichards/following{/other_user}","gists_url":"https://api.github.com/users/alexanderrichards/gists{/gist_id}","starred_url":"https://api.github.com/users/alexanderrichards/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexanderrichards/subscriptions","organizations_url":"https://api.github.com/users/alexanderrichards/orgs","repos_url":"https://api.github.com/users/alexanderrichards/repos","events_url":"https://api.github.com/users/alexanderrichards/events{/privacy}","received_events_url":"https://api.github.com/users/alexanderrichards/received_events","type":"User","site_admin":false},"created_at":"2016-02-26T14:29:15Z","updated_at":"2016-02-26T14:29:15Z","body":"hmm.. I see your point. What is done currently for `hidden` attributes? are they automatically `comparable=0` This is exactly why we should discuss what we want the behaviour to be **before** we go away and attempt to fix something."}}