{"action":"closed","number":351,"pull_request":{"url":"https://api.github.com/repos/NSLS-II/ophyd/pulls/351","id":79592629,"html_url":"https://github.com/NSLS-II/ophyd/pull/351","diff_url":"https://github.com/NSLS-II/ophyd/pull/351.diff","patch_url":"https://github.com/NSLS-II/ophyd/pull/351.patch","issue_url":"https://api.github.com/repos/NSLS-II/ophyd/issues/351","number":351,"state":"closed","locked":false,"title":"ENH: Allow stage_sigs keys to be attr names, not attrs.","user":{"login":"danielballan","id":2279598,"avatar_url":"https://avatars.githubusercontent.com/u/2279598?v=3","gravatar_id":"","url":"https://api.github.com/users/danielballan","html_url":"https://github.com/danielballan","followers_url":"https://api.github.com/users/danielballan/followers","following_url":"https://api.github.com/users/danielballan/following{/other_user}","gists_url":"https://api.github.com/users/danielballan/gists{/gist_id}","starred_url":"https://api.github.com/users/danielballan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielballan/subscriptions","organizations_url":"https://api.github.com/users/danielballan/orgs","repos_url":"https://api.github.com/users/danielballan/repos","events_url":"https://api.github.com/users/danielballan/events{/privacy}","received_events_url":"https://api.github.com/users/danielballan/received_events","type":"User","site_admin":false},"body":"Speaking of lazy instantiation, devices with `stage_sigs` typically break lazy instantiation by including references to signals in the `__init__`, such as:\r\n\r\n```python\r\nclass AD(AreaDetector):\r\n\r\n    def __init__(self, ...):\r\n        super().__init__(...)\r\n        self.stage_sigs[self.cam.whatever] = 5\r\n```\r\n\r\nThis PR allows the keys in stage sigs to be strings, like so:\r\n\r\n```python\r\nclass AD(AreaDetector):\r\n\r\n    def __init__(self, ...):\r\n        super().__init__(...)\r\n        self.stage_sigs['cam.whatever'] = 5\r\n```\r\n\r\nHere, the attribute lookup / signal connection happens during `stage()` instead of during `__init__`. This should significantly speedup reload times for IPython profile scripts that include many area detectors.\r\n\r\nThe old usage is still allowed. In cases where the key refers to something that is not an attribute of `self`, it will still be the only option.","created_at":"2016-08-01T15:59:06Z","updated_at":"2016-08-01T19:55:29Z","closed_at":"2016-08-01T19:55:29Z","merged_at":"2016-08-01T19:55:29Z","merge_commit_sha":"066458ffa3e5575b3a05acfcc879b078b5cb9519","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/NSLS-II/ophyd/pulls/351/commits","review_comments_url":"https://api.github.com/repos/NSLS-II/ophyd/pulls/351/comments","review_comment_url":"https://api.github.com/repos/NSLS-II/ophyd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NSLS-II/ophyd/issues/351/comments","statuses_url":"https://api.github.com/repos/NSLS-II/ophyd/statuses/8d593c9dc86755fcc4c5e2bfa0839ab4f1a84a50","head":{"label":"danielballan:lazy-stage-sigs","ref":"lazy-stage-sigs","sha":"8d593c9dc86755fcc4c5e2bfa0839ab4f1a84a50","user":{"login":"danielballan","id":2279598,"avatar_url":"https://avatars.githubusercontent.com/u/2279598?v=3","gravatar_id":"","url":"https://api.github.com/users/danielballan","html_url":"https://github.com/danielballan","followers_url":"https://api.github.com/users/danielballan/followers","following_url":"https://api.github.com/users/danielballan/following{/other_user}","gists_url":"https://api.github.com/users/danielballan/gists{/gist_id}","starred_url":"https://api.github.com/users/danielballan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielballan/subscriptions","organizations_url":"https://api.github.com/users/danielballan/orgs","repos_url":"https://api.github.com/users/danielballan/repos","events_url":"https://api.github.com/users/danielballan/events{/privacy}","received_events_url":"https://api.github.com/users/danielballan/received_events","type":"User","site_admin":false},"repo":{"id":33561494,"name":"ophyd","full_name":"danielballan/ophyd","owner":{"login":"danielballan","id":2279598,"avatar_url":"https://avatars.githubusercontent.com/u/2279598?v=3","gravatar_id":"","url":"https://api.github.com/users/danielballan","html_url":"https://github.com/danielballan","followers_url":"https://api.github.com/users/danielballan/followers","following_url":"https://api.github.com/users/danielballan/following{/other_user}","gists_url":"https://api.github.com/users/danielballan/gists{/gist_id}","starred_url":"https://api.github.com/users/danielballan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielballan/subscriptions","organizations_url":"https://api.github.com/users/danielballan/orgs","repos_url":"https://api.github.com/users/danielballan/repos","events_url":"https://api.github.com/users/danielballan/events{/privacy}","received_events_url":"https://api.github.com/users/danielballan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danielballan/ophyd","description":"Python/EPICS based data collection for NSLS-II","fork":true,"url":"https://api.github.com/repos/danielballan/ophyd","forks_url":"https://api.github.com/repos/danielballan/ophyd/forks","keys_url":"https://api.github.com/repos/danielballan/ophyd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danielballan/ophyd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danielballan/ophyd/teams","hooks_url":"https://api.github.com/repos/danielballan/ophyd/hooks","issue_events_url":"https://api.github.com/repos/danielballan/ophyd/issues/events{/number}","events_url":"https://api.github.com/repos/danielballan/ophyd/events","assignees_url":"https://api.github.com/repos/danielballan/ophyd/assignees{/user}","branches_url":"https://api.github.com/repos/danielballan/ophyd/branches{/branch}","tags_url":"https://api.github.com/repos/danielballan/ophyd/tags","blobs_url":"https://api.github.com/repos/danielballan/ophyd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danielballan/ophyd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danielballan/ophyd/git/refs{/sha}","trees_url":"https://api.github.com/repos/danielballan/ophyd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danielballan/ophyd/statuses/{sha}","languages_url":"https://api.github.com/repos/danielballan/ophyd/languages","stargazers_url":"https://api.github.com/repos/danielballan/ophyd/stargazers","contributors_url":"https://api.github.com/repos/danielballan/ophyd/contributors","subscribers_url":"https://api.github.com/repos/danielballan/ophyd/subscribers","subscription_url":"https://api.github.com/repos/danielballan/ophyd/subscription","commits_url":"https://api.github.com/repos/danielballan/ophyd/commits{/sha}","git_commits_url":"https://api.github.com/repos/danielballan/ophyd/git/commits{/sha}","comments_url":"https://api.github.com/repos/danielballan/ophyd/comments{/number}","issue_comment_url":"https://api.github.com/repos/danielballan/ophyd/issues/comments{/number}","contents_url":"https://api.github.com/repos/danielballan/ophyd/contents/{+path}","compare_url":"https://api.github.com/repos/danielballan/ophyd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danielballan/ophyd/merges","archive_url":"https://api.github.com/repos/danielballan/ophyd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danielballan/ophyd/downloads","issues_url":"https://api.github.com/repos/danielballan/ophyd/issues{/number}","pulls_url":"https://api.github.com/repos/danielballan/ophyd/pulls{/number}","milestones_url":"https://api.github.com/repos/danielballan/ophyd/milestones{/number}","notifications_url":"https://api.github.com/repos/danielballan/ophyd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danielballan/ophyd/labels{/name}","releases_url":"https://api.github.com/repos/danielballan/ophyd/releases{/id}","deployments_url":"https://api.github.com/repos/danielballan/ophyd/deployments","created_at":"2015-04-07T18:43:53Z","updated_at":"2016-01-11T12:20:17Z","pushed_at":"2016-08-01T18:12:06Z","git_url":"git://github.com/danielballan/ophyd.git","ssh_url":"git@github.com:danielballan/ophyd.git","clone_url":"https://github.com/danielballan/ophyd.git","svn_url":"https://github.com/danielballan/ophyd","homepage":"http://nsls-ii.github.io/","size":2209,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"NSLS-II:master","ref":"master","sha":"e3abb3cfa6f16484a4e730b93e0713ed816a42ea","user":{"login":"NSLS-II","id":8700262,"avatar_url":"https://avatars.githubusercontent.com/u/8700262?v=3","gravatar_id":"","url":"https://api.github.com/users/NSLS-II","html_url":"https://github.com/NSLS-II","followers_url":"https://api.github.com/users/NSLS-II/followers","following_url":"https://api.github.com/users/NSLS-II/following{/other_user}","gists_url":"https://api.github.com/users/NSLS-II/gists{/gist_id}","starred_url":"https://api.github.com/users/NSLS-II/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NSLS-II/subscriptions","organizations_url":"https://api.github.com/users/NSLS-II/orgs","repos_url":"https://api.github.com/users/NSLS-II/repos","events_url":"https://api.github.com/users/NSLS-II/events{/privacy}","received_events_url":"https://api.github.com/users/NSLS-II/received_events","type":"Organization","site_admin":false},"repo":{"id":26235440,"name":"ophyd","full_name":"NSLS-II/ophyd","owner":{"login":"NSLS-II","id":8700262,"avatar_url":"https://avatars.githubusercontent.com/u/8700262?v=3","gravatar_id":"","url":"https://api.github.com/users/NSLS-II","html_url":"https://github.com/NSLS-II","followers_url":"https://api.github.com/users/NSLS-II/followers","following_url":"https://api.github.com/users/NSLS-II/following{/other_user}","gists_url":"https://api.github.com/users/NSLS-II/gists{/gist_id}","starred_url":"https://api.github.com/users/NSLS-II/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NSLS-II/subscriptions","organizations_url":"https://api.github.com/users/NSLS-II/orgs","repos_url":"https://api.github.com/users/NSLS-II/repos","events_url":"https://api.github.com/users/NSLS-II/events{/privacy}","received_events_url":"https://api.github.com/users/NSLS-II/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NSLS-II/ophyd","description":"Python/EPICS-based device abstractions for NSLS-II","fork":false,"url":"https://api.github.com/repos/NSLS-II/ophyd","forks_url":"https://api.github.com/repos/NSLS-II/ophyd/forks","keys_url":"https://api.github.com/repos/NSLS-II/ophyd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NSLS-II/ophyd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NSLS-II/ophyd/teams","hooks_url":"https://api.github.com/repos/NSLS-II/ophyd/hooks","issue_events_url":"https://api.github.com/repos/NSLS-II/ophyd/issues/events{/number}","events_url":"https://api.github.com/repos/NSLS-II/ophyd/events","assignees_url":"https://api.github.com/repos/NSLS-II/ophyd/assignees{/user}","branches_url":"https://api.github.com/repos/NSLS-II/ophyd/branches{/branch}","tags_url":"https://api.github.com/repos/NSLS-II/ophyd/tags","blobs_url":"https://api.github.com/repos/NSLS-II/ophyd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NSLS-II/ophyd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NSLS-II/ophyd/git/refs{/sha}","trees_url":"https://api.github.com/repos/NSLS-II/ophyd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NSLS-II/ophyd/statuses/{sha}","languages_url":"https://api.github.com/repos/NSLS-II/ophyd/languages","stargazers_url":"https://api.github.com/repos/NSLS-II/ophyd/stargazers","contributors_url":"https://api.github.com/repos/NSLS-II/ophyd/contributors","subscribers_url":"https://api.github.com/repos/NSLS-II/ophyd/subscribers","subscription_url":"https://api.github.com/repos/NSLS-II/ophyd/subscription","commits_url":"https://api.github.com/repos/NSLS-II/ophyd/commits{/sha}","git_commits_url":"https://api.github.com/repos/NSLS-II/ophyd/git/commits{/sha}","comments_url":"https://api.github.com/repos/NSLS-II/ophyd/comments{/number}","issue_comment_url":"https://api.github.com/repos/NSLS-II/ophyd/issues/comments{/number}","contents_url":"https://api.github.com/repos/NSLS-II/ophyd/contents/{+path}","compare_url":"https://api.github.com/repos/NSLS-II/ophyd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NSLS-II/ophyd/merges","archive_url":"https://api.github.com/repos/NSLS-II/ophyd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NSLS-II/ophyd/downloads","issues_url":"https://api.github.com/repos/NSLS-II/ophyd/issues{/number}","pulls_url":"https://api.github.com/repos/NSLS-II/ophyd/pulls{/number}","milestones_url":"https://api.github.com/repos/NSLS-II/ophyd/milestones{/number}","notifications_url":"https://api.github.com/repos/NSLS-II/ophyd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NSLS-II/ophyd/labels{/name}","releases_url":"https://api.github.com/repos/NSLS-II/ophyd/releases{/id}","deployments_url":"https://api.github.com/repos/NSLS-II/ophyd/deployments","created_at":"2014-11-05T19:20:01Z","updated_at":"2016-03-10T16:33:08Z","pushed_at":"2016-08-01T19:55:29Z","git_url":"git://github.com/NSLS-II/ophyd.git","ssh_url":"git@github.com:NSLS-II/ophyd.git","clone_url":"https://github.com/NSLS-II/ophyd.git","svn_url":"https://github.com/NSLS-II/ophyd","homepage":"http://nsls-ii.github.io/ophyd","size":5595,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":11,"mirror_url":null,"open_issues_count":19,"forks":11,"open_issues":19,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NSLS-II/ophyd/pulls/351"},"html":{"href":"https://github.com/NSLS-II/ophyd/pull/351"},"issue":{"href":"https://api.github.com/repos/NSLS-II/ophyd/issues/351"},"comments":{"href":"https://api.github.com/repos/NSLS-II/ophyd/issues/351/comments"},"review_comments":{"href":"https://api.github.com/repos/NSLS-II/ophyd/pulls/351/comments"},"review_comment":{"href":"https://api.github.com/repos/NSLS-II/ophyd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NSLS-II/ophyd/pulls/351/commits"},"statuses":{"href":"https://api.github.com/repos/NSLS-II/ophyd/statuses/8d593c9dc86755fcc4c5e2bfa0839ab4f1a84a50"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"klauer","id":5139267,"avatar_url":"https://avatars.githubusercontent.com/u/5139267?v=3","gravatar_id":"","url":"https://api.github.com/users/klauer","html_url":"https://github.com/klauer","followers_url":"https://api.github.com/users/klauer/followers","following_url":"https://api.github.com/users/klauer/following{/other_user}","gists_url":"https://api.github.com/users/klauer/gists{/gist_id}","starred_url":"https://api.github.com/users/klauer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klauer/subscriptions","organizations_url":"https://api.github.com/users/klauer/orgs","repos_url":"https://api.github.com/users/klauer/repos","events_url":"https://api.github.com/users/klauer/events{/privacy}","received_events_url":"https://api.github.com/users/klauer/received_events","type":"User","site_admin":false},"comments":2,"review_comments":2,"commits":2,"additions":11,"deletions":2,"changed_files":1}}
{"actor":{"display_login":"klauer"}}