{"action":"created","issue":{"url":"https://api.github.com/repos/Cal-CS-61A-Staff/ok/issues/1011","repository_url":"https://api.github.com/repos/Cal-CS-61A-Staff/ok","labels_url":"https://api.github.com/repos/Cal-CS-61A-Staff/ok/issues/1011/labels{/name}","comments_url":"https://api.github.com/repos/Cal-CS-61A-Staff/ok/issues/1011/comments","events_url":"https://api.github.com/repos/Cal-CS-61A-Staff/ok/issues/1011/events","html_url":"https://github.com/Cal-CS-61A-Staff/ok/pull/1011","id":196870508,"number":1011,"title":"Split models into a module","user":{"login":"Sumukh","id":882381,"avatar_url":"https://avatars.githubusercontent.com/u/882381?v=3","gravatar_id":"","url":"https://api.github.com/users/Sumukh","html_url":"https://github.com/Sumukh","followers_url":"https://api.github.com/users/Sumukh/followers","following_url":"https://api.github.com/users/Sumukh/following{/other_user}","gists_url":"https://api.github.com/users/Sumukh/gists{/gist_id}","starred_url":"https://api.github.com/users/Sumukh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sumukh/subscriptions","organizations_url":"https://api.github.com/users/Sumukh/orgs","repos_url":"https://api.github.com/users/Sumukh/repos","events_url":"https://api.github.com/users/Sumukh/events{/privacy}","received_events_url":"https://api.github.com/users/Sumukh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-21T08:09:12Z","updated_at":"2016-12-21T08:14:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Cal-CS-61A-Staff/ok/pulls/1011","html_url":"https://github.com/Cal-CS-61A-Staff/ok/pull/1011","diff_url":"https://github.com/Cal-CS-61A-Staff/ok/pull/1011.diff","patch_url":"https://github.com/Cal-CS-61A-Staff/ok/pull/1011.patch"},"body":"I'm a bit unhappy with how this turned out for three reasons: \r\n\r\n- A giant `__init__.py` file with a bunch of imports so that the current app can continue to function. \r\n- Needed a ModelProxy to handle circular imports (or have to import inside of the function) \r\n- I had to create a model folder inside of models for some reason (It does make the separation nice but I'm don't like the current naming schema) \r\n\r\nSuggestions on how to fix those flaws (or a better way to do the split) would be welcomed. \r\n\r\nWith the current structure we can also further modularize to have: `server/models/canvas/CanvasAssignment.py` - Is this worth it? "},"comment":{"url":"https://api.github.com/repos/Cal-CS-61A-Staff/ok/issues/comments/268462257","html_url":"https://github.com/Cal-CS-61A-Staff/ok/pull/1011#issuecomment-268462257","issue_url":"https://api.github.com/repos/Cal-CS-61A-Staff/ok/issues/1011","id":268462257,"user":{"login":"knrafto","id":2042019,"avatar_url":"https://avatars.githubusercontent.com/u/2042019?v=3","gravatar_id":"","url":"https://api.github.com/users/knrafto","html_url":"https://github.com/knrafto","followers_url":"https://api.github.com/users/knrafto/followers","following_url":"https://api.github.com/users/knrafto/following{/other_user}","gists_url":"https://api.github.com/users/knrafto/gists{/gist_id}","starred_url":"https://api.github.com/users/knrafto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knrafto/subscriptions","organizations_url":"https://api.github.com/users/knrafto/orgs","repos_url":"https://api.github.com/users/knrafto/repos","events_url":"https://api.github.com/users/knrafto/events{/privacy}","received_events_url":"https://api.github.com/users/knrafto/received_events","type":"User","site_admin":false},"created_at":"2016-12-21T08:14:16Z","updated_at":"2016-12-21T08:14:16Z","body":"Perhaps `__init__.py` can use [`__all__`](https://docs.python.org/3/tutorial/modules.html#importing-from-a-package)? I'm not too sure how it works, but my gut feeling is that it might be useful here.\r\n\r\nWhy exactly we need another `model` directory?"}}
{"actor":{"display_login":"knrafto"}}