{"action":"created","issue":{"url":"https://api.github.com/repos/biocore/scikit-bio/issues/812","labels_url":"https://api.github.com/repos/biocore/scikit-bio/issues/812/labels{/name}","comments_url":"https://api.github.com/repos/biocore/scikit-bio/issues/812/comments","events_url":"https://api.github.com/repos/biocore/scikit-bio/issues/812/events","html_url":"https://github.com/biocore/scikit-bio/issues/812","id":56271480,"number":812,"title":"rename I/O read/write methods to load/save?","user":{"login":"jairideout","id":1847232,"avatar_url":"https://avatars.githubusercontent.com/u/1847232?v=3","gravatar_id":"","url":"https://api.github.com/users/jairideout","html_url":"https://github.com/jairideout","followers_url":"https://api.github.com/users/jairideout/followers","following_url":"https://api.github.com/users/jairideout/following{/other_user}","gists_url":"https://api.github.com/users/jairideout/gists{/gist_id}","starred_url":"https://api.github.com/users/jairideout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jairideout/subscriptions","organizations_url":"https://api.github.com/users/jairideout/orgs","repos_url":"https://api.github.com/users/jairideout/repos","events_url":"https://api.github.com/users/jairideout/events{/privacy}","received_events_url":"https://api.github.com/users/jairideout/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/biocore/scikit-bio/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/biocore/scikit-bio/milestones/10","labels_url":"https://api.github.com/repos/biocore/scikit-bio/milestones/10/labels","id":802947,"number":10,"title":"0.2.3: Easy as ABC","description":"","creator":{"login":"ebolyen","id":3976804,"avatar_url":"https://avatars.githubusercontent.com/u/3976804?v=3","gravatar_id":"","url":"https://api.github.com/users/ebolyen","html_url":"https://github.com/ebolyen","followers_url":"https://api.github.com/users/ebolyen/followers","following_url":"https://api.github.com/users/ebolyen/following{/other_user}","gists_url":"https://api.github.com/users/ebolyen/gists{/gist_id}","starred_url":"https://api.github.com/users/ebolyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebolyen/subscriptions","organizations_url":"https://api.github.com/users/ebolyen/orgs","repos_url":"https://api.github.com/users/ebolyen/repos","events_url":"https://api.github.com/users/ebolyen/events{/privacy}","received_events_url":"https://api.github.com/users/ebolyen/received_events","type":"User","site_admin":false},"open_issues":52,"closed_issues":32,"state":"open","created_at":"2014-09-25T17:39:29Z","updated_at":"2015-02-02T18:08:35Z","due_on":null,"closed_at":null},"comments":9,"created_at":"2015-02-02T18:08:35Z","updated_at":"2015-02-02T19:09:59Z","closed_at":null,"body":"# Question\r\nShould the current I/O `read` and `write` methods be renamed to `load` and `save`, respectively?\r\n\r\n# Example (object-oriented)\r\n\r\n```python\r\naln = Alignment.read('seqs.fasta')\r\n...\r\naln.write('newseqs.fasta', format='fasta')\r\n```\r\n\r\nwould become:\r\n\r\n```python\r\naln = Alignment.load('seqs.fasta')\r\n...\r\naln.save('newseqs.fasta', format='fasta')\r\n```\r\n\r\n# Example (procedural)\r\n\r\n```python\r\naln = read('seqs.fasta', into=Alignment)\r\n...\r\nwrite(aln, format='fasta', into='newseqs.fasta')\r\n```\r\n\r\nwould become:\r\n\r\n```python\r\naln = load('seqs.fasta', into=Alignment)\r\n...\r\nsave(aln, format='fasta', into='newseqs.fasta')\r\n```\r\n\r\n# Rationale\r\n\r\nThe current names might be confusing because they match the names used by Python for file I/O. @johnchase was reading some code that @shiffer1 wrote and was initially confused because he thought `write` was being called on a file handle instead of a scikit-bio object. Thus, the code looked backwards because a filepath was being passed to the `write` method instead of a string that should be written.\r\n\r\nBy renaming these methods to `load` and `save`, we'd be using names that are distinct from Python's I/O methods, which would hopefully minimize confusion. IMO, `load` and `save` are less CS-oriented and slightly higher-level descriptions than `read` and `write`. Since scikit-bio is targeted for users who may not have strong technical/programming backgrounds, these new names may be easier to understand and remember.\r\n\r\nI don't have very strong feelings either way. @ebolyen brought up a good point that using the same names as Python for file I/O could be advantageous because we have already adopted other Pythonic names (e.g., file \"sniffers\") and this would be consistent with Python's standard library. Also, AstroPy uses `read` and `write` in their I/O framework.\r\n\r\ncc: @gregcaporaso @ebolyen @johnchase @shiffer1 @ElDeveloper "},"comment":{"url":"https://api.github.com/repos/biocore/scikit-bio/issues/comments/72517371","html_url":"https://github.com/biocore/scikit-bio/issues/812#issuecomment-72517371","issue_url":"https://api.github.com/repos/biocore/scikit-bio/issues/812","id":72517371,"user":{"login":"jairideout","id":1847232,"avatar_url":"https://avatars.githubusercontent.com/u/1847232?v=3","gravatar_id":"","url":"https://api.github.com/users/jairideout","html_url":"https://github.com/jairideout","followers_url":"https://api.github.com/users/jairideout/followers","following_url":"https://api.github.com/users/jairideout/following{/other_user}","gists_url":"https://api.github.com/users/jairideout/gists{/gist_id}","starred_url":"https://api.github.com/users/jairideout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jairideout/subscriptions","organizations_url":"https://api.github.com/users/jairideout/orgs","repos_url":"https://api.github.com/users/jairideout/repos","events_url":"https://api.github.com/users/jairideout/events{/privacy}","received_events_url":"https://api.github.com/users/jairideout/received_events","type":"User","site_admin":false},"created_at":"2015-02-02T19:09:59Z","updated_at":"2015-02-02T19:09:59Z","body":":+1: for the points raised by @wasade and @ebolyen.\r\n\r\nI also thought of another reason to keep the names `read` and `write` (similar to @antgonza's first point above): even though scikit-bio is targeted to non-technical users, we may be leading people in the wrong direction by using terms that aren't standard in the field (i.e., within computer science and across programming languages). `save` and `load` might be more intuitive names to novice programmers, but it's probably worth using standard nomenclature, especially if these users will be using other tools/languages/etc."}}