Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5,392 changes: 5,392 additions & 0 deletions sdk/cosmos/azure-cosmos/api.md

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions sdk/cosmos/azure-cosmos/api.metadata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
apiMdSha256: de3b8c0f2a0405fac7152d562c982bf98bf7bb546c46f05e39164574e47f7f7a
parserVersion: 0.3.28
pythonVersion: 3.13.14
8 changes: 7 additions & 1 deletion sdk/cosmos/azure-cosmos/cspell.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
{
"ignoreWords": [
"acked",
"activityid",
"hdrh",
"hdrhistogram",
"dedup",
"deduped",
"deduping",
"dedupe",
"dedups",
"llsn",
"perfdb",
"perfresults",
"pkrange",
"ppcb",
"reindexing",
"rerank",
"reranker",
"toctou"
"responsecontinuationtokenlimitinkb",
"toctou",
"ufffd"
]
}
2 changes: 1 addition & 1 deletion sdk/cosmos/azure-cosmos/tests/test_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -1982,7 +1982,7 @@ def test_get_resource_with_dictionary_and_object(self):
def test_delete_all_items_by_partition_key(self):
# create container via setup client (control-plane)
created_collection = self._create_container_for_test(
container_id='test_delete_all_items_by_partition_key ' + str(uuid.uuid4()),
container_id='test_delete_all_items_by_partition_key_' + str(uuid.uuid4()),
partition_key=PartitionKey(path='/pk', kind='Hash')
)
# Create two partition keys
Expand Down
2 changes: 1 addition & 1 deletion sdk/cosmos/azure-cosmos/tests/test_crud_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -1726,7 +1726,7 @@ async def test_get_resource_with_dictionary_and_object_async(self):
async def test_delete_all_items_by_partition_key_async(self):
# create container via setup client (control-plane)
created_collection = await self._create_container_for_test(
container_id='test_delete_all_items_by_partition_key ' + str(uuid.uuid4()),
container_id='test_delete_all_items_by_partition_key_' + str(uuid.uuid4()),
partition_key=PartitionKey(path='/pk', kind='Hash')
)
# Create two partition keys
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2638,7 +2638,7 @@ def test_delete_all_items_by_partition_key(self):

# create container via setup client (control-plane)
created_collection = key_db.create_container(
id='test_delete_all_items_by_partition_key ' + str(uuid.uuid4()),
id='test_delete_all_items_by_partition_key_' + str(uuid.uuid4()),
partition_key=PartitionKey(path='/pk', kind='Hash')
)
data_collection = data_db.get_container_client(created_collection.id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2329,7 +2329,7 @@ async def test_delete_all_items_by_partition_key_async(self):

# create container via setup client (control-plane)
created_collection = await key_db.create_container(
id='test_delete_all_items_by_partition_key ' + str(uuid.uuid4()),
id='test_delete_all_items_by_partition_key_' + str(uuid.uuid4()),
partition_key=PartitionKey(path='/pk', kind='Hash')
)
data_collection = data_db.get_container_client(created_collection.id)
Expand Down
9 changes: 0 additions & 9 deletions sdk/cosmos/azure-cosmos/tests/test_full_text_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,6 @@ def test_fail_create_full_text_indexing_policy(self):
# pytest.fail("Container creation should have failed for lack of embedding policy.")
except exceptions.CosmosHttpResponseError as e:
assert e.status_code == 400
assert re.search(
r"the path of the full.text index.*does not match the path specified in the full.text policy",
e.http_error_message, re.IGNORECASE)

# Pass a full text indexing policy with a wrongly formatted path
Comment thread
simorenoh marked this conversation as resolved.
indexing_policy_wrong_path = {
Expand All @@ -320,9 +317,6 @@ def test_fail_create_full_text_indexing_policy(self):
pytest.fail("Container creation should have failed for invalid path.")
except exceptions.CosmosHttpResponseError as e:
assert e.status_code == 400
assert re.search(
r"full.text index specification at index \(0\) contains invalid path",
e.http_error_message, re.IGNORECASE)

# Pass a full text indexing policy without a path field
indexing_policy_no_path = {
Expand All @@ -340,9 +334,6 @@ def test_fail_create_full_text_indexing_policy(self):
pytest.fail("Container creation should have failed for missing path.")
except exceptions.CosmosHttpResponseError as e:
assert e.status_code == 400
assert re.search(
r"missing path in full.text index specification at index \(0\)",
e.http_error_message, re.IGNORECASE)

# Skipped until testing pipeline is set up for full text multi-language support
@pytest.mark.skip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,6 @@ async def test_fail_create_full_text_indexing_policy_async(self):
# pytest.fail("Container creation should have failed for lack of embedding policy.")
except exceptions.CosmosHttpResponseError as e:
assert e.status_code == 400
assert re.search(
r"the path of the full.text index.*does not match the path specified in the full.text policy",
e.http_error_message, re.IGNORECASE)

# Pass a full text indexing policy with a wrongly formatted path
indexing_policy_wrong_path = {
Expand All @@ -326,9 +323,6 @@ async def test_fail_create_full_text_indexing_policy_async(self):
pytest.fail("Container creation should have failed for invalid path.")
except exceptions.CosmosHttpResponseError as e:
assert e.status_code == 400
assert re.search(
r"full.text index specification at index \(0\) contains invalid path",
e.http_error_message, re.IGNORECASE)

# Pass a full text indexing policy without a path field
indexing_policy_no_path = {
Expand All @@ -346,9 +340,6 @@ async def test_fail_create_full_text_indexing_policy_async(self):
pytest.fail("Container creation should have failed for missing path.")
except exceptions.CosmosHttpResponseError as e:
assert e.status_code == 400
assert re.search(
r"missing path in full.text index specification at index \(0\)",
e.http_error_message, re.IGNORECASE)

# Skipped until testing pipeline is set up for full text multi-language support
@pytest.mark.skip
Expand Down
2 changes: 1 addition & 1 deletion sdk/cosmos/azure-cosmos/tests/test_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def test_container_delete_item_throughput_bucket(self):
def test_container_delete_all_items_by_partition_key_throughput_bucket(self):
# Control-plane container creation.
created_collection_ref = self.database.create_container(
id='test_delete_all_items_by_partition_key ' + str(uuid.uuid4()),
id='test_delete_all_items_by_partition_key_' + str(uuid.uuid4()),
partition_key=PartitionKey(path='/pk', kind='Hash'))
data_collection = self.data_database.get_container_client(created_collection_ref.id)

Expand Down
2 changes: 1 addition & 1 deletion sdk/cosmos/azure-cosmos/tests/test_headers_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ async def test_container_delete_item_throughput_bucket_async(self):
async def test_container_delete_all_items_by_partition_key_throughput_bucket_async(self):
# Control-plane container creation.
created_collection_ref = await self.database.create_container(
id='test_delete_all_items_by_partition_key ' + str(uuid.uuid4()),
id='test_delete_all_items_by_partition_key_' + str(uuid.uuid4()),
partition_key=PartitionKey(path='/pk', kind='Hash'))
data_collection = self.data_database.get_container_client(created_collection_ref.id)

Expand Down
Loading