RelationalAI / rai-sdk-python

The RelationalAI Software Development Kit (SDK) for Python.
Apache License 2.0
17 stars 4 forks source link

Improve api.list_computes #7

Open tomasrelai opened 3 years ago

tomasrelai commented 3 years ago

For api.list_computes :

  1. The help string does not list the allowed string values for state
  2. If I put in a different string, as in api.list_computes(ctx, "FOOBAR"), there is no error. We should instead let the user know (in case there's a typo).
tomasrelai commented 3 years ago

It would be nice to be able to filter by other attributes, such as machine size or region, eventually. Perhaps python 3's flag enums could help here.

bradlo commented 3 years ago

i could add the other filters to the SDK, but it would be better to add them to the REST API and then surface in the SDK.

apparently the REST API is not validating this argument, i will add an issue to the relationala-infra repo.

bradlo commented 3 years ago

I moved EngineSize and database Mode to enums, so there is now completion, etc .. I still need to add enums for filter values.

In order to filter on additional attributes, we need to extend the REST API, and then reflect those changes in the SDK.

bradlo commented 2 years ago

we have decided to revert the change to use enums back to using simple strings so we dont experience SDK breakage if the API adds eg: new states (which happened). the principle is to avoid intermediating the REST API, at least at this layer of the SDK.

billscheidel-rai commented 1 year ago

Note: This issue has been migrated to https://relationalai.atlassian.net/browse/RAI-3704.

This link is only accessible to employees of RelationalAI.