Skip to content

Commit

Permalink
Vectorize support + nonAstra databases for v1.2.0 (#280)
Browse files Browse the repository at this point in the history
* handling of absent components in core db api path

* client module aware of non-astra

* environment knowledge throughout database and admin objects

* WIP on the DataAPIDatabaseAdmin

* started the API Commander

* APICommander and DataAPIDatabaseAdmin mostly implemented

* api_commander: take out token handling, manage caller stack, add OTHER in environments

* add missing lazy import in DataAPIDatabaseAdmin

* base options percolate through Collection. WIP not uysed yet

* custom header passthrough from idiomatic collection to request; added unit+integration tests for vectorize

* docstring typo fixes

* more control over local header vectorize tests

* add azure_openai to vectorize tests

* add testing of vectorize for jina,mistral,voyage

* timeout inherited from collection default

* complete vectorize test matrix, adapt to Astra, refactor test directory and code

* remove a temporary providers json

* better validation of cmdline model whitelisting

* vectorize test assets refactoring

* full split of vectorize tests by auth type

* commented out-of-scope providers

* shared_secret vectorize test; authentication param name in service options

* more provider exclusion logic

* refactor API Options for further extensibility

* adding api_options module

* add upstage to the tested providers; add the insert-one alternate testing code

* more hf providers, fix azure_oai, upstage with its special testing

* update projection docstrings; expand projection type for slices

* remove the unused ensure_fields parameter in projection normalization

* remove under-current-dev note for vectorize; added projection to in-docstring find_one calls

* add check on the returned service object in vectorize int. tests

* toward automation of test case checks

* dynamic vecprovider test generation

* docstring finalized for vectorize

* refactor tests to consolidate a single vectorize folder

* finish test refactoring; add missing methods of DataAPIDatabaseAdmin

* add replication_options in data api admin docstring

* generalize in-depth vectorize tests; fix no-apikey-in-header bug with async collections

* cleanup of docstrings and references

* add tests on projection with ; add vectorize tests header-overrides-shared_secret

* leave nemo selection to the findEmbProv endpoint; remove the failing test on {:1} projection (the new norm)

* add missing type hint

* admin idiomatic tests, add label of token/envs

* add dataapidatabaseadmin missing docstrings

* adapt get_database to accept api_endpoint in place of id

* version bump -> 1.2.0

* better error message and more tolerant parsing for nonAstra api endpoints

* minor docstring improvements

* type hint for authentication in CollectionVectorServiceOptions

* insert_many and bulk_write are unordered by default

* ordered=False docstring update

* tiny docstring example reformat
  • Loading branch information
hemidactylus authored May 22, 2024
1 parent 9f039ad commit cb881ee
Show file tree
Hide file tree
Showing 40 changed files with 3,501 additions and 856 deletions.
4 changes: 4 additions & 0 deletions astrapy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def get_version() -> str:
from astrapy.admin import ( # noqa: E402
AstraDBAdmin,
AstraDBDatabaseAdmin,
DataAPIDatabaseAdmin,
)
from astrapy.client import ( # noqa: E402
DataAPIClient,
Expand All @@ -77,12 +78,15 @@ def get_version() -> str:
"Collection",
"Database",
"DataAPIClient",
"DataAPIDatabaseAdmin",
"__version__",
]


__pdoc__ = {
"api": False,
"api_commander": False,
"api_options": False,
"core": False,
"db": False,
"ops": False,
Expand Down
Loading

0 comments on commit cb881ee

Please sign in to comment.