{"action":"created","comment":{"url":"https://api.github.com/repos/QISKit/qiskit-core/pulls/comments/198908650","pull_request_review_id":132918570,"id":198908650,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5ODkwODY1MA==","diff_hunk":"@@ -282,6 +283,46 @@ def test_retrieve_job_error(self):\n         backend = lowest_pending_jobs(backends)\n         self.assertRaises(IBMQBackendError, backend.retrieve_job, 'BAD_JOB_ID')\n \n+    def test_get_jobs_filter_job_status(self):\n+        backends = self._provider.available_backends()\n+        backend = lowest_pending_jobs(backends)\n+        job_list = backend.jobs(limit=5, skip=0, status=JobStatus.DONE)\n+        self.log.info('found %s matching jobs', len(job_list))\n+        for i, job in enumerate(job_list):\n+            self.log.info('match #%d: %s', i, job.result()._result['status'])\n+            self.assertTrue(job.status['status'] == JobStatus.DONE)\n+\n+    def test_get_jobs_filter_counts(self):","path":"test/python/test_ibmqjob.py","position":21,"original_position":21,"commit_id":"381c6c28dc02bdd60ed3d9d9a17405a53d4d86c0","original_commit_id":"381c6c28dc02bdd60ed3d9d9a17405a53d4d86c0","user":{"login":"atilag","id":1304071,"node_id":"MDQ6VXNlcjEzMDQwNzE=","avatar_url":"https://avatars2.githubusercontent.com/u/1304071?v=4","gravatar_id":"","url":"https://api.github.com/users/atilag","html_url":"https://github.com/atilag","followers_url":"https://api.github.com/users/atilag/followers","following_url":"https://api.github.com/users/atilag/following{/other_user}","gists_url":"https://api.github.com/users/atilag/gists{/gist_id}","starred_url":"https://api.github.com/users/atilag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atilag/subscriptions","organizations_url":"https://api.github.com/users/atilag/orgs","repos_url":"https://api.github.com/users/atilag/repos","events_url":"https://api.github.com/users/atilag/events{/privacy}","received_events_url":"https://api.github.com/users/atilag/received_events","type":"User","site_admin":false},"body":"What about first sending the jobs before testing them? I'm only worried about what happens if there's no such jobs in the server, so the test always passes and is not testing anything. (... maybe am I being to much skeptical? :))","created_at":"2018-06-28T16:39:56Z","updated_at":"2018-06-28T16:42:49Z","html_url":"https://github.com/QISKit/qiskit-core/pull/585#discussion_r198908650","pull_request_url":"https://api.github.com/repos/QISKit/qiskit-core/pulls/585","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/QISKit/qiskit-core/pulls/comments/198908650"},"html":{"href":"https://github.com/QISKit/qiskit-core/pull/585#discussion_r198908650"},"pull_request":{"href":"https://api.github.com/repos/QISKit/qiskit-core/pulls/585"}}},"pull_request":{"url":"https://api.github.com/repos/QISKit/qiskit-core/pulls/585","id":196276761,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2Mjc2NzYx","html_url":"https://github.com/QISKit/qiskit-core/pull/585","diff_url":"https://github.com/QISKit/qiskit-core/pull/585.diff","patch_url":"https://github.com/QISKit/qiskit-core/pull/585.patch","issue_url":"https://api.github.com/repos/QISKit/qiskit-core/issues/585","number":585,"state":"open","locked":false,"title":"[WIP] advanced IBMQBackend.jobs() filtering","user":{"login":"ewinston","id":25756217,"node_id":"MDQ6VXNlcjI1NzU2MjE3","avatar_url":"https://avatars0.githubusercontent.com/u/25756217?v=4","gravatar_id":"","url":"https://api.github.com/users/ewinston","html_url":"https://github.com/ewinston","followers_url":"https://api.github.com/users/ewinston/followers","following_url":"https://api.github.com/users/ewinston/following{/other_user}","gists_url":"https://api.github.com/users/ewinston/gists{/gist_id}","starred_url":"https://api.github.com/users/ewinston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewinston/subscriptions","organizations_url":"https://api.github.com/users/ewinston/orgs","repos_url":"https://api.github.com/users/ewinston/repos","events_url":"https://api.github.com/users/ewinston/events{/privacy}","received_events_url":"https://api.github.com/users/ewinston/received_events","type":"User","site_admin":false},"body":"<!--\r\n⚠️ If you do not respect this template, your pull request will be closed.\r\n⚠️ Your pull request title should be short detailed and understandable for all.\r\n⚠️ Also, please add it in the CHANGELOG file under Unreleased section.\r\n⚠️ If your pull request fixes an open issue, please link to the issue.\r\n\r\n✅ I have added the tests to cover my changes.\r\n✅ I have updated the documentation accordingly.\r\n✅ I have read the CONTRIBUTING document.\r\n-->\r\n\r\n### Summary\r\nEnable more advanced filtering when getting past jobs from IBM Q backends.\r\n\r\n\r\n### Details and comments\r\nTo get the last 5 jobs with errors:\r\n```job_list = backend.jobs(limit=5, status='ERROR')```\r\n\r\nTo get the last 5 jobs with 1024 shots and counts of 00 and 11 exceeding 400,\r\n\r\n```\r\njob_list = backend.jobs(limit=5, filter={'backend.name'='ibmq_qasm_simulator, 'shots': 1024,\r\n                                         'qasms.result.data.counts.00': {'gt': 400},\r\n                                         'qasms.result.data.counts.11': {'gt': 400}})\r\n```\r\n\r\nTo get jobs from 30 days ago,\r\n```\r\npast_day_30 = datetime.datetime.now() - datetime.timedelta(days=30)\r\nmy_filter = {'creationDate': {'lt': past_day_30.isoformat()}}\r\njob_list = backend.jobs(limit=5, filter=my_filter)\r\n```","created_at":"2018-06-20T21:24:20Z","updated_at":"2018-06-28T16:42:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f25a4163f5638094ef813c79e6cb964ca6112e28","assignee":null,"assignees":[],"requested_reviewers":[{"login":"diego-plan9","id":418311,"node_id":"MDQ6VXNlcjQxODMxMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/418311?v=4","gravatar_id":"","url":"https://api.github.com/users/diego-plan9","html_url":"https://github.com/diego-plan9","followers_url":"https://api.github.com/users/diego-plan9/followers","following_url":"https://api.github.com/users/diego-plan9/following{/other_user}","gists_url":"https://api.github.com/users/diego-plan9/gists{/gist_id}","starred_url":"https://api.github.com/users/diego-plan9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diego-plan9/subscriptions","organizations_url":"https://api.github.com/users/diego-plan9/orgs","repos_url":"https://api.github.com/users/diego-plan9/repos","events_url":"https://api.github.com/users/diego-plan9/events{/privacy}","received_events_url":"https://api.github.com/users/diego-plan9/received_events","type":"User","site_admin":false},{"login":"delapuente","id":757942,"node_id":"MDQ6VXNlcjc1Nzk0Mg==","avatar_url":"https://avatars1.githubusercontent.com/u/757942?v=4","gravatar_id":"","url":"https://api.github.com/users/delapuente","html_url":"https://github.com/delapuente","followers_url":"https://api.github.com/users/delapuente/followers","following_url":"https://api.github.com/users/delapuente/following{/other_user}","gists_url":"https://api.github.com/users/delapuente/gists{/gist_id}","starred_url":"https://api.github.com/users/delapuente/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/delapuente/subscriptions","organizations_url":"https://api.github.com/users/delapuente/orgs","repos_url":"https://api.github.com/users/delapuente/repos","events_url":"https://api.github.com/users/delapuente/events{/privacy}","received_events_url":"https://api.github.com/users/delapuente/received_events","type":"User","site_admin":false},{"login":"ajavadia","id":8622381,"node_id":"MDQ6VXNlcjg2MjIzODE=","avatar_url":"https://avatars2.githubusercontent.com/u/8622381?v=4","gravatar_id":"","url":"https://api.github.com/users/ajavadia","html_url":"https://github.com/ajavadia","followers_url":"https://api.github.com/users/ajavadia/followers","following_url":"https://api.github.com/users/ajavadia/following{/other_user}","gists_url":"https://api.github.com/users/ajavadia/gists{/gist_id}","starred_url":"https://api.github.com/users/ajavadia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajavadia/subscriptions","organizations_url":"https://api.github.com/users/ajavadia/orgs","repos_url":"https://api.github.com/users/ajavadia/repos","events_url":"https://api.github.com/users/ajavadia/events{/privacy}","received_events_url":"https://api.github.com/users/ajavadia/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/QISKit/qiskit-core/pulls/585/commits","review_comments_url":"https://api.github.com/repos/QISKit/qiskit-core/pulls/585/comments","review_comment_url":"https://api.github.com/repos/QISKit/qiskit-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/QISKit/qiskit-core/issues/585/comments","statuses_url":"https://api.github.com/repos/QISKit/qiskit-core/statuses/381c6c28dc02bdd60ed3d9d9a17405a53d4d86c0","head":{"label":"ewinston:job_filter","ref":"job_filter","sha":"381c6c28dc02bdd60ed3d9d9a17405a53d4d86c0","user":{"login":"ewinston","id":25756217,"node_id":"MDQ6VXNlcjI1NzU2MjE3","avatar_url":"https://avatars0.githubusercontent.com/u/25756217?v=4","gravatar_id":"","url":"https://api.github.com/users/ewinston","html_url":"https://github.com/ewinston","followers_url":"https://api.github.com/users/ewinston/followers","following_url":"https://api.github.com/users/ewinston/following{/other_user}","gists_url":"https://api.github.com/users/ewinston/gists{/gist_id}","starred_url":"https://api.github.com/users/ewinston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewinston/subscriptions","organizations_url":"https://api.github.com/users/ewinston/orgs","repos_url":"https://api.github.com/users/ewinston/repos","events_url":"https://api.github.com/users/ewinston/events{/privacy}","received_events_url":"https://api.github.com/users/ewinston/received_events","type":"User","site_admin":false},"repo":{"id":99157942,"node_id":"MDEwOlJlcG9zaXRvcnk5OTE1Nzk0Mg==","name":"qiskit-core","full_name":"ewinston/qiskit-core","owner":{"login":"ewinston","id":25756217,"node_id":"MDQ6VXNlcjI1NzU2MjE3","avatar_url":"https://avatars0.githubusercontent.com/u/25756217?v=4","gravatar_id":"","url":"https://api.github.com/users/ewinston","html_url":"https://github.com/ewinston","followers_url":"https://api.github.com/users/ewinston/followers","following_url":"https://api.github.com/users/ewinston/following{/other_user}","gists_url":"https://api.github.com/users/ewinston/gists{/gist_id}","starred_url":"https://api.github.com/users/ewinston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewinston/subscriptions","organizations_url":"https://api.github.com/users/ewinston/orgs","repos_url":"https://api.github.com/users/ewinston/repos","events_url":"https://api.github.com/users/ewinston/events{/privacy}","received_events_url":"https://api.github.com/users/ewinston/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ewinston/qiskit-core","description":"Python tools for running quantum information experiments","fork":true,"url":"https://api.github.com/repos/ewinston/qiskit-core","forks_url":"https://api.github.com/repos/ewinston/qiskit-core/forks","keys_url":"https://api.github.com/repos/ewinston/qiskit-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ewinston/qiskit-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ewinston/qiskit-core/teams","hooks_url":"https://api.github.com/repos/ewinston/qiskit-core/hooks","issue_events_url":"https://api.github.com/repos/ewinston/qiskit-core/issues/events{/number}","events_url":"https://api.github.com/repos/ewinston/qiskit-core/events","assignees_url":"https://api.github.com/repos/ewinston/qiskit-core/assignees{/user}","branches_url":"https://api.github.com/repos/ewinston/qiskit-core/branches{/branch}","tags_url":"https://api.github.com/repos/ewinston/qiskit-core/tags","blobs_url":"https://api.github.com/repos/ewinston/qiskit-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ewinston/qiskit-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ewinston/qiskit-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/ewinston/qiskit-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ewinston/qiskit-core/statuses/{sha}","languages_url":"https://api.github.com/repos/ewinston/qiskit-core/languages","stargazers_url":"https://api.github.com/repos/ewinston/qiskit-core/stargazers","contributors_url":"https://api.github.com/repos/ewinston/qiskit-core/contributors","subscribers_url":"https://api.github.com/repos/ewinston/qiskit-core/subscribers","subscription_url":"https://api.github.com/repos/ewinston/qiskit-core/subscription","commits_url":"https://api.github.com/repos/ewinston/qiskit-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/ewinston/qiskit-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/ewinston/qiskit-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/ewinston/qiskit-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/ewinston/qiskit-core/contents/{+path}","compare_url":"https://api.github.com/repos/ewinston/qiskit-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ewinston/qiskit-core/merges","archive_url":"https://api.github.com/repos/ewinston/qiskit-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ewinston/qiskit-core/downloads","issues_url":"https://api.github.com/repos/ewinston/qiskit-core/issues{/number}","pulls_url":"https://api.github.com/repos/ewinston/qiskit-core/pulls{/number}","milestones_url":"https://api.github.com/repos/ewinston/qiskit-core/milestones{/number}","notifications_url":"https://api.github.com/repos/ewinston/qiskit-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ewinston/qiskit-core/labels{/name}","releases_url":"https://api.github.com/repos/ewinston/qiskit-core/releases{/id}","deployments_url":"https://api.github.com/repos/ewinston/qiskit-core/deployments","created_at":"2017-08-02T20:26:39Z","updated_at":"2018-06-20T14:05:38Z","pushed_at":"2018-06-28T16:30:11Z","git_url":"git://github.com/ewinston/qiskit-core.git","ssh_url":"git@github.com:ewinston/qiskit-core.git","clone_url":"https://github.com/ewinston/qiskit-core.git","svn_url":"https://github.com/ewinston/qiskit-core","homepage":"https://quantumexperience.ng.bluemix.net/","size":28195,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"QISKit:master","ref":"master","sha":"996e33cc4dd241c28d83cffa24d20f8228bb15a8","user":{"login":"QISKit","id":30696987,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwNjk2OTg3","avatar_url":"https://avatars1.githubusercontent.com/u/30696987?v=4","gravatar_id":"","url":"https://api.github.com/users/QISKit","html_url":"https://github.com/QISKit","followers_url":"https://api.github.com/users/QISKit/followers","following_url":"https://api.github.com/users/QISKit/following{/other_user}","gists_url":"https://api.github.com/users/QISKit/gists{/gist_id}","starred_url":"https://api.github.com/users/QISKit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QISKit/subscriptions","organizations_url":"https://api.github.com/users/QISKit/orgs","repos_url":"https://api.github.com/users/QISKit/repos","events_url":"https://api.github.com/users/QISKit/events{/privacy}","received_events_url":"https://api.github.com/users/QISKit/received_events","type":"Organization","site_admin":false},"repo":{"id":83821669,"node_id":"MDEwOlJlcG9zaXRvcnk4MzgyMTY2OQ==","name":"qiskit-core","full_name":"QISKit/qiskit-core","owner":{"login":"QISKit","id":30696987,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwNjk2OTg3","avatar_url":"https://avatars1.githubusercontent.com/u/30696987?v=4","gravatar_id":"","url":"https://api.github.com/users/QISKit","html_url":"https://github.com/QISKit","followers_url":"https://api.github.com/users/QISKit/followers","following_url":"https://api.github.com/users/QISKit/following{/other_user}","gists_url":"https://api.github.com/users/QISKit/gists{/gist_id}","starred_url":"https://api.github.com/users/QISKit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QISKit/subscriptions","organizations_url":"https://api.github.com/users/QISKit/orgs","repos_url":"https://api.github.com/users/QISKit/repos","events_url":"https://api.github.com/users/QISKit/events{/privacy}","received_events_url":"https://api.github.com/users/QISKit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/QISKit/qiskit-core","description":"Quantum information science kit for writing quantum computing experiments,  programs, and applications.","fork":false,"url":"https://api.github.com/repos/QISKit/qiskit-core","forks_url":"https://api.github.com/repos/QISKit/qiskit-core/forks","keys_url":"https://api.github.com/repos/QISKit/qiskit-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/QISKit/qiskit-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/QISKit/qiskit-core/teams","hooks_url":"https://api.github.com/repos/QISKit/qiskit-core/hooks","issue_events_url":"https://api.github.com/repos/QISKit/qiskit-core/issues/events{/number}","events_url":"https://api.github.com/repos/QISKit/qiskit-core/events","assignees_url":"https://api.github.com/repos/QISKit/qiskit-core/assignees{/user}","branches_url":"https://api.github.com/repos/QISKit/qiskit-core/branches{/branch}","tags_url":"https://api.github.com/repos/QISKit/qiskit-core/tags","blobs_url":"https://api.github.com/repos/QISKit/qiskit-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/QISKit/qiskit-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/QISKit/qiskit-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/QISKit/qiskit-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/QISKit/qiskit-core/statuses/{sha}","languages_url":"https://api.github.com/repos/QISKit/qiskit-core/languages","stargazers_url":"https://api.github.com/repos/QISKit/qiskit-core/stargazers","contributors_url":"https://api.github.com/repos/QISKit/qiskit-core/contributors","subscribers_url":"https://api.github.com/repos/QISKit/qiskit-core/subscribers","subscription_url":"https://api.github.com/repos/QISKit/qiskit-core/subscription","commits_url":"https://api.github.com/repos/QISKit/qiskit-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/QISKit/qiskit-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/QISKit/qiskit-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/QISKit/qiskit-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/QISKit/qiskit-core/contents/{+path}","compare_url":"https://api.github.com/repos/QISKit/qiskit-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/QISKit/qiskit-core/merges","archive_url":"https://api.github.com/repos/QISKit/qiskit-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/QISKit/qiskit-core/downloads","issues_url":"https://api.github.com/repos/QISKit/qiskit-core/issues{/number}","pulls_url":"https://api.github.com/repos/QISKit/qiskit-core/pulls{/number}","milestones_url":"https://api.github.com/repos/QISKit/qiskit-core/milestones{/number}","notifications_url":"https://api.github.com/repos/QISKit/qiskit-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/QISKit/qiskit-core/labels{/name}","releases_url":"https://api.github.com/repos/QISKit/qiskit-core/releases{/id}","deployments_url":"https://api.github.com/repos/QISKit/qiskit-core/deployments","created_at":"2017-03-03T17:02:42Z","updated_at":"2018-06-28T15:22:56Z","pushed_at":"2018-06-28T15:06:29Z","git_url":"git://github.com/QISKit/qiskit-core.git","ssh_url":"git@github.com:QISKit/qiskit-core.git","clone_url":"https://github.com/QISKit/qiskit-core.git","svn_url":"https://github.com/QISKit/qiskit-core","homepage":"https://qiskit.org","size":27816,"stargazers_count":1855,"watchers_count":1855,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":525,"mirror_url":null,"archived":false,"open_issues_count":72,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":525,"open_issues":72,"watchers":1855,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/QISKit/qiskit-core/pulls/585"},"html":{"href":"https://github.com/QISKit/qiskit-core/pull/585"},"issue":{"href":"https://api.github.com/repos/QISKit/qiskit-core/issues/585"},"comments":{"href":"https://api.github.com/repos/QISKit/qiskit-core/issues/585/comments"},"review_comments":{"href":"https://api.github.com/repos/QISKit/qiskit-core/pulls/585/comments"},"review_comment":{"href":"https://api.github.com/repos/QISKit/qiskit-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/QISKit/qiskit-core/pulls/585/commits"},"statuses":{"href":"https://api.github.com/repos/QISKit/qiskit-core/statuses/381c6c28dc02bdd60ed3d9d9a17405a53d4d86c0"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"atilag"}}