{"action":"created","comment":{"url":"https://api.github.com/repos/bids-standard/pybids/pulls/comments/234282726","pull_request_review_id":175898265,"id":234282726,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNDI4MjcyNg==","diff_hunk":"@@ -32,6 +32,14 @@ def __init__(self, filename, layout):\n         super(BIDSFile, self).__init__(filename)\n         self.layout = layout\n \n+    def __getattr__(self, attr):\n+        # Ensures backwards compatibility with old File_ namedtuple, which is\n+        # deprecated as of 0.7.\n+        if attr in self.entities:\n+            return self.entities[attr]\n+        raise AttributeError(\"%s object has no attribute named %r\" %\n+                             (self.__class__.__name__, attr))","path":"bids/layout/layout.py","position":10,"original_position":10,"commit_id":"21293cf9e375b9320a5610ddfb3a6b5dd97bb623","original_commit_id":"21293cf9e375b9320a5610ddfb3a6b5dd97bb623","user":{"login":"yarikoptic","id":39889,"node_id":"MDQ6VXNlcjM5ODg5","avatar_url":"https://avatars3.githubusercontent.com/u/39889?v=4","gravatar_id":"","url":"https://api.github.com/users/yarikoptic","html_url":"https://github.com/yarikoptic","followers_url":"https://api.github.com/users/yarikoptic/followers","following_url":"https://api.github.com/users/yarikoptic/following{/other_user}","gists_url":"https://api.github.com/users/yarikoptic/gists{/gist_id}","starred_url":"https://api.github.com/users/yarikoptic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarikoptic/subscriptions","organizations_url":"https://api.github.com/users/yarikoptic/orgs","repos_url":"https://api.github.com/users/yarikoptic/repos","events_url":"https://api.github.com/users/yarikoptic/events{/privacy}","received_events_url":"https://api.github.com/users/yarikoptic/received_events","type":"User","site_admin":false},"body":"+1 on super call, but why not to do it after local handling, so to be able to overload what super does?\r\n\r\nyour patch adds deprecation - is that what is planed/desired ( @tyarkoni  ?) ","created_at":"2018-11-16T17:12:46Z","updated_at":"2018-11-16T17:12:47Z","html_url":"https://github.com/bids-standard/pybids/pull/281#discussion_r234282726","pull_request_url":"https://api.github.com/repos/bids-standard/pybids/pulls/281","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/bids-standard/pybids/pulls/comments/234282726"},"html":{"href":"https://github.com/bids-standard/pybids/pull/281#discussion_r234282726"},"pull_request":{"href":"https://api.github.com/repos/bids-standard/pybids/pulls/281"}},"in_reply_to_id":234238726},"pull_request":{"url":"https://api.github.com/repos/bids-standard/pybids/pulls/281","id":229161583,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5MTYxNTgz","html_url":"https://github.com/bids-standard/pybids/pull/281","diff_url":"https://github.com/bids-standard/pybids/pull/281.diff","patch_url":"https://github.com/bids-standard/pybids/pull/281.patch","issue_url":"https://api.github.com/repos/bids-standard/pybids/issues/281","number":281,"state":"open","locked":false,"title":"Default to using return_type='object' in get() calls","user":{"login":"tyarkoni","id":303932,"node_id":"MDQ6VXNlcjMwMzkzMg==","avatar_url":"https://avatars2.githubusercontent.com/u/303932?v=4","gravatar_id":"","url":"https://api.github.com/users/tyarkoni","html_url":"https://github.com/tyarkoni","followers_url":"https://api.github.com/users/tyarkoni/followers","following_url":"https://api.github.com/users/tyarkoni/following{/other_user}","gists_url":"https://api.github.com/users/tyarkoni/gists{/gist_id}","starred_url":"https://api.github.com/users/tyarkoni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tyarkoni/subscriptions","organizations_url":"https://api.github.com/users/tyarkoni/orgs","repos_url":"https://api.github.com/users/tyarkoni/repos","events_url":"https://api.github.com/users/tyarkoni/events{/privacy}","received_events_url":"https://api.github.com/users/tyarkoni/received_events","type":"User","site_admin":false},"body":"This PR changes the default `return_type` in `BIDSLayout.get()` calls from `'tuple'` to `'object'`. This is intended to help deprecate the use of the `_File` namedtuple in pybids (though it's still supported in grabbit, and hence remains available for use if a user manually requests `return_type='tuple'`). There probably isn't a good reason to have both namedtuples and `BIDSFile` objects.\r\n\r\nTo facilitate the shift, `BIDSFile` objects now allow entities to be accessed as attributes, mimicking the old namedtuple behavior. This means that the only potential backward incompatibility is that the `.filename` attribute of the namedtuple returns the full path to files, while the `.filename` attribute in `BIDSFile` only returns the basename of the file.","created_at":"2018-11-07T20:41:13Z","updated_at":"2018-11-16T17:12:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"825b72e692577f2cb801ac4fc73cf427a83646b7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/bids-standard/pybids/pulls/281/commits","review_comments_url":"https://api.github.com/repos/bids-standard/pybids/pulls/281/comments","review_comment_url":"https://api.github.com/repos/bids-standard/pybids/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bids-standard/pybids/issues/281/comments","statuses_url":"https://api.github.com/repos/bids-standard/pybids/statuses/21293cf9e375b9320a5610ddfb3a6b5dd97bb623","head":{"label":"bids-standard:drop-namedtuple","ref":"drop-namedtuple","sha":"21293cf9e375b9320a5610ddfb3a6b5dd97bb623","user":{"login":"bids-standard","id":43044189,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzMDQ0MTg5","avatar_url":"https://avatars0.githubusercontent.com/u/43044189?v=4","gravatar_id":"","url":"https://api.github.com/users/bids-standard","html_url":"https://github.com/bids-standard","followers_url":"https://api.github.com/users/bids-standard/followers","following_url":"https://api.github.com/users/bids-standard/following{/other_user}","gists_url":"https://api.github.com/users/bids-standard/gists{/gist_id}","starred_url":"https://api.github.com/users/bids-standard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bids-standard/subscriptions","organizations_url":"https://api.github.com/users/bids-standard/orgs","repos_url":"https://api.github.com/users/bids-standard/repos","events_url":"https://api.github.com/users/bids-standard/events{/privacy}","received_events_url":"https://api.github.com/users/bids-standard/received_events","type":"Organization","site_admin":false},"repo":{"id":62954915,"node_id":"MDEwOlJlcG9zaXRvcnk2Mjk1NDkxNQ==","name":"pybids","full_name":"bids-standard/pybids","private":false,"owner":{"login":"bids-standard","id":43044189,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzMDQ0MTg5","avatar_url":"https://avatars0.githubusercontent.com/u/43044189?v=4","gravatar_id":"","url":"https://api.github.com/users/bids-standard","html_url":"https://github.com/bids-standard","followers_url":"https://api.github.com/users/bids-standard/followers","following_url":"https://api.github.com/users/bids-standard/following{/other_user}","gists_url":"https://api.github.com/users/bids-standard/gists{/gist_id}","starred_url":"https://api.github.com/users/bids-standard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bids-standard/subscriptions","organizations_url":"https://api.github.com/users/bids-standard/orgs","repos_url":"https://api.github.com/users/bids-standard/repos","events_url":"https://api.github.com/users/bids-standard/events{/privacy}","received_events_url":"https://api.github.com/users/bids-standard/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/bids-standard/pybids","description":"Python tools for querying and manipulating BIDS datasets.","fork":false,"url":"https://api.github.com/repos/bids-standard/pybids","forks_url":"https://api.github.com/repos/bids-standard/pybids/forks","keys_url":"https://api.github.com/repos/bids-standard/pybids/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bids-standard/pybids/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bids-standard/pybids/teams","hooks_url":"https://api.github.com/repos/bids-standard/pybids/hooks","issue_events_url":"https://api.github.com/repos/bids-standard/pybids/issues/events{/number}","events_url":"https://api.github.com/repos/bids-standard/pybids/events","assignees_url":"https://api.github.com/repos/bids-standard/pybids/assignees{/user}","branches_url":"https://api.github.com/repos/bids-standard/pybids/branches{/branch}","tags_url":"https://api.github.com/repos/bids-standard/pybids/tags","blobs_url":"https://api.github.com/repos/bids-standard/pybids/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bids-standard/pybids/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bids-standard/pybids/git/refs{/sha}","trees_url":"https://api.github.com/repos/bids-standard/pybids/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bids-standard/pybids/statuses/{sha}","languages_url":"https://api.github.com/repos/bids-standard/pybids/languages","stargazers_url":"https://api.github.com/repos/bids-standard/pybids/stargazers","contributors_url":"https://api.github.com/repos/bids-standard/pybids/contributors","subscribers_url":"https://api.github.com/repos/bids-standard/pybids/subscribers","subscription_url":"https://api.github.com/repos/bids-standard/pybids/subscription","commits_url":"https://api.github.com/repos/bids-standard/pybids/commits{/sha}","git_commits_url":"https://api.github.com/repos/bids-standard/pybids/git/commits{/sha}","comments_url":"https://api.github.com/repos/bids-standard/pybids/comments{/number}","issue_comment_url":"https://api.github.com/repos/bids-standard/pybids/issues/comments{/number}","contents_url":"https://api.github.com/repos/bids-standard/pybids/contents/{+path}","compare_url":"https://api.github.com/repos/bids-standard/pybids/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bids-standard/pybids/merges","archive_url":"https://api.github.com/repos/bids-standard/pybids/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bids-standard/pybids/downloads","issues_url":"https://api.github.com/repos/bids-standard/pybids/issues{/number}","pulls_url":"https://api.github.com/repos/bids-standard/pybids/pulls{/number}","milestones_url":"https://api.github.com/repos/bids-standard/pybids/milestones{/number}","notifications_url":"https://api.github.com/repos/bids-standard/pybids/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bids-standard/pybids/labels{/name}","releases_url":"https://api.github.com/repos/bids-standard/pybids/releases{/id}","deployments_url":"https://api.github.com/repos/bids-standard/pybids/deployments","created_at":"2016-07-09T15:08:27Z","updated_at":"2018-11-16T17:07:56Z","pushed_at":"2018-11-16T17:09:14Z","git_url":"git://github.com/bids-standard/pybids.git","ssh_url":"git@github.com:bids-standard/pybids.git","clone_url":"https://github.com/bids-standard/pybids.git","svn_url":"https://github.com/bids-standard/pybids","homepage":"https://bids-standard.github.io/pybids/","size":5814,"stargazers_count":57,"watchers_count":57,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":50,"mirror_url":null,"archived":false,"open_issues_count":27,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":50,"open_issues":27,"watchers":57,"default_branch":"master"}},"base":{"label":"bids-standard:master","ref":"master","sha":"db9a402566394c55c99a92961b0641b14d240d1e","user":{"login":"bids-standard","id":43044189,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzMDQ0MTg5","avatar_url":"https://avatars0.githubusercontent.com/u/43044189?v=4","gravatar_id":"","url":"https://api.github.com/users/bids-standard","html_url":"https://github.com/bids-standard","followers_url":"https://api.github.com/users/bids-standard/followers","following_url":"https://api.github.com/users/bids-standard/following{/other_user}","gists_url":"https://api.github.com/users/bids-standard/gists{/gist_id}","starred_url":"https://api.github.com/users/bids-standard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bids-standard/subscriptions","organizations_url":"https://api.github.com/users/bids-standard/orgs","repos_url":"https://api.github.com/users/bids-standard/repos","events_url":"https://api.github.com/users/bids-standard/events{/privacy}","received_events_url":"https://api.github.com/users/bids-standard/received_events","type":"Organization","site_admin":false},"repo":{"id":62954915,"node_id":"MDEwOlJlcG9zaXRvcnk2Mjk1NDkxNQ==","name":"pybids","full_name":"bids-standard/pybids","private":false,"owner":{"login":"bids-standard","id":43044189,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzMDQ0MTg5","avatar_url":"https://avatars0.githubusercontent.com/u/43044189?v=4","gravatar_id":"","url":"https://api.github.com/users/bids-standard","html_url":"https://github.com/bids-standard","followers_url":"https://api.github.com/users/bids-standard/followers","following_url":"https://api.github.com/users/bids-standard/following{/other_user}","gists_url":"https://api.github.com/users/bids-standard/gists{/gist_id}","starred_url":"https://api.github.com/users/bids-standard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bids-standard/subscriptions","organizations_url":"https://api.github.com/users/bids-standard/orgs","repos_url":"https://api.github.com/users/bids-standard/repos","events_url":"https://api.github.com/users/bids-standard/events{/privacy}","received_events_url":"https://api.github.com/users/bids-standard/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/bids-standard/pybids","description":"Python tools for querying and manipulating BIDS datasets.","fork":false,"url":"https://api.github.com/repos/bids-standard/pybids","forks_url":"https://api.github.com/repos/bids-standard/pybids/forks","keys_url":"https://api.github.com/repos/bids-standard/pybids/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bids-standard/pybids/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bids-standard/pybids/teams","hooks_url":"https://api.github.com/repos/bids-standard/pybids/hooks","issue_events_url":"https://api.github.com/repos/bids-standard/pybids/issues/events{/number}","events_url":"https://api.github.com/repos/bids-standard/pybids/events","assignees_url":"https://api.github.com/repos/bids-standard/pybids/assignees{/user}","branches_url":"https://api.github.com/repos/bids-standard/pybids/branches{/branch}","tags_url":"https://api.github.com/repos/bids-standard/pybids/tags","blobs_url":"https://api.github.com/repos/bids-standard/pybids/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bids-standard/pybids/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bids-standard/pybids/git/refs{/sha}","trees_url":"https://api.github.com/repos/bids-standard/pybids/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bids-standard/pybids/statuses/{sha}","languages_url":"https://api.github.com/repos/bids-standard/pybids/languages","stargazers_url":"https://api.github.com/repos/bids-standard/pybids/stargazers","contributors_url":"https://api.github.com/repos/bids-standard/pybids/contributors","subscribers_url":"https://api.github.com/repos/bids-standard/pybids/subscribers","subscription_url":"https://api.github.com/repos/bids-standard/pybids/subscription","commits_url":"https://api.github.com/repos/bids-standard/pybids/commits{/sha}","git_commits_url":"https://api.github.com/repos/bids-standard/pybids/git/commits{/sha}","comments_url":"https://api.github.com/repos/bids-standard/pybids/comments{/number}","issue_comment_url":"https://api.github.com/repos/bids-standard/pybids/issues/comments{/number}","contents_url":"https://api.github.com/repos/bids-standard/pybids/contents/{+path}","compare_url":"https://api.github.com/repos/bids-standard/pybids/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bids-standard/pybids/merges","archive_url":"https://api.github.com/repos/bids-standard/pybids/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bids-standard/pybids/downloads","issues_url":"https://api.github.com/repos/bids-standard/pybids/issues{/number}","pulls_url":"https://api.github.com/repos/bids-standard/pybids/pulls{/number}","milestones_url":"https://api.github.com/repos/bids-standard/pybids/milestones{/number}","notifications_url":"https://api.github.com/repos/bids-standard/pybids/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bids-standard/pybids/labels{/name}","releases_url":"https://api.github.com/repos/bids-standard/pybids/releases{/id}","deployments_url":"https://api.github.com/repos/bids-standard/pybids/deployments","created_at":"2016-07-09T15:08:27Z","updated_at":"2018-11-16T17:07:56Z","pushed_at":"2018-11-16T17:09:14Z","git_url":"git://github.com/bids-standard/pybids.git","ssh_url":"git@github.com:bids-standard/pybids.git","clone_url":"https://github.com/bids-standard/pybids.git","svn_url":"https://github.com/bids-standard/pybids","homepage":"https://bids-standard.github.io/pybids/","size":5814,"stargazers_count":57,"watchers_count":57,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":50,"mirror_url":null,"archived":false,"open_issues_count":27,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":50,"open_issues":27,"watchers":57,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bids-standard/pybids/pulls/281"},"html":{"href":"https://github.com/bids-standard/pybids/pull/281"},"issue":{"href":"https://api.github.com/repos/bids-standard/pybids/issues/281"},"comments":{"href":"https://api.github.com/repos/bids-standard/pybids/issues/281/comments"},"review_comments":{"href":"https://api.github.com/repos/bids-standard/pybids/pulls/281/comments"},"review_comment":{"href":"https://api.github.com/repos/bids-standard/pybids/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bids-standard/pybids/pulls/281/commits"},"statuses":{"href":"https://api.github.com/repos/bids-standard/pybids/statuses/21293cf9e375b9320a5610ddfb3a6b5dd97bb623"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"yarikoptic"}}