{"action":"created","comment":{"url":"https://api.github.com/repos/NSLS-II/ophyd/pulls/comments/53655365","id":53655365,"diff_hunk":"@@ -327,47 +364,94 @@ def target(self):\n         '''Last commanded target positions'''\n         return self.PseudoPosition(*(pos.target for pos in self._pseudo))\n \n-    def move(self, position, wait=True, timeout=30.0, **kwargs):\n-        real_pos = self.forward(position)\n-\n-        # Remove the 'finished moving' callback, otherwise callbacks will\n-        # happen when individual motors finish moving\n-        moved_cb = kwargs.pop('moved_cb', None)\n-\n-        if self.sequential:\n-            for real, value in zip(self._real, real_pos):\n-                logger.debug('[sequential] Moving %s to %s (timeout=%s)',\n-                             real.name, value, timeout)\n-                if timeout <= 0:\n-                    raise TimeoutError('Failed to move all positioners within '\n-                                       '%s s'.format(timeout))\n+    def _sequential_move(self, real_pos, timeout=None, **kwargs):\n+        '''Move all real positioners to a certain position, in series'''\n+        # without proper timeout support for status callbacks, we can't safely\n+        # chain motions on other callbacks for sequential motion.  so,\n+        # 'sequential_move' above always blocks\n+        # this is a big TODO\n+\n+        self._move_queue[:] = zip(self._real, real_pos)\n+        pending_status = []\n+        t0 = time.time()\n+\n+        def move_next(obj=None):\n+            # last motion complete message came from 'obj'\n+            logger.debug('[%s:sequential] move_next called', self.name)\n+            with self._finished_lock:\n+                if pending_status:\n+                    last_status = pending_status[-1]\n+                    if not last_status.success:\n+                        logger.error('Failing due to last motion')\n+                        self._done_moving(success=False)\n+                        return","path":"ophyd/pseudopos.py","position":620,"original_position":217,"commit_id":"880d8541c8a287e829f19aeebe2a6c5465fd1bd8","original_commit_id":"09e3866cb06fd4d795d91db7606dfc133bc60a7a","user":{"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},"body":"As the client you request a motion with `move` and get a status object back. The actual motion process happens asynchronously in the background. If you do a `status.wait()` the wait logic will raise on motion failure. If you don't use that logic, it's up to you to check whether or not the motion succeeded.\r\n\r\nEven if an exception were raised here, it would not funnel back where (I think) you're expecting. Well, to be more specific, it would only come back to the caller if the first move were to fail, not any of the subsequent moves.","created_at":"2016-02-22T17:00:00Z","updated_at":"2016-02-22T17:00:00Z","html_url":"https://github.com/NSLS-II/ophyd/pull/271#discussion_r53655365","pull_request_url":"https://api.github.com/repos/NSLS-II/ophyd/pulls/271","_links":{"self":{"href":"https://api.github.com/repos/NSLS-II/ophyd/pulls/comments/53655365"},"html":{"href":"https://github.com/NSLS-II/ophyd/pull/271#discussion_r53655365"},"pull_request":{"href":"https://api.github.com/repos/NSLS-II/ophyd/pulls/271"}}},"pull_request":{"url":"https://api.github.com/repos/NSLS-II/ophyd/pulls/271","id":59731963,"html_url":"https://github.com/NSLS-II/ophyd/pull/271","diff_url":"https://github.com/NSLS-II/ophyd/pull/271.diff","patch_url":"https://github.com/NSLS-II/ophyd/pull/271.patch","issue_url":"https://api.github.com/repos/NSLS-II/ophyd/issues/271","number":271,"state":"open","locked":false,"title":"WIP: Positioner refactor","user":{"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},"body":"Supercedes #268 \r\n\r\nTODO: discuss in the near future, address comments below\r\n\r\nPositioner changes\r\n--------------------------\r\n* Positioner -> PositionerBase + SoftPositioner\r\n* Optional timeout added to status objects, better reporting of failures\r\n* Refactored all positioners in the hierarchy, removing ancient and confusing synchronous code. Blocking moves now use the same asynchronous code by waiting on the returned `MoveStatus`\r\n* PVPositioner (not put-complete version) waits on the setpoint signal (after @tacaswell's PVPositioner PR and a chat with @dchabot, we all agreed that bad blocking behavior here would be more likely due to misconfiguration)\r\n* `Positioner` is still not a `Device`, but nothing stopping this (as far as I know)\r\n\r\nPseudoPositioner changes\r\n------------------------------------\r\n* Complete round of tests post-ophyd0 refactor (at least coverage is up to 90% or so)\r\n* Add describe(), read() on pseudosingle (from @tacaswell 's srx config)\r\n* Fix for some namedtuple-related bugs (I consistently get  `namedtuple(a, b, c)` works the same as `tuple((a, b, c))`)\r\n* Fix target position for PseudoSingle\r\n* Fix check_value for PseudoPositioner\r\n* Refactor move, breaking into sequential and concurrent cases\r\n* Added @tacaswell's `MagicPseudoSetPositioner` ([ref](https://github.com/NSLS-II-SRX/ipython_ophyd/blob/master/profile_xf05id1/startup/00-startup.py#L55)) `set(*pos)` implementation, which does not require a PseudoPosition tuple\r\n\r\nOther things\r\n-----------------\r\n* Should look over #230 and see what else might be a good idea at this time.\r\n\r\n* Implications on the hkl branch?","created_at":"2016-02-18T00:20:54Z","updated_at":"2016-02-22T17:00:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0188a45f6259d487f335053849c0d411b226025f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/NSLS-II/ophyd/pulls/271/commits","review_comments_url":"https://api.github.com/repos/NSLS-II/ophyd/pulls/271/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/271/comments","statuses_url":"https://api.github.com/repos/NSLS-II/ophyd/statuses/880d8541c8a287e829f19aeebe2a6c5465fd1bd8","head":{"label":"klauer:positioner_refactor","ref":"positioner_refactor","sha":"880d8541c8a287e829f19aeebe2a6c5465fd1bd8","user":{"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},"repo":{"id":37275554,"name":"ophyd","full_name":"klauer/ophyd","owner":{"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},"private":false,"html_url":"https://github.com/klauer/ophyd","description":"ophyd playground","fork":true,"url":"https://api.github.com/repos/klauer/ophyd","forks_url":"https://api.github.com/repos/klauer/ophyd/forks","keys_url":"https://api.github.com/repos/klauer/ophyd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/klauer/ophyd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/klauer/ophyd/teams","hooks_url":"https://api.github.com/repos/klauer/ophyd/hooks","issue_events_url":"https://api.github.com/repos/klauer/ophyd/issues/events{/number}","events_url":"https://api.github.com/repos/klauer/ophyd/events","assignees_url":"https://api.github.com/repos/klauer/ophyd/assignees{/user}","branches_url":"https://api.github.com/repos/klauer/ophyd/branches{/branch}","tags_url":"https://api.github.com/repos/klauer/ophyd/tags","blobs_url":"https://api.github.com/repos/klauer/ophyd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/klauer/ophyd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/klauer/ophyd/git/refs{/sha}","trees_url":"https://api.github.com/repos/klauer/ophyd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/klauer/ophyd/statuses/{sha}","languages_url":"https://api.github.com/repos/klauer/ophyd/languages","stargazers_url":"https://api.github.com/repos/klauer/ophyd/stargazers","contributors_url":"https://api.github.com/repos/klauer/ophyd/contributors","subscribers_url":"https://api.github.com/repos/klauer/ophyd/subscribers","subscription_url":"https://api.github.com/repos/klauer/ophyd/subscription","commits_url":"https://api.github.com/repos/klauer/ophyd/commits{/sha}","git_commits_url":"https://api.github.com/repos/klauer/ophyd/git/commits{/sha}","comments_url":"https://api.github.com/repos/klauer/ophyd/comments{/number}","issue_comment_url":"https://api.github.com/repos/klauer/ophyd/issues/comments{/number}","contents_url":"https://api.github.com/repos/klauer/ophyd/contents/{+path}","compare_url":"https://api.github.com/repos/klauer/ophyd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/klauer/ophyd/merges","archive_url":"https://api.github.com/repos/klauer/ophyd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/klauer/ophyd/downloads","issues_url":"https://api.github.com/repos/klauer/ophyd/issues{/number}","pulls_url":"https://api.github.com/repos/klauer/ophyd/pulls{/number}","milestones_url":"https://api.github.com/repos/klauer/ophyd/milestones{/number}","notifications_url":"https://api.github.com/repos/klauer/ophyd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/klauer/ophyd/labels{/name}","releases_url":"https://api.github.com/repos/klauer/ophyd/releases{/id}","deployments_url":"https://api.github.com/repos/klauer/ophyd/deployments","created_at":"2015-06-11T17:29:02Z","updated_at":"2016-01-22T20:41:36Z","pushed_at":"2016-02-22T16:38:25Z","git_url":"git://github.com/klauer/ophyd.git","ssh_url":"git@github.com:klauer/ophyd.git","clone_url":"https://github.com/klauer/ophyd.git","svn_url":"https://github.com/klauer/ophyd","homepage":"","size":1666,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"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":"2bc23c818722159c1b7d606feb481a19c8796e4e","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 data collection 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-01-18T22:46:33Z","pushed_at":"2016-02-22T16:38:25Z","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":5165,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":11,"mirror_url":null,"open_issues_count":45,"forks":11,"open_issues":45,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NSLS-II/ophyd/pulls/271"},"html":{"href":"https://github.com/NSLS-II/ophyd/pull/271"},"issue":{"href":"https://api.github.com/repos/NSLS-II/ophyd/issues/271"},"comments":{"href":"https://api.github.com/repos/NSLS-II/ophyd/issues/271/comments"},"review_comments":{"href":"https://api.github.com/repos/NSLS-II/ophyd/pulls/271/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/271/commits"},"statuses":{"href":"https://api.github.com/repos/NSLS-II/ophyd/statuses/880d8541c8a287e829f19aeebe2a6c5465fd1bd8"}}}}