{"action":"created","issue":{"url":"https://api.github.com/repos/imagej/imagej-ops/issues/458","repository_url":"https://api.github.com/repos/imagej/imagej-ops","labels_url":"https://api.github.com/repos/imagej/imagej-ops/issues/458/labels{/name}","comments_url":"https://api.github.com/repos/imagej/imagej-ops/issues/458/comments","events_url":"https://api.github.com/repos/imagej/imagej-ops/issues/458/events","html_url":"https://github.com/imagej/imagej-ops/issues/458","id":183451118,"number":458,"title":"Expand Contingent API to allow a reason","user":{"login":"ctrueden","id":556626,"avatar_url":"https://avatars.githubusercontent.com/u/556626?v=3","gravatar_id":"","url":"https://api.github.com/users/ctrueden","html_url":"https://github.com/ctrueden","followers_url":"https://api.github.com/users/ctrueden/followers","following_url":"https://api.github.com/users/ctrueden/following{/other_user}","gists_url":"https://api.github.com/users/ctrueden/gists{/gist_id}","starred_url":"https://api.github.com/users/ctrueden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctrueden/subscriptions","organizations_url":"https://api.github.com/users/ctrueden/orgs","repos_url":"https://api.github.com/users/ctrueden/repos","events_url":"https://api.github.com/users/ctrueden/events{/privacy}","received_events_url":"https://api.github.com/users/ctrueden/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"ctrueden","id":556626,"avatar_url":"https://avatars.githubusercontent.com/u/556626?v=3","gravatar_id":"","url":"https://api.github.com/users/ctrueden","html_url":"https://github.com/ctrueden","followers_url":"https://api.github.com/users/ctrueden/followers","following_url":"https://api.github.com/users/ctrueden/following{/other_user}","gists_url":"https://api.github.com/users/ctrueden/gists{/gist_id}","starred_url":"https://api.github.com/users/ctrueden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctrueden/subscriptions","organizations_url":"https://api.github.com/users/ctrueden/orgs","repos_url":"https://api.github.com/users/ctrueden/repos","events_url":"https://api.github.com/users/ctrueden/events{/privacy}","received_events_url":"https://api.github.com/users/ctrueden/received_events","type":"User","site_admin":false},"assignees":[{"login":"ctrueden","id":556626,"avatar_url":"https://avatars.githubusercontent.com/u/556626?v=3","gravatar_id":"","url":"https://api.github.com/users/ctrueden","html_url":"https://github.com/ctrueden","followers_url":"https://api.github.com/users/ctrueden/followers","following_url":"https://api.github.com/users/ctrueden/following{/other_user}","gists_url":"https://api.github.com/users/ctrueden/gists{/gist_id}","starred_url":"https://api.github.com/users/ctrueden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctrueden/subscriptions","organizations_url":"https://api.github.com/users/ctrueden/orgs","repos_url":"https://api.github.com/users/ctrueden/repos","events_url":"https://api.github.com/users/ctrueden/events{/privacy}","received_events_url":"https://api.github.com/users/ctrueden/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/imagej/imagej-ops/milestones/3","html_url":"https://github.com/imagej/imagej-ops/milestones/1.0.0","labels_url":"https://api.github.com/repos/imagej/imagej-ops/milestones/3/labels","id":620621,"number":3,"title":"1.0.0","description":"First stable release with a goal of future backwards compatibility according to [SemVer](http://semver.org).","creator":{"login":"ctrueden","id":556626,"avatar_url":"https://avatars.githubusercontent.com/u/556626?v=3","gravatar_id":"","url":"https://api.github.com/users/ctrueden","html_url":"https://github.com/ctrueden","followers_url":"https://api.github.com/users/ctrueden/followers","following_url":"https://api.github.com/users/ctrueden/following{/other_user}","gists_url":"https://api.github.com/users/ctrueden/gists{/gist_id}","starred_url":"https://api.github.com/users/ctrueden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctrueden/subscriptions","organizations_url":"https://api.github.com/users/ctrueden/orgs","repos_url":"https://api.github.com/users/ctrueden/repos","events_url":"https://api.github.com/users/ctrueden/events{/privacy}","received_events_url":"https://api.github.com/users/ctrueden/received_events","type":"User","site_admin":false},"open_issues":15,"closed_issues":1,"state":"open","created_at":"2014-04-04T15:52:06Z","updated_at":"2016-10-17T15:38:05Z","due_on":"2016-12-31T06:00:00Z","closed_at":null},"comments":2,"created_at":"2016-10-17T15:37:59Z","updated_at":"2016-10-17T17:58:46Z","closed_at":null,"body":"When ops do not conform due to the `conforms()` method of `Contingent` returning `false`, there is currently no way to express _why_ the contingency fails. We should expand the contract somehow to provide this. Options which occur to me:\r\n\r\n* Throw unchecked `IllegalArgumentException` in `conforms()` in cases where the inputs do not conform. This makes the `boolean` return type moot, so we could additionally change the method signature to `void checkInputs()` or something like that. Obviously, that would be a breaking change, but better now than later.\r\n* Same as previous, but throw a checked `ContingencyException` instead.\r\n* Add a `String getNonConformanceReason()` method or similar to `Contingent`, with default implementation returning `null` or empty string.\r\n* Use SJC's [Cancelable](https://github.com/scijava/scijava-common/blob/scijava-common-2.60.2/src/main/java/org/scijava/Cancelable.java) interface. Ops that implement `Cancelable` in addition to `Contingent` can flag themselves as canceled during the `conforms()` code, which will let them provide a cancelation reason.\r\n\r\n@dietzc, @kephale and others: Do you have a design preference here? I am leaning toward `Cancelable`."},"comment":{"url":"https://api.github.com/repos/imagej/imagej-ops/issues/comments/254283775","html_url":"https://github.com/imagej/imagej-ops/issues/458#issuecomment-254283775","issue_url":"https://api.github.com/repos/imagej/imagej-ops/issues/458","id":254283775,"user":{"login":"ctrueden","id":556626,"avatar_url":"https://avatars.githubusercontent.com/u/556626?v=3","gravatar_id":"","url":"https://api.github.com/users/ctrueden","html_url":"https://github.com/ctrueden","followers_url":"https://api.github.com/users/ctrueden/followers","following_url":"https://api.github.com/users/ctrueden/following{/other_user}","gists_url":"https://api.github.com/users/ctrueden/gists{/gist_id}","starred_url":"https://api.github.com/users/ctrueden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctrueden/subscriptions","organizations_url":"https://api.github.com/users/ctrueden/orgs","repos_url":"https://api.github.com/users/ctrueden/repos","events_url":"https://api.github.com/users/ctrueden/events{/privacy}","received_events_url":"https://api.github.com/users/ctrueden/received_events","type":"User","site_admin":false},"created_at":"2016-10-17T17:58:46Z","updated_at":"2016-10-17T17:58:46Z","body":"@dietzc Yeah that is a good point. We should reserve the use of `Cancelable` for canceling during _operation_ (i.e., `run`), not during matching."}}
{"actor":{"display_login":"ctrueden"}}