Skip to content
This repository was archived by the owner on Jul 28, 2023. It is now read-only.

Fix for empty job properties#139

Merged
diego-plan9 merged 5 commits into
Qiskit:masterfrom
jyu00:fix-empty-properties
Jun 6, 2019
Merged

Fix for empty job properties#139
diego-plan9 merged 5 commits into
Qiskit:masterfrom
jyu00:fix-empty-properties

Conversation

@jyu00
Copy link
Copy Markdown
Collaborator

@jyu00 jyu00 commented Jun 5, 2019

Summary

This is a fix for Qiskit/qiskit-ibm-provider#300. Job properties may not be available if the job hasn't completed. Rather than throwing an exception, job.properties will return None with this fix.

Details and comments

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Jun 5, 2019

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Copy Markdown
Member

@diego-plan9 diego-plan9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the first of many contributions, @jyu00! It's looking good - I made a couple of inline comments to further polish it.

Comment thread qiskit/providers/ibmq/job/ibmqjob.py
Comment thread test/ibmq/test_ibmq_job.py
Copy link
Copy Markdown
Member

@diego-plan9 diego-plan9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jyu00 !

@diego-plan9 diego-plan9 merged commit c13029d into Qiskit:master Jun 6, 2019
@jyu00 jyu00 deleted the fix-empty-properties branch June 7, 2019 12:27
rathishcholarajan pushed a commit to rathishcholarajan/qiskit-ibmq-provider that referenced this pull request Oct 27, 2021
This needs to change in the program upload body request in order to
meet the IBM Cloud API guidance.

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>
rathishcholarajan added a commit that referenced this pull request Oct 27, 2021
* Remove version field from runtime program (#152)

* Remove version field from runtime program

* Add release note

* Rename isPublic to is_public when creating or reading runtime programs (#155)

* Update programId to program_id when running program (#139)

This needs to change in the program upload body request in order to
meet the IBM Cloud API guidance.

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

* Add support to view program update date

* Upload runtime program using 'data' field (#157)

* Read programs from "programs" array in response (#161)

* Pass program as base64 string to update (#168)

* Accept JSON schema as program metadata (#158)

* Accept JSON schema as program metadata

* Update qiskit_ibm/runtime/ibm_runtime_service.py

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

* Pass program params as object (#171)

* Fix integration tests

Co-authored-by: Renier Morales <renier@users.noreply.github.com>
Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>
rathishcholarajan added a commit that referenced this pull request Nov 1, 2021
* Remove version field from runtime program (#152)

* Remove version field from runtime program

* Add release note

* Rename isPublic to is_public when creating or reading runtime programs (#155)

* Update programId to program_id when running program (#139)

This needs to change in the program upload body request in order to
meet the IBM Cloud API guidance.

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

* Add support to view program update date

* Upload runtime program using 'data' field (#157)

* Read programs from "programs" array in response (#161)

* Pass program as base64 string to update (#168)

* Accept JSON schema as program metadata (#158)

* Accept JSON schema as program metadata

* Update qiskit_ibm/runtime/ibm_runtime_service.py

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

* Pass program params as object (#171)

* Fix integration tests

Co-authored-by: Renier Morales <renier@users.noreply.github.com>
Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>
rathishcholarajan added a commit that referenced this pull request Nov 4, 2021
* Remove version field from runtime program (#152)

* Remove version field from runtime program

* Add release note

* Rename isPublic to is_public when creating or reading runtime programs (#155)

* Update programId to program_id when running program (#139)

This needs to change in the program upload body request in order to
meet the IBM Cloud API guidance.

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

* Add support to view program update date

* Upload runtime program using 'data' field (#157)

* Read programs from "programs" array in response (#161)

* Pass program as base64 string to update (#168)

* Accept JSON schema as program metadata (#158)

* Accept JSON schema as program metadata

* Update qiskit_ibm/runtime/ibm_runtime_service.py

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

* Pass program params as object (#171)

* Fix integration tests

Co-authored-by: Renier Morales <renier@users.noreply.github.com>
Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>
rathishcholarajan added a commit that referenced this pull request Nov 9, 2021
* Runtime release Q4 (#1069)

* Remove version field from runtime program (#152)

* Remove version field from runtime program

* Add release note

* Rename isPublic to is_public when creating or reading runtime programs (#155)

* Update programId to program_id when running program (#139)

This needs to change in the program upload body request in order to
meet the IBM Cloud API guidance.

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

* Add support to view program update date

* Upload runtime program using 'data' field (#157)

* Read programs from "programs" array in response (#161)

* Pass program as base64 string to update (#168)

* Accept JSON schema as program metadata (#158)

* Accept JSON schema as program metadata

* Update qiskit_ibm/runtime/ibm_runtime_service.py

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

* Pass program params as object (#171)

* Fix integration tests

Co-authored-by: Renier Morales <renier@users.noreply.github.com>
Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

* Allow updating runtime metadata in place (qiskit-ibm #188) (#1071)

* Allow updating runtime metadata in place (#188)

* update runtime metadata

* return if no data

* fix mypy

* Update releasenotes/notes/update-runtime-metadata-d2ddbcfc0d034530.yaml

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>
(cherry picked from commit b532b1476046eb7faa31f6027ae2f789675a804b)

* update release note

* Use count to reduce one last extra call to API (#172)

* Allow filtering runtime jobs by program ID (#1082)

* Allow runtime program authors to retrieve program data (#174) (#1083)

* retrieve program data

* refetch once if no program data

* remove unused import

* refresh program on data property

* fix lint

* Update qiskit_ibm/runtime/runtime_program.py

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>

* Update qiskit_ibm/runtime/runtime_program.py

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>

* Update qiskit_ibm/runtime/runtime_program.py

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>

* add test case

* add test case

* add default data constant

* add _validate_program method

* Update test/ibm/runtime/test_runtime.py

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>

* Update cache after updating program (#196) (#1085)

* Support pagination for retrieving runtime programs (#1087)

Co-authored-by: Renier Morales <renier@users.noreply.github.com>
Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>
filemaster pushed a commit to cbjuan/qiskit-ibmq-provider that referenced this pull request Nov 15, 2021
* Remove version field from runtime program (Qiskit#152)

* Remove version field from runtime program

* Add release note

* Rename isPublic to is_public when creating or reading runtime programs (Qiskit#155)

* Update programId to program_id when running program (Qiskit#139)

This needs to change in the program upload body request in order to
meet the IBM Cloud API guidance.

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

* Add support to view program update date (Qiskit#160)

* Upload runtime program using 'data' field (Qiskit#157)

* Read programs from "programs" array in response (Qiskit#161)

* Remove version field from runtime program (Qiskit#152)

* Remove version field from runtime program

* Add release note

* Rename isPublic to is_public when creating or reading runtime programs (Qiskit#155)

* Update programId to program_id when running program (Qiskit#139)

This needs to change in the program upload body request in order to
meet the IBM Cloud API guidance.

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

* Add support to view program update date (Qiskit#160)

* Upload runtime program using 'data' field (Qiskit#157)

* Read programs from "programs" array in response (Qiskit#161)

* Pass program as base64 string to update (Qiskit#168)

* Accept JSON schema as program metadata (Qiskit#158)

* Accept JSON schema as program metadata

* Update qiskit_ibm/runtime/ibm_runtime_service.py

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

* Pass program params as object (Qiskit#171)

* Fix integration tests

* Use count to reduce one last extra call to API (Qiskit#172)

* Allow updating runtime metadata in place (Qiskit#188)

* update runtime metadata

* return if no data

* fix mypy

* Update releasenotes/notes/update-runtime-metadata-d2ddbcfc0d034530.yaml

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>

* Remove version field from runtime program (Qiskit#152)

* Remove version field from runtime program

* Add release note

* Rename isPublic to is_public when creating or reading runtime programs (Qiskit#155)

* Update programId to program_id when running program (Qiskit#139)

This needs to change in the program upload body request in order to
meet the IBM Cloud API guidance.

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

* Add support to view program update date (Qiskit#160)

* Upload runtime program using 'data' field (Qiskit#157)

* Read programs from "programs" array in response (Qiskit#161)

* Pass program as base64 string to update (Qiskit#168)

* Accept JSON schema as program metadata (Qiskit#158)

* Accept JSON schema as program metadata

* Update qiskit_ibm/runtime/ibm_runtime_service.py

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>

* Pass program params as object (Qiskit#171)

* Fix integration tests

* Use count to reduce one last extra call to API (Qiskit#172)

* Allow updating runtime metadata in place (Qiskit#188)

* update runtime metadata

* return if no data

* fix mypy

* Update releasenotes/notes/update-runtime-metadata-d2ddbcfc0d034530.yaml

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>

* Allow filtering runtime jobs by program ID (Qiskit#193)

* Allow filtering runtime jobs by program ID

* Fix lint

* Allow runtime program authors to retrieve program data (Qiskit#174)

* retrieve program data

* refetch once if no program data

* remove unused import

* refresh program on data property

* fix lint

* Update qiskit_ibm/runtime/runtime_program.py

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>

* Update qiskit_ibm/runtime/runtime_program.py

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>

* Update qiskit_ibm/runtime/runtime_program.py

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>

* add test case

* add test case

* add default data constant

* add _validate_program method

* Update test/ibm/runtime/test_runtime.py

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>

* Update cache after updating program (Qiskit#196)

* Allow filtering runtime jobs by provider (Qiskit#197)

* add provider param

* split provider into hub/group/project

* add reno

* wip add test case

* fix lint/docs

* Update qiskit_ibm/runtime/ibm_runtime_service.py

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>

* Update releasenotes/notes/filter-jobs-by-provider-dead04faaf223840.yaml

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>

* refactor test cases

* remove print

* add integration test

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>

* Support pagination for retrieving runtime programs  (Qiskit#170)

* wip add limit/offset params

* add reno

* refactor & update test case

* offset -> skip, implement refresh logic

* refresh when skip/limit not default

* Update releasenotes/notes/runtime-program-pagination-8d599ae984a5ce33.yaml

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>

* Update releasenotes/notes/runtime-program-pagination-8d599ae984a5ce33.yaml

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>

* add  to test case

* refactor refresh logic

* refactor

* fix lint

* add integration test

* update doc string

* Update qiskit_ibm/api/clients/runtime.py

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>

* cleanup merge

* Apply suggestions from code review

* fix lint refactor

* Fetch all programs upfront 20 at a time and store in cache

For subsequent requests paginate and return from cache

* Fix integration test

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>
Co-authored-by: Rathish Cholarajan <Rathish.C@ibm.com>

Co-authored-by: Renier Morales <renier@users.noreply.github.com>
Co-authored-by: Jessie Yu <jessieyu@us.ibm.com>
Co-authored-by: Kevin Tian <kevin.tian@ibm.com>
ryancocuzzo pushed a commit to ryancocuzzo/qiskit-ibmq-provider that referenced this pull request Jun 14, 2022
* fix staging integration tests against legacy environment

* separate tests by type (integration, unit, e2e)

* remove details from docstring that are documented in CONTRIBUTING.md

* allow to run supported tutorials

* update make targets

* do not cancel matrix tests if any test fails

* Update CONTRIBUTING.md

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>

* Update CONTRIBUTING.md

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>

* Update CONTRIBUTING.md

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>

* move new integration test that came in via a previous merge conflict to the right folder

* address code review feedback (shallow directory structure)

Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants