Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CatalogEntry API #1204

Merged
merged 2 commits into from
Feb 2, 2024
Merged

CatalogEntry API #1204

merged 2 commits into from
Feb 2, 2024

Conversation

akihikokuroda
Copy link
Collaborator

@akihikokuroda akihikokuroda commented Jan 31, 2024

Summary

Fix #1170

Details and comments

This PR adds ModelView APIs for CatalogEntry.

The list method will be enhanced to handle the query string for title, description and tags.

@IceKhan13
Copy link
Member

Can we review it @akihikokuroda ?

@akihikokuroda
Copy link
Collaborator Author

akihikokuroda commented Feb 1, 2024

@IceKhan13 Yes, please. I'll have follow up PR. Please take a look at this comment, too. #1170 (comment)

@psschwei
Copy link
Collaborator

psschwei commented Feb 1, 2024

This is probably my ignorance of django, but where/how do these APIs get specified? Or do they just get created automatically?

POST:api/v1/catalog_entries/ - create
GET:api/v1/catalog_entries/ - list
GET:api/v1/catalog_entries/{id}/ - get
UPDATE:api/v1/catalog_entries/{id}/ - update
PATCH:api/v1/catalog_entries/{id}/ - partial update
DELETE:api/v1/catalog_entries/{id}/ - delete

@Tansito
Copy link
Member

Tansito commented Feb 1, 2024

I didn't look at the PR yet so I'm going to talk in general. Using the ViewSet the class generates automatically the end-points for you taking into account the methods that you declare:

https://www.django-rest-framework.org/api-guide/viewsets/

@akihikokuroda
Copy link
Collaborator Author

@psschwei Yes, It is created by using ModelViewSet

@akihikokuroda
Copy link
Collaborator Author

The second commit has

POST:api/v1/programs/to_catalog 

and query string support for

GET:api/v1/catalog_entries/?{field}={included string}

Copy link
Collaborator

@psschwei psschwei left a comment

Choose a reason for hiding this comment

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

LGTM - API works fine on a local cluster
I would get another review before merging though, just to be sure (I'm not a django expert, so I may have missed something)

@akihikokuroda akihikokuroda merged commit cc87939 into Qiskit:main Feb 2, 2024
17 checks passed
david-alber pushed a commit to david-alber/quantum-serverless that referenced this pull request Feb 13, 2024
* add ModelView API for CatalogEntry

* additional apis for catalogentry

---------

Signed-off-by: Akihiko Kuroda <[email protected]>
Tansito added a commit that referenced this pull request Feb 27, 2024
* adding api documentation (swagger & redoc) to gateway

* allow unauthenticated users to read RuntimeJobViewSet

* allow swagger docu if user is not yet set

* only show api/v1/ patterns, add token authorization, rm django login

* drop jupyter from main helm readme (#1208)

Signed-off-by: Paul S. Schweigert <[email protected]>

* CatalogEntry API (#1204)

* add ModelView API for CatalogEntry

* additional apis for catalogentry

---------

Signed-off-by: Akihiko Kuroda <[email protected]>

* Repository removal (#1207)

* Removed main components from repository project

* Updated chart lock

* Remove repository references from the client

* add catalog status (#1211)

Signed-off-by: Akihiko Kuroda <[email protected]>

* Use LocalProvider for test (#1212)

* use LocalProvider for notebook test

Signed-off-by: Akihiko Kuroda <[email protected]>

* Documentation update (#1214)

* Update contribution guidelines

* Update contributing doc with supported python versions

* Remove Python 3.7 badge from README files

* Upgrade min python version in setup.py

* Test notebooks against k8s qs deployment (#1216)

* test notebooks against k8s qs deployment

Signed-off-by: Paul S. Schweigert <[email protected]>

* update notebook location

Signed-off-by: Paul S. Schweigert <[email protected]>

* use action for kind creation

Signed-off-by: Paul S. Schweigert <[email protected]>

* test all notebooks

Signed-off-by: Paul S. Schweigert <[email protected]>

* drop sleep

Signed-off-by: Paul S. Schweigert <[email protected]>

This was redundant, as the python setup in the next few steps takes
waaaay longer than 60s

---------

Signed-off-by: Paul S. Schweigert <[email protected]>

* Take out unnecessary Job.save() (#1217)

* take out unnecessary Job.save()

Signed-off-by: Akihiko Kuroda <[email protected]>

* Update Helm release kuberay-operator to v1 (#1121)

* Update Helm release kuberay-operator to v1

* Update api version

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: David <[email protected]>

* Fix link for Qiskit deprecation policy (#1218)

* Remove default login view (#1215)

* remove default login view

Signed-off-by: Akihiko Kuroda <[email protected]>

* adding api documentation (swagger & redoc) to gateway

---------

Signed-off-by: Paul S. Schweigert <[email protected]>
Signed-off-by: Akihiko Kuroda <[email protected]>
Co-authored-by: Paul Schweigert <[email protected]>
Co-authored-by: Akihiko (Aki) Kuroda <[email protected]>
Co-authored-by: David <[email protected]>
Co-authored-by: Karla Spuldaro <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Eric Arellano <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gateway / repository: add catalog api
4 participants