ibm-quantum / Hub-Automation

Apache License 2.0
9 stars 5 forks source link

Add edit_backends.py for adding / removing backends from projects #9

Closed pshires closed 3 years ago

pshires commented 3 years ago

closes #5

@Matt-Stypulkoski Let me know what you think when you get a chance to look it over. Thank you.

Matt-Stypulkoski commented 3 years ago

Hi @pshires, Thanks for the contribution again! The code itself looks good, just had a few comments. I think we should either change the script name to edit_project_backends.py, since it is specific to editing the backends of a project and requires that information, or to add handling for adding backends to the Group level as well. I think either option is good, though having both Group and Project level backend editing contained in a single script would probably be cleaner. However, I do not want to force more work onto you, and the current script itself seems to work well, so it is up to you if you would want to expand upon it or not.

pshires commented 3 years ago

Hey @Matt-Stypulkoski , thanks for reviewing. I agree with your assessment that it would be cleaner to have both in the same script, but looking back at issue #5 , I'm not seeing the usage outlined for adding / removing backends straight from the group level. Would it be the same usage (excluding project info) but with the following URL: /Network/{hubName}/Groups/{groupName}?

pshires commented 3 years ago

I tried it, seems like the /Network/{hubName}/Groups/{groupName}/devices URL works fine for adding & removing from the group level. I made changes to the script to allow for adding and removing from the Group and Project level.

Matt-Stypulkoski commented 3 years ago

Everything looks good. Thanks for contributing!