{"action":"created","issue":{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/377","labels_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/377/labels{/name}","comments_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/377/comments","events_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/377/events","html_url":"https://github.com/MDAnalysis/mdanalysis/issues/377","id":99085012,"number":377,"title":"helper script for upgrading from 0.10 to 0.11 (ten2eleven.py)","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/API","name":"API","color":"eb6420"},{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/labels/Component-Scripts","name":"Component-Scripts","color":"bfd4f2"},{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/labels/help%20wanted","name":"help wanted","color":"fef222"},{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/labels/maintainability","name":"maintainability","color":"fbca04"},{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/labels/Priority-High","name":"Priority-High","color":"eb6420"},{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/labels/usability","name":"usability","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/milestones/3","html_url":"https://github.com/MDAnalysis/mdanalysis/milestones/0.11","labels_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/milestones/3/labels","id":1076757,"number":3,"title":"0.11","description":"API overhaul release. See the [Release Notes for 0.11.0](/MDAnalysis/mdanalysis/wiki/ReleaseNotes0110) for important information.","creator":{"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},"open_issues":10,"closed_issues":54,"state":"open","created_at":"2015-04-21T09:19:32Z","updated_at":"2015-08-08T01:00:59Z","due_on":"2015-08-28T07:00:00Z","closed_at":null},"comments":3,"created_at":"2015-08-04T23:43:51Z","updated_at":"2015-08-08T01:41:07Z","closed_at":null,"body":"## Background\r\n\r\nThe [0.11.0 release](/MDAnalysis/mdanalysis/milestones/0.11) will [break the API](/MDAnalysis/mdanalysis/issues?q=milestone%3A0.11+label%3AAPI) in many places (see also the [Release Notes for 0.11.0](/MDAnalysis/mdanalysis/wiki/ReleaseNotes0110)):\r\n\r\nIssue  |   API Changes\r\n---------|-------------------\r\n#250 & #252   | Summary of Timestep API changes\r\n#310  | frame numbers start at 0 instead of 1\r\n#308  | time is now a property of `Timestep` and not of the trajectory reader\r\n#287  | Summary of reorganization of modules (`MDAnalysis.lib`)\r\n#372  | Many `AtomGroup` methods were changed to properties (and some were renamed)\r\n#376 | `AtomGroup.numberOfAtoms()` (and similar methods for residues and segments) is now a property `AtomGroup.n_atoms`; likewise, `Universe.trajectory.numatoms` and `.numframes` are now `.n_atoms` and `.n_frames`, respectively.\r\n\r\nA number of changes will likely have been  implemented by the release date\r\n\r\nIssue  |   Proposed API Changes\r\n---------|-----------------------------------\r\n#373 | calculating of bond, angle and dihedral values from 2,3, or 4-member `AtomGroup`s will change\r\n#385 | `AtomGroup.resids` (and `segids`) will return an array the size of the `AtomGroup`; the old behavior will be obtained with `AtomGroup.residues.resids`\r\n\r\n## ten2eleven.py script\r\n\r\nIn order to ease the burden on users we would like to have a script ``ten2eleven.py`` that aids the user in the translation of Python code to the new syntax. That might not always be possible but some (tedious) changes could likely be automated.\r\n\r\nThis should be somewhat similar to the [py2to3](https://docs.python.org/3.0/library/2to3.html) script.\r\n\r\n### Specifications\r\n\r\n* The script should take a python source file as input and write out an altered version of the file. \r\n  * Optionally, it should run recursively on a directory and change all py files in the directory.\r\n  * Optionally, it should write all changed files to a new target directory and replicate the original directory structure in the target directory.\r\n\r\n* Automatically do substitutions and renamings like the following:\r\n   ```\r\nag.residues() → ag.residues\r\natom.number → atom.index\r\nimport MDAnalysis.core.qcprot → import MDAnalysis.lib.qcprot\r\n   ```\r\n   (We need a complete list of substitutions – please add to this issue report!)\r\n\r\n* It would also be desirable to flag pieces of code that should be manually inspected, e.g. anything related to `ts.frame`. Optionally, it should insert comment lines in places that should be inspected.\r\n\r\n* It should keep a backup file of the original file and it should never overwrite the backup files.\r\n\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/comments/128880135","html_url":"https://github.com/MDAnalysis/mdanalysis/issues/377#issuecomment-128880135","issue_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/377","id":128880135,"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},"created_at":"2015-08-08T01:41:07Z","updated_at":"2015-08-08T01:41:07Z","body":"An more on using `lib2to3`:\r\nStack Overflow answer on [lib2to3 Architecture Documentation](http://stackoverflow.com/questions/9969941/lib2to3-architecture-documentation) points to Lennart Regebro's  [Porting to Python 3](http://python3porting.com/) book, in particular the chapter [Extending 2to3 with your own fixers](http://python3porting.com/fixers.html)."}}