{"action":"created","issue":{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/926","repository_url":"https://api.github.com/repos/MDAnalysis/mdanalysis","labels_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/926/labels{/name}","comments_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/926/comments","events_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/926/events","html_url":"https://github.com/MDAnalysis/mdanalysis/pull/926","id":169195355,"number":926,"title":"Start of Issue #239","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},"labels":[{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/labels/Difficulty-hard","name":"Difficulty-hard","color":"ffff04"},{"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/question","name":"question","color":"cc317c"},{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/labels/review","name":"review","color":"bfdadc"},{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/labels/Work%20in%20progress","name":"Work in progress","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-08-03T18:04:54Z","updated_at":"2016-08-10T08:25:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/926","html_url":"https://github.com/MDAnalysis/mdanalysis/pull/926","diff_url":"https://github.com/MDAnalysis/mdanalysis/pull/926.diff","patch_url":"https://github.com/MDAnalysis/mdanalysis/pull/926.patch"},"body":"Adds a new base Reader class which doesn't need to maintain an open file handle.  Should fix problems related to too many open file handles.\r\n\r\n### Explanation\r\nReaders have 4 \"front doors\", (`__getitem__`, `next`, `__iter__`, `rewind`) which are publicly accessible methods to (indirectly) manipulate the file handle.\r\n\r\nThese front doors filter through to various backend methods in the base Reader (`_sliced_iter`, `_full_iter` and `_goto_frame`)\r\n\r\nThese backend methods then create the open file handle and call things in the individual implementations (eg `XYZReader._read_frame`)\r\n\r\nIndividual implementations are oblivious to the file handle manipulation above them, they just assume that a handle exists in a known location (ie this needs to be unified in API).\r\n\r\n**EDIT** kain88-de: issue https://github.com/MDAnalysis/mdanalysis/issues/239#issuecomment-224016331"},"comment":{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/comments/238799034","html_url":"https://github.com/MDAnalysis/mdanalysis/pull/926#issuecomment-238799034","issue_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/926","id":238799034,"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":"2016-08-10T08:25:40Z","updated_at":"2016-08-10T08:25:40Z","body":"@kain88-de I need to save the file handle position somewhere (ie the last `tell`), so the class was mostly being used for that, and having the file logic all in one place.\r\n\r\nI had a read, the current `seek` and `tell` should still work for XDR using frame numbers not byte offsets\r\n\r\nI'll have a look if I can simplify things, the main reason there's more functions is so that the files are only opened once, for example `__getitem__` can call `__iter__` which would trigger the decorator twice potentially."}}
{"actor":{"display_login":"richardjgowers"}}