{"action":"created","issue":{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/404","labels_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/404/labels{/name}","comments_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/404/comments","events_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/404/events","html_url":"https://github.com/MDAnalysis/mdanalysis/issues/404","id":103685068,"number":404,"title":"style guide","user":{"login":"orbeckst","id":237980,"avatar_url":"https://avatars.githubusercontent.com/u/237980?v=3","gravatar_id":"","url":"https://api.github.com/users/orbeckst","html_url":"https://github.com/orbeckst","followers_url":"https://api.github.com/users/orbeckst/followers","following_url":"https://api.github.com/users/orbeckst/following{/other_user}","gists_url":"https://api.github.com/users/orbeckst/gists{/gist_id}","starred_url":"https://api.github.com/users/orbeckst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orbeckst/subscriptions","organizations_url":"https://api.github.com/users/orbeckst/orgs","repos_url":"https://api.github.com/users/orbeckst/repos","events_url":"https://api.github.com/users/orbeckst/events{/privacy}","received_events_url":"https://api.github.com/users/orbeckst/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/labels/Component-Docs","name":"Component-Docs","color":"009800"},{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/labels/maintainability","name":"maintainability","color":"fbca04"},{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/labels/Priority-Medium","name":"Priority-Medium","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/milestones/2","html_url":"https://github.com/MDAnalysis/mdanalysis/milestones/1.0","labels_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/milestones/2/labels","id":1061065,"number":2,"title":"1.0","description":"For the 1.0 release we want a stable API. The public API must remain backward-compatible for all 1.x releases.","creator":{"login":"orbeckst","id":237980,"avatar_url":"https://avatars.githubusercontent.com/u/237980?v=3","gravatar_id":"","url":"https://api.github.com/users/orbeckst","html_url":"https://github.com/orbeckst","followers_url":"https://api.github.com/users/orbeckst/followers","following_url":"https://api.github.com/users/orbeckst/following{/other_user}","gists_url":"https://api.github.com/users/orbeckst/gists{/gist_id}","starred_url":"https://api.github.com/users/orbeckst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orbeckst/subscriptions","organizations_url":"https://api.github.com/users/orbeckst/orgs","repos_url":"https://api.github.com/users/orbeckst/repos","events_url":"https://api.github.com/users/orbeckst/events{/privacy}","received_events_url":"https://api.github.com/users/orbeckst/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":4,"state":"open","created_at":"2015-04-09T22:08:20Z","updated_at":"2015-08-28T09:35:33Z","due_on":"2015-10-31T07:00:00Z","closed_at":null},"comments":0,"created_at":"2015-08-28T09:35:33Z","updated_at":"2015-08-29T11:30:41Z","closed_at":null,"body":"With an active and diverse developer community we need to spell out more clearly what we want the code to look like, i.e. we need a *Style Guide*.\r\n\r\nRelated questions have come up recently in #392 and #393 but there are also the recurring discussions about length of lines etc., in particular see #216 !\r\n\r\nA very basic guideline consists of the editor settings:\r\n```\r\n# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-\r\n# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8\r\n```\r\n\r\n* only use spaces for indentation\r\n* one level of indentation equals 4 spaces\r\n\r\nGenerally,  [PEP 8](https://www.python.org/dev/peps/pep-0008/) is a good starting point (see #216 )\r\n\r\n## Questions to settle\r\n- [ ] line length\r\n- [x] indentation (spaces, 4 per level)\r\n- [ ] imports (absolute, aliasing eg `import numpy as np` #392)\r\n- [ ] capitalization\r\n- [x] camelCase or underscores (underscores, see #389)\r\n- [ ] add style checker to travis\r\n\r\n... please add to the list. "},"comment":{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/comments/135973746","html_url":"https://github.com/MDAnalysis/mdanalysis/issues/404#issuecomment-135973746","issue_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/404","id":135973746,"user":{"login":"richardjgowers","id":9249543,"avatar_url":"https://avatars.githubusercontent.com/u/9249543?v=3","gravatar_id":"","url":"https://api.github.com/users/richardjgowers","html_url":"https://github.com/richardjgowers","followers_url":"https://api.github.com/users/richardjgowers/followers","following_url":"https://api.github.com/users/richardjgowers/following{/other_user}","gists_url":"https://api.github.com/users/richardjgowers/gists{/gist_id}","starred_url":"https://api.github.com/users/richardjgowers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardjgowers/subscriptions","organizations_url":"https://api.github.com/users/richardjgowers/orgs","repos_url":"https://api.github.com/users/richardjgowers/repos","events_url":"https://api.github.com/users/richardjgowers/events{/privacy}","received_events_url":"https://api.github.com/users/richardjgowers/received_events","type":"User","site_admin":false},"created_at":"2015-08-29T11:30:41Z","updated_at":"2015-08-29T11:30:41Z","body":"I think last time we looked at line length, 80 was far too small, so 100/120 is probably better.  I'm also happy to be very flexible about this (for readability).\r\n\r\nWe looked at automated systems (autopep8, yapf) for style and they kind of work, but still require a manual pass afterwards.\r\n\r\nOne option is we could add a pep8 check of some sort to travis, This would be a little annoying, but would make sure that the code doesn't gradually deteriorate after the #216 tidy up."}}