-
Notifications
You must be signed in to change notification settings - Fork 23
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
v1.0.0 ("pm convergenge m1") gets to master #275
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rate and not touch the "astrapy" layer (#222) * astrapy/idiomatic split structure: modules, imports, tests * completed refactor into new structure * complete refactoring into split classes, incl. tests. Not many methods implemented yet * astrapy classes allow parameter override in their copy methods * collection constructors does apply parameter overrides even when astra_db passed * wip for the optional namespace when creating Collections * create_collection, get_collection, drop_collection, Collection constructor
* list_collection_names method for [async]Database * typing of async fixtures ok * count_documents, insert_one, delete_one, delete_many
cross-namespace works for Database/Collection created in any way, and for all drop_collection calls
* final signature for drop_collection + tests * list_collections * check_exists semantics in Database.create_collection method * db.col_name and db['col_name'] aliases for get_collection * added a missing drop collection to test * restructure fixture hierarchy to fix async tests
* collection .database property (and all enriched copy() methods that made it possible) * collection .name property
* insert_many(sync)+test, find(sync)+test * tests for find(sync); distinct in cursor(sync)+tests; distinct in collection(sync)+tests * insert_many (sync/async) + tests * refactor into base cursor and cursor * async cursors * distinct(s/a + tests), async cursors(+ tests)
* remove all 'unsupported' clutter; implement find_one (a/sync) * dotenv example in readme
* astrapy-level 'chunked_delete_many' plain implementation * collection delete_many tests put chunking to test * projection filters through find_one_and_replace (also vector_), sync+async * (idiomatic) find_one_and_replace * projection support for (astrapy) find_one_and_update's * find_one_and_delete * find_one_and_update * replace_one * update_one * update_many
* bulk_write and required infra, sync impl / no test yet * bulk_write (sync): add unordered support and all tests * async bulk_write + all tests * add test for BulkWriteResult reduction
* error message against db.nonmethod() and getattr/getitem of async are non-async functions * command() method for raw POSTs
* error message against db.nonmethod() and getattr/getitem of async are non-async functions * command() method for raw POSTs * with_options as sugar for copy() methods * format on test
* collection.options method * provisionally raising an error if count_documents exceeds its max
…ties (metadata) (#247) * Adding drop function to the collection * Adding drop collection to collection * Moving the tests into the right test files * Removing async test because I was getting an event loop issue * Adding database attributes * Adding attributes to asyncdatabase * Removing unneeded attributes, fixing up collection.drop() * Running poetry black * Setting the property as a separate piece * Fixing up the async version for get_database_info * error message against db.nonmethod() and getattr/getitem of async are non-async functions * command() method for raw POSTs * with_options as sugar for copy() methods * rework database/collection info as per agreed conventions * regexp to parse api_endpoint into database_id --------- Co-authored-by: Kirsten Hunter <synedra@gmail.com>
* wip on docstrings * remove 'acknowledge' attribute from Result classes * upper_bound + raw-result lists in bulk write results and in some Results Introduce upper_bound parameter to count_documents + exceptions flow raw_results (plural and always a list) in deleteResult+insertManyResults bulk_api_results always a map to list for BulkWriteResult * add SortDocuments as singleton and likewise make ReturnDocument into a singleton * SortType, FilterType for uniformity
* remove 'acknowledge' attribute from Result classes * upper_bound + raw-result lists in bulk write results and in some Results Introduce upper_bound parameter to count_documents + exceptions flow raw_results (plural and always a list) in deleteResult+insertManyResults bulk_api_results always a map to list for BulkWriteResult * add SortDocuments as singleton and likewise make ReturnDocument into a singleton * SortType, FilterType for uniformity * copy methods for collection and database are made private * Add VectorMetric singleton * uniform header in pyfiles * all docstrings * adapt tests to delete_many/delete_all distinction; add docstring on real-time-cursors for sort
…trapy' (#251) Restructured package to feature 'idiomatic' first and foremost, keeping full back-compat with 'astrapy'
* db/ chunked_insert_many only intercepts and treats APIRequestError's * async chunked_insert_many actually stops at first bad chunk for ordered=True and partial_failures not allowed (it did not until now) * wip on exceptions * rational exception structure + sync insert_one + sync tests thereof * async insert_many + tests thereof * split exception-specific test to separate modules * decorator-based error recast logic. covering insert_one for now * request payload passes through the (legacy) APIException * full error handling in options() * count_documents handles its errors * full error handling for delete_all, delete_one, find_one_and_replace, find_one_and_update, replace_one, update_one * api-backed find_one_and_delete (astrapy + idiomatic), tests, and error handling * database.create_collection handles errors * all db methods except info handle their error * mini fix to exception classes in unit test * database_info utility exception passthrough; database.info handles its errors * delete_many handles its errors * prepare_update_info has list parameter * update_many paginated + handles its errors (testing on DEV for now) * special cursor-specific exceptions are handled * cursor exceptions covered by tests * command-cursors exceptions covered by tests * add test for find_one just in case * uniform raw_results to all Result, result-class refactoring and their to_bulk_write_result method * minor fix in exception class method * error-ready bulk_write for the ordered case * bulk_write handles its errors in the *ordered* case * test of hard errors with ordered bulk_write * bulk_write handles ts errors also if ordered=false * fix test with unordered insertions hence random execution order
…ataAPIFaultyResponseException; docstrings to all exceptions
* timeout support throughout astrapy/core layer * test for timeout behaviour to db/collection, sync/async, read/write * full max_time_ms support for all single-request methods of db and coll * cursors, find and their distinct() support timeout * docstring for DataAPITimeoutException * insert_many, delete_many, update_many support method-wide timeout * add sort to core update_one, delete_one, delete_one_by_predicate; add sort to idiomatic replace_one, update_one, delete_one + tests * align signatures and make most params kwonly across collection/asynccollection/database/asyncdatabase * operation classes bear the full method signatures (except timeout) * bulk_write supports timeout + tests * fix method name in unit test * enable update_many paginated tests in prod after deploy * more stringent values to ensure timeout tests pass
…es (#272) AstraDBADmin: methods async_database_info async_create_database async_list_databases async_drop_database AstraDBDatabaseAdmin: methods async_list_namespaces async_create_namespace async_drop_namespace async_info async_drop Utility functions: async_fetch_raw_database_info_from_id_token async_fetch_database_info Added to core/ops.py as needed: async_get_databases async_get_database async_create_database async_terminate_database async_create_keyspace async_delete_keyspace All idiomatic addtions come with tests, docstrings
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.