{"action":"created","issue":{"url":"https://api.github.com/repos/tarbell-project/tarbell/issues/305","labels_url":"https://api.github.com/repos/tarbell-project/tarbell/issues/305/labels{/name}","comments_url":"https://api.github.com/repos/tarbell-project/tarbell/issues/305/comments","events_url":"https://api.github.com/repos/tarbell-project/tarbell/issues/305/events","html_url":"https://github.com/tarbell-project/tarbell/issues/305","id":64073353,"number":305,"title":"Loading project settings as a python module","user":{"login":"jywsn","id":1178533,"avatar_url":"https://avatars.githubusercontent.com/u/1178533?v=3","gravatar_id":"","url":"https://api.github.com/users/jywsn","html_url":"https://github.com/jywsn","followers_url":"https://api.github.com/users/jywsn/followers","following_url":"https://api.github.com/users/jywsn/following{/other_user}","gists_url":"https://api.github.com/users/jywsn/gists{/gist_id}","starred_url":"https://api.github.com/users/jywsn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jywsn/subscriptions","organizations_url":"https://api.github.com/users/jywsn/orgs","repos_url":"https://api.github.com/users/jywsn/repos","events_url":"https://api.github.com/users/jywsn/events{/privacy}","received_events_url":"https://api.github.com/users/jywsn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-03-24T18:58:58Z","updated_at":"2015-04-21T17:34:56Z","closed_at":null,"body":"I'm working on the admin GUI interface (via knightlab).  The GUI is going to be run as a flask server.  I'm trying to implement viewing and editing of per-project configs.  The project configs are saved as python modules (i.e. tarbell_config.py) within each project.  So, to read a project config, I was loading that module using imp.find_module/load_module.  \r\n\r\nThe problem is that load_module is equivalent to reload(), and when a module is reloaded, its dictionary (containing the module’s global variables) is retained.  If the new version of a module does not define a name that was defined by the old version, the old definition remains.  So, if I load the config for project A (which has spreadsheet key) and then load the config for project B (which does not have a spreadsheet key), it will look to the loading process like project B has a spreadsheet key.\r\n\r\nI don't know how to handle this problem, barring trying to read and parse the the tarbell_config.py files myself, which seems like an exercise in frustration.  And, this will probably affect other parts of the admin site.    Please advise.  Can't do anything else until the issue is resolved."},"comment":{"url":"https://api.github.com/repos/tarbell-project/tarbell/issues/comments/94881330","html_url":"https://github.com/tarbell-project/tarbell/issues/305#issuecomment-94881330","issue_url":"https://api.github.com/repos/tarbell-project/tarbell/issues/305","id":94881330,"user":{"login":"eads","id":634572,"avatar_url":"https://avatars.githubusercontent.com/u/634572?v=3","gravatar_id":"","url":"https://api.github.com/users/eads","html_url":"https://github.com/eads","followers_url":"https://api.github.com/users/eads/followers","following_url":"https://api.github.com/users/eads/following{/other_user}","gists_url":"https://api.github.com/users/eads/gists{/gist_id}","starred_url":"https://api.github.com/users/eads/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eads/subscriptions","organizations_url":"https://api.github.com/users/eads/orgs","repos_url":"https://api.github.com/users/eads/repos","events_url":"https://api.github.com/users/eads/events{/privacy}","received_events_url":"https://api.github.com/users/eads/received_events","type":"User","site_admin":false},"created_at":"2015-04-21T17:34:56Z","updated_at":"2015-04-21T17:34:56Z","body":"Yes! Next Monday or Weds could work nicely.\n\nOn Tue, Apr 21, 2015 at 1:30 PM, Heather Billings <notifications@github.com>\nwrote:\n\n> bump. Can we do this next week?\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/tarbell-project/tarbell/issues/305#issuecomment-94880364>\n> .\n>\n\n\n\n-- \nDavid Eads | http://recoveredfactory.net\n\n\"Medical statistics will be our standard of measurement: we will weigh life\nfor life and see where the dead lie thicker, among the workers or among the\nprivileged.\" -- Rudolf Virchow\n"}}