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

Version 1.3 #285

Merged
merged 38 commits into from
Jun 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
a1609f3
reinstate collection.delete_many with empty filter for truncate
hemidactylus Jun 6, 2024
5fc690f
deprecation of delete_all (+related test utilities); removal of old c…
hemidactylus Jun 13, 2024
027e10e
Deprecation sine die of bulk_write
hemidactylus Jun 13, 2024
f77f633
changes
hemidactylus Jun 13, 2024
abf17a1
vector/s/ize params deprecation, collection.py
hemidactylus Jun 14, 2024
a8fcc4d
resiliency of tests (core+idiomatic) to vector not being returned und…
hemidactylus Jun 14, 2024
923e3e4
improved vectorize_methods settings handling; partial support for hfd…
hemidactylus Jun 14, 2024
a479942
shorten model root name
hemidactylus Jun 15, 2024
995972a
hf ded tweaks to vectorize coll models generation
hemidactylus Jun 15, 2024
47aefb8
adapt vectorize tests to hf ded
hemidactylus Jun 15, 2024
e9521aa
deprecation of vector/ize orderly brought to all Operation classes
hemidactylus Jun 18, 2024
9329574
revert deprecation of bulk_insert
hemidactylus Jun 18, 2024
84f99b4
adapt testing to modelName management in HD dedicated
hemidactylus Jun 18, 2024
7efabe8
tests capture and check deprecations for all usages of vector/ize= st…
hemidactylus Jun 18, 2024
1126b22
added HCD and CASSANDRA to the Environment values
hemidactylus Jun 18, 2024
44bb975
more clarity in string repr of cursors
hemidactylus Jun 18, 2024
0513ba8
use type alias for filter consistently
hemidactylus Jun 18, 2024
8a891bc
callback mechanism to store the sort vector
hemidactylus Jun 18, 2024
c9ffc62
expose include_sort_vector option to find
hemidactylus Jun 18, 2024
a7d21d6
add prefetch iterator wrappers for the returnvector
hemidactylus Jun 19, 2024
21cb03a
prefetching for include_sort_vector
hemidactylus Jun 19, 2024
4b57082
revert nullable-model-name changes and cope with disappeared .provide…
hemidactylus Jun 19, 2024
d04ccd8
include_sort_vector and get_sort_vector, extensive test coverage
hemidactylus Jun 19, 2024
a4bd460
add code examples for get_sort_vector in docstring for the two find m…
hemidactylus Jun 19, 2024
ae17dfe
add Content-Type header to all api requests
hemidactylus Jun 20, 2024
311ccb6
changelog update
hemidactylus Jun 20, 2024
ede2f4d
token providers
hemidactylus Jun 20, 2024
1888a04
full transition to TokenProvider
hemidactylus Jun 21, 2024
7e1e46b
vectorize: support testing of openai project/org ids
hemidactylus Jun 21, 2024
c964b85
rename attribute token -> token_provider where needed
hemidactylus Jun 21, 2024
e2083d1
docstring about token provider
hemidactylus Jun 21, 2024
f28c4f5
token inheritance tests; eq and copy methods of api commander
hemidactylus Jun 21, 2024
457dd92
changes file
hemidactylus Jun 21, 2024
51e48ac
tests: modernize and lift upward fixtures and paradigmaticize object …
hemidactylus Jun 21, 2024
8032c33
astra/nonastra plug-your-db management
hemidactylus Jun 21, 2024
b57bfa1
astra/nonastra management fully covers vectorize
hemidactylus Jun 21, 2024
337dcd4
nonAstra admin (i.e. namespace crud) tests
hemidactylus Jun 21, 2024
242c707
rework fixture inheritance and naming for alternate keyspace (incl.as…
hemidactylus Jun 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 105 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
v. 1.3.0
========
Integration testing covers Astra and nonAstra smoothly:
- idiomatic library
- vectorize_idiomatic
- nonAstra admin, i.e. namespace crud
Add the TokenProvider abstract class => and StaticTokenProvider, UsernamePasswordTokenProvider
Introduce CHANGES file.
Add __eq__ and _copy methods to APICommander class
Allow delete_many({}) with empty filter
Implement include_sort_vector option to Collection.find and get_sort_vector to cursors
Add Content-Type header to all API requests
Added HCD and CASSANDRA Environment values (besides the other non-Astra DSE and OTHER)
Clearer string repr of cursors ('retrieved' => 'yielded so far')
Deprecation of collection delete_all method in favour of delete_many(filter={})
Introduction of a custom deprecation decorator for async method removal tests
Deprecation of vector,vectors and vectorize params from collections and Operations
Remove several long-deprecated methods from **core API** (i.e. internal changes):
AstraDBCollection.delete => delete_one
AstraDBCollection.upsert => upsert_one
AsyncAstraDBCollection.upsert => upsert_one
AstraDB.truncate_collection => AstraDBCollection.clear
AsyncAstraDB.truncate_collection => AsyncAstraDBCollectionclear
Add support for null tokens in the core library

v. 1.2.1
========
Raise default chunk size for insert_many to 50
Improvements in docstrings, testing, support for latest responses from vectorize.


v. 1.2.0
========
Non-Astra environment awareness:
astrapy.constants.Environment enum for the "environment" parameter to client, etc
flexibility and adaptive defaults for data api url
environment knowledge trickles throughout all classes (client, admins, databases)
DataAPIDatabaseAdmin class (i.e. for namespace CRUD)
(internal) astrapy.api_commander.APICommander
(internal) astrapy.api_options.{BaseAPIOptions, CollectionAPIOptions}
$vectorize support:
"service options" for creating/retrieving collections, covering $vectorize needs
embedding_api_key parameter to collection (for "header" usage)
collection-level timeout parameter (overridable in single method calls)
expand "projection" type to include slice projections
client.get_database can accept an API endpoint directly
insert_many and bulk_write default to ordered=False


v. 1.1.0
========
Adds estimated_document_count method to Collection class.


v. 1.0.0
========
(Introduction of the "idiomatic API", relegating "core" to become non-user-facing.)

Split classes, modules, tests to keep the "idiomatic" layer well separate and not touch the "astrapy" layer
DDL and some DML methods to m1
Passing secondary keyspace to action workflows
Fix bug in copy and to_[a]sync when set_caller is later used
Full cross-namespace management in DDL
More DDL methods and signature adjustments for Database
Sl overridable copy methods
Cursor/AsyncCursor, find and distinct
Remove all 'unsupported' clutter; implement find_one (a/sync)
DML for idiomatic + necessary changes around
Bulk_write method
More management methods
Sl collateral commands
Commandcursor (+async), used in list_collections
Sl collection options + cap-aware count_documents
Fix #245: Delete CHANGES.md
Collection.drop + database/collection info and related methods/properties (metadata)
Adapt to latest choices in API semantics
More syntax changes as discussed + all docstrings
Full support for dotted key names in distinct
Refactor to feature 'idiomatic' first, with full back-compat with 'astrapy'
Add sorting in hashing for distinct and factor it away
Exception management with a hierarchy of Exception classes
Full timeout support
Sl api refinements
ObjectIDs and UUIDs handled throughout (+ tests)
Admin interfaces and classes
Docstrings for all the admin/client parts + minor improvements to docstrings around
Readme overhaul
Exporting logger for back-compatibility
Sl adjustments
Custom payload serialization for httpx to block NaNs
Improved docstrings (minor stuff)
Methods repr/str to all objects for graceful display
Full test suite on client/admin classes
Abstract DatabaseAdmin, admin standard utility conversion/methods + tests thereof
Collection options is a dataclass and not a dict anymore
Pdoc annotations to control auto-docs
Logging, create_database signature
Added async support for admin, as alternate methods on original classes
Use MultiCallTimeoutManager in create_collection methods
V1.0.0 ("pm convergenge m1") gets to master


(prior to 1.0.0)
================
What is now dubbed the "core API" and is not supposed to be used directly at all.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ my_collection.update_one(

cursor = my_collection.find(
{},
vector=[0, 0.2, 0.4],
sort={"$vector": [0, 0.2, 0.4]},
limit=2,
include_similarity=True,
)
Expand Down Expand Up @@ -414,6 +414,8 @@ That being said, there are no known breakings of backward compatibility:
**legacy code would run with a newest astrapy version just as well.**
Here is a recap of the minor changes that came _to the old API_ with 1.0.0:

- Added support for null tokens (with the effect of no authentication/token header in requests)
- Added Content-Type header to all HTTP requests to the API
- Added methods to `[Async]AstraDBCollection`: `delete_one_filter`,
- Paginated find methods (sync/async) type change from Iterable to Generator
- Bugfix: handling of the mutable caller identity in copy and convert (sync/async) methods
Expand Down
1 change: 1 addition & 0 deletions astrapy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def get_version() -> str:
"api_options": False,
"core": False,
"db": False,
"meta": False,
"ops": False,
"ids": False,
}
Loading
Loading