{"action":"created","issue":{"url":"https://api.github.com/repos/psychopy/psychopy/issues/1056","labels_url":"https://api.github.com/repos/psychopy/psychopy/issues/1056/labels{/name}","comments_url":"https://api.github.com/repos/psychopy/psychopy/issues/1056/comments","events_url":"https://api.github.com/repos/psychopy/psychopy/issues/1056/events","html_url":"https://github.com/psychopy/psychopy/issues/1056","id":120165036,"number":1056,"title":"style-related refactoring","user":{"login":"jeremygray","id":382342,"avatar_url":"https://avatars.githubusercontent.com/u/382342?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremygray","html_url":"https://github.com/jeremygray","followers_url":"https://api.github.com/users/jeremygray/followers","following_url":"https://api.github.com/users/jeremygray/following{/other_user}","gists_url":"https://api.github.com/users/jeremygray/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremygray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremygray/subscriptions","organizations_url":"https://api.github.com/users/jeremygray/orgs","repos_url":"https://api.github.com/users/jeremygray/repos","events_url":"https://api.github.com/users/jeremygray/events{/privacy}","received_events_url":"https://api.github.com/users/jeremygray/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-12-03T12:57:54Z","updated_at":"2015-12-07T11:13:34Z","closed_at":null,"body":"To reduce technical debt and set the stage for further awesomeness, here's a summary of suggestions after discussion on the dev list. Ideally do them all at once, but that is not so realistic. Need to watch out for merge conflicts. I'll edit and check things off as we go.\r\n\r\nStrong consensus, easy to do:\r\n- [ ] Remove all implicit relative imports. After discussion (see #1058), use explicit relative for anything that is conceptually \"local\", and absolute for anything in (or going through) top-level (psychopy/)\r\n- [ ] Add `from __future__ import absolute_imports, print_function` to all files (but not demos); handle `division` separately (see #1061); or confirm that nothing breaks and do it sooner.\r\n- [ ] Remove `-*- coding: utf-8 -*-` from files that do not need it (most do not)\r\n- [ ] Update all old-style classes to new style. Find them with `git grep -ne ':$' | grep ':class*' | grep \\(\\)`\r\n- [ ] Remove code that exclusively supports python 2.6.x or earlier (like the `_relpath()` function in builder.py). Need to update documentation to say works with python 2.7 only.\r\n- [ ] Remove all use of wildcard imports, except in: `builder.__init__.py`, `coder.__init__.py`, `hardware/joystick/pyglet_input/*`, `iohub/devices/daq/hw/mc/__init__.py`\r\n- [ ] Remove all unused cruft imports (but not where deliberate, like in misc.py). This can be tricky to tell in some cases. These should be left alone, for example: `try: _translate except: import localization`. For further consideration: do more conditional and or more lazy importing.\r\n- [ ] Remove all mutables as default parameter values\r\n- [ ] Replace exec with eval whenever possible, which is most but not all places.\r\n- [ ] Remove all bare except statements. Use `except Exception:` instead when need very general. It allows `sys.exit()` and `KeyboardInterrupt` to raise (= good). Use a more precise Exception when possible, of course\r\n- [ ] Fewer long lines; getting to none is not worth it, readability is important. PEP-8 suggests 79 chars. Using `autopep8` will do a lot of this, but review by human is important too. \r\n- [ ] Add more doc-strings\r\n- [ ] Rename MonitorCenter.py to be monitorCenter.py, Darwin.spec -> darwin.spec, other .spec files. (And if we move to non_camel_case, then it would further change to monitor_center.py, along with many other things migrating at the same time.)\r\n\r\nStrong consensus, just need the usual care to avoid merge conflicts:\r\n- [ ] Split builder.py into several files\r\n- [ ] Split data.py (issue #1053 )\r\n\r\nGood consensus, need to wide coordination to avoid merge conflagrations:\r\n- [ ] Do autopep8 on everything. Review by hand. Do lose the git-blame history, unfortunately.\r\n- [ ] Ensure a final newline in every file when autopep8\r\n- [ ] Eemove all trailing whitespace when autopep8\r\n- [ ] Standardize the doc-string style (numpy vs google)\r\n\r\nStrong consensus, unclear timeline:\r\n- [ ] Support python3 (#1061). Would be good to do at the same time as `lowerCamel` -> `snakey_snake` (if we end up doing that). \r\n\r\nNo consensus, and still needs more community input:\r\n- [ ] Migrate `lowerCamelCase` -> `lower_camel_case` for vars and methods / functions. I am working on a migration tool (https://github.com/jeremygray/psychopy/commit/d3283df6dab647f6dcdd4fb5deacdcc80cd6014d)\r\n- [ ] Remove code that has been deprecated for a long time, say pre-1.75.00 or something. \r\n\r\nSome consensus against; can revisit if / when more discussion:\r\n- [x] Do not do: Move implementations out of `__init__.py` (#1054)"},"comment":{"url":"https://api.github.com/repos/psychopy/psychopy/issues/comments/162487720","html_url":"https://github.com/psychopy/psychopy/issues/1056#issuecomment-162487720","issue_url":"https://api.github.com/repos/psychopy/psychopy/issues/1056","id":162487720,"user":{"login":"hoechenberger","id":2046265,"avatar_url":"https://avatars.githubusercontent.com/u/2046265?v=3","gravatar_id":"","url":"https://api.github.com/users/hoechenberger","html_url":"https://github.com/hoechenberger","followers_url":"https://api.github.com/users/hoechenberger/followers","following_url":"https://api.github.com/users/hoechenberger/following{/other_user}","gists_url":"https://api.github.com/users/hoechenberger/gists{/gist_id}","starred_url":"https://api.github.com/users/hoechenberger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoechenberger/subscriptions","organizations_url":"https://api.github.com/users/hoechenberger/orgs","repos_url":"https://api.github.com/users/hoechenberger/repos","events_url":"https://api.github.com/users/hoechenberger/events{/privacy}","received_events_url":"https://api.github.com/users/hoechenberger/received_events","type":"User","site_admin":false},"created_at":"2015-12-07T11:13:34Z","updated_at":"2015-12-07T11:13:34Z","body":"I would also say that we should ADD this to any files missing it, i.e., create some kind of header common to all source files, as was proposed with regard to the import statements."}}