{"action":"created","issue":{"url":"https://api.github.com/repos/jeff1evesque/machine-learning/issues/2813","repository_url":"https://api.github.com/repos/jeff1evesque/machine-learning","labels_url":"https://api.github.com/repos/jeff1evesque/machine-learning/issues/2813/labels{/name}","comments_url":"https://api.github.com/repos/jeff1evesque/machine-learning/issues/2813/comments","events_url":"https://api.github.com/repos/jeff1evesque/machine-learning/issues/2813/events","html_url":"https://github.com/jeff1evesque/machine-learning/issues/2813","id":190536906,"number":2813,"title":"Implement 'flask-login' for user login and logout","user":{"login":"jeff1evesque","id":2907085,"avatar_url":"https://avatars.githubusercontent.com/u/2907085?v=3","gravatar_id":"","url":"https://api.github.com/users/jeff1evesque","html_url":"https://github.com/jeff1evesque","followers_url":"https://api.github.com/users/jeff1evesque/followers","following_url":"https://api.github.com/users/jeff1evesque/following{/other_user}","gists_url":"https://api.github.com/users/jeff1evesque/gists{/gist_id}","starred_url":"https://api.github.com/users/jeff1evesque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeff1evesque/subscriptions","organizations_url":"https://api.github.com/users/jeff1evesque/orgs","repos_url":"https://api.github.com/users/jeff1evesque/repos","events_url":"https://api.github.com/users/jeff1evesque/events{/privacy}","received_events_url":"https://api.github.com/users/jeff1evesque/received_events","type":"User","site_admin":false},"labels":[{"id":251301232,"url":"https://api.github.com/repos/jeff1evesque/machine-learning/labels/build","name":"build","color":"8A23A9","default":false},{"id":121639637,"url":"https://api.github.com/repos/jeff1evesque/machine-learning/labels/invalid","name":"invalid","color":"e6e6e6","default":true},{"id":251300579,"url":"https://api.github.com/repos/jeff1evesque/machine-learning/labels/new%20feature","name":"new feature","color":"291D94","default":false},{"id":265539692,"url":"https://api.github.com/repos/jeff1evesque/machine-learning/labels/unit%20test","name":"unit test","color":"bfe5bf","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/jeff1evesque/machine-learning/milestones/5","html_url":"https://github.com/jeff1evesque/machine-learning/milestones/0.5","labels_url":"https://api.github.com/repos/jeff1evesque/machine-learning/milestones/5/labels","id":1362064,"number":5,"title":"0.5","description":"The following features will be added:\r\n\r\n- web-interface to allow users to create an account, stored in the database\r\n- web-interface to validate logged in users\r\n- implemented 'flask-login' to maintain state of logged-in vs logged-out user\r\n- web-interface to allow users to review all datasets they stored:\r\n  - delete portions of the dataset\r\n- web-interface to allow users to review all models they stored:\r\n  - delete created models\r\n- implement nginx webserver\r\n- split `tbl_feature_value` into two tables:\r\n  - `tbl_svm_data`\r\n  - `tbl_svr_data`\r\n- `index` relevant database tables\r\n- ensure more specific `assert` unit tests for programmatic-interface\r\n- ensure webcompilers autocompiles when any partial / jsx template is modified\r\n- enhanced `documentation/` by reducing `README.md`\r\n- created additional unit tests to verify authentication processes\r\n  - manual\r\n  - live-server\r\n- created front-end validators for `/login`, and `/registration` (similar to backend logic)\r\n- increased application memory in `Vagrantfile` to `10,000`mb, to ensure application (including `scrypt`) does not exhaust memory during it's processes\r\n- reduced `README.md` by creating `documentation/` directory\r\n  - later milestone will implement [sphinx](http://www.sphinx-doc.org/en/1.4.8/) to generate a documentation website","creator":{"login":"jeff1evesque","id":2907085,"avatar_url":"https://avatars.githubusercontent.com/u/2907085?v=3","gravatar_id":"","url":"https://api.github.com/users/jeff1evesque","html_url":"https://github.com/jeff1evesque","followers_url":"https://api.github.com/users/jeff1evesque/followers","following_url":"https://api.github.com/users/jeff1evesque/following{/other_user}","gists_url":"https://api.github.com/users/jeff1evesque/gists{/gist_id}","starred_url":"https://api.github.com/users/jeff1evesque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeff1evesque/subscriptions","organizations_url":"https://api.github.com/users/jeff1evesque/orgs","repos_url":"https://api.github.com/users/jeff1evesque/repos","events_url":"https://api.github.com/users/jeff1evesque/events{/privacy}","received_events_url":"https://api.github.com/users/jeff1evesque/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":96,"state":"open","created_at":"2015-10-18T04:16:23Z","updated_at":"2016-11-23T01:52:01Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2016-11-20T03:28:09Z","updated_at":"2016-11-23T12:57:44Z","closed_at":"2016-11-23T01:50:09Z","body":"We need to store logged-in users state, via the [Flask-Login](https://flask-login.readthedocs.io/en/latest/) api.  This means, we'll need to add the corresponding package to our puppet build.  Additionally, we need to create some logic to allow users to logout, after logging in."},"comment":{"url":"https://api.github.com/repos/jeff1evesque/machine-learning/issues/comments/262506045","html_url":"https://github.com/jeff1evesque/machine-learning/issues/2813#issuecomment-262506045","issue_url":"https://api.github.com/repos/jeff1evesque/machine-learning/issues/2813","id":262506045,"user":{"login":"doobeh","id":470417,"avatar_url":"https://avatars.githubusercontent.com/u/470417?v=3","gravatar_id":"","url":"https://api.github.com/users/doobeh","html_url":"https://github.com/doobeh","followers_url":"https://api.github.com/users/doobeh/followers","following_url":"https://api.github.com/users/doobeh/following{/other_user}","gists_url":"https://api.github.com/users/doobeh/gists{/gist_id}","starred_url":"https://api.github.com/users/doobeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doobeh/subscriptions","organizations_url":"https://api.github.com/users/doobeh/orgs","repos_url":"https://api.github.com/users/doobeh/repos","events_url":"https://api.github.com/users/doobeh/events{/privacy}","received_events_url":"https://api.github.com/users/doobeh/received_events","type":"User","site_admin":false},"created_at":"2016-11-23T12:57:44Z","updated_at":"2016-11-23T12:57:44Z","body":"To help clarify why the load_user code is currently having issues, use this code to get a visual debug of what's going on versus expectations:\r\n\r\n```python\r\n@login_manager.user_loader\r\ndef load_user(uid):\r\n    print(\"Supplied id is {}\".format(uid))\r\n    # local variables\r\n    account = Retrieve_Account()\r\n    email = account.get_email(username)['result']\r\n    print(\"Result of email check is {}\".format(email))\r\n    username = account.get_username(uid)['result']\r\n    print(\"Result of username check is {}\".format(username))\r\n\r\n    # return\r\n    if (uid and username and email):\r\n        print(\"I have a complete set of ingredients for a User object!\")\r\n        return User(uid, username, email)\r\n\r\n    else:\r\n        print(\"I failed! I'm missing an ingredient!\")\r\n        return None\r\n```\r\n\r\n`uid` is a unicode id-- which in the case of your models is `1`, `2` etc.  If you look at your code for `account.get_email(username)` where is username ever set?"}}
{"actor":{"display_login":"doobeh"}}