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

[core] Love to Ops #127

Open
hemidactylus opened this issue Nov 28, 2023 · 1 comment
Open

[core] Love to Ops #127

hemidactylus opened this issue Nov 28, 2023 · 1 comment
Labels
core "core" astrapy is not meant for external use anymore enhancement New feature or request

Comments

@hemidactylus
Copy link
Collaborator

The ops part of astrapy should get a systematic check: typing support is not always correct, test coverage is scarce (not an easy challenge), signature of methods should be checked.

@hemidactylus
Copy link
Collaborator Author

Two things come to mind:

  1. probably there's no reason why create_keyspace returns a raw httpx.Response. If so, align with the others, with custom handling since it will return 201 when successful. Much like create_database, in this case we could craft a sensible small dict to make this method uniform to the others
  2. In general, some DevOps calls return a List and others a Dict. Now everything is typed as OPS_API_RESPONSE which is union of the two, but this is not perfect. The create keyspace had to cast to dict for test to typecheck. Indeed whether dict or list is fixed for a given API call. Make the code reflect this, possibly with two _json_request and _list_request methods or something. A long, tedious work.

@erichare erichare added the enhancement New feature or request label Dec 20, 2023
@hemidactylus hemidactylus changed the title Love to Ops [core] Love to Ops Apr 11, 2024
@hemidactylus hemidactylus added the core "core" astrapy is not meant for external use anymore label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core "core" astrapy is not meant for external use anymore enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants