{"action":"created","issue":{"url":"https://api.github.com/repos/sourcecred/sourcecred/issues/792","repository_url":"https://api.github.com/repos/sourcecred/sourcecred","labels_url":"https://api.github.com/repos/sourcecred/sourcecred/issues/792/labels{/name}","comments_url":"https://api.github.com/repos/sourcecred/sourcecred/issues/792/comments","events_url":"https://api.github.com/repos/sourcecred/sourcecred/issues/792/events","html_url":"https://github.com/sourcecred/sourcecred/pull/792","id":357815588,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzNzQxMjg0","number":792,"title":"`credExplorer/App` stores weights, not evaluator","user":{"login":"decentralion","id":1400023,"node_id":"MDQ6VXNlcjE0MDAwMjM=","avatar_url":"https://avatars2.githubusercontent.com/u/1400023?v=4","gravatar_id":"","url":"https://api.github.com/users/decentralion","html_url":"https://github.com/decentralion","followers_url":"https://api.github.com/users/decentralion/followers","following_url":"https://api.github.com/users/decentralion/following{/other_user}","gists_url":"https://api.github.com/users/decentralion/gists{/gist_id}","starred_url":"https://api.github.com/users/decentralion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/decentralion/subscriptions","organizations_url":"https://api.github.com/users/decentralion/orgs","repos_url":"https://api.github.com/users/decentralion/repos","events_url":"https://api.github.com/users/decentralion/events{/privacy}","received_events_url":"https://api.github.com/users/decentralion/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-06T20:31:30Z","updated_at":"2018-09-06T21:57:09Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/sourcecred/sourcecred/pulls/792","html_url":"https://github.com/sourcecred/sourcecred/pull/792","diff_url":"https://github.com/sourcecred/sourcecred/pull/792.diff","patch_url":"https://github.com/sourcecred/sourcecred/pull/792.patch"},"body":"This commit refactors `credExplorer/App` so that instead of storing an\r\n`EdgeEvaulator` in its state, it stores `WeightedTypes` instead. This\r\nhas a few benefits:\r\n\r\n- It's trivial to generate the right default value for `WeightedTypes`,\r\nso we no longer allow the variable to be nullable in the state. This\r\nsimplifies logic, removes an error case, and means that we don't require\r\nthe `WeightConfig` to mount before the app is usable.\r\n- `WeightedTypes` are serializable and can be tested for equality, so\r\nthey are a better-behaved piece of state\r\n- We put off the information-destroying transformation as long as\r\npossible\r\n- In the future, I think we may want to move the weights/types concept\r\ninto core, at which point the `WeightedTypes` will directly be consumed\r\nby the `core/attribution` module.\r\n\r\nTest plan: Unit tests are pretty thorough; to be safe, I tested the UI\r\nmyself."},"comment":{"url":"https://api.github.com/repos/sourcecred/sourcecred/issues/comments/419254421","html_url":"https://github.com/sourcecred/sourcecred/pull/792#issuecomment-419254421","issue_url":"https://api.github.com/repos/sourcecred/sourcecred/issues/792","id":419254421,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTI1NDQyMQ==","user":{"login":"decentralion","id":1400023,"node_id":"MDQ6VXNlcjE0MDAwMjM=","avatar_url":"https://avatars2.githubusercontent.com/u/1400023?v=4","gravatar_id":"","url":"https://api.github.com/users/decentralion","html_url":"https://github.com/decentralion","followers_url":"https://api.github.com/users/decentralion/followers","following_url":"https://api.github.com/users/decentralion/following{/other_user}","gists_url":"https://api.github.com/users/decentralion/gists{/gist_id}","starred_url":"https://api.github.com/users/decentralion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/decentralion/subscriptions","organizations_url":"https://api.github.com/users/decentralion/orgs","repos_url":"https://api.github.com/users/decentralion/repos","events_url":"https://api.github.com/users/decentralion/events{/privacy}","received_events_url":"https://api.github.com/users/decentralion/received_events","type":"User","site_admin":false},"created_at":"2018-09-06T21:57:09Z","updated_at":"2018-09-06T21:57:09Z","author_association":"MEMBER","body":"This is a great suggestion. It's a suggestion that will be easier to implement after this PR is merged - because then we have the WeightedTypes at the top level state, and can canonicalize it and pass it down to the children. If you approve this I'll send a PR implementing your suggestion shortly."}}
{"actor":{"display_login":"decentralion"}}