Skip to content

Commit

Permalink
Add usage.read_units in fetch/query responses (#270)
Browse files Browse the repository at this point in the history
## Problem

Need to update the generated core and surface usage data properly.

## Solution

- Make a few adjustments related to tag names in updated OpenAPISpec
- Update data integration tests to assert `read_units` are present
- Make adjustments to GRPC response parsing to account for the new data
attributes

## Type of Change

- [x] New feature (non-breaking change which adds functionality)
  • Loading branch information
jhamon authored Jan 13, 2024
1 parent 93a04ca commit 5370b09
Show file tree
Hide file tree
Showing 16 changed files with 438 additions and 569 deletions.
2 changes: 1 addition & 1 deletion pinecone/control/index_host_store.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Dict
from pinecone.config import Config
from pinecone.core.client.api.manage_pod_indexes_api import ManagePodIndexesApi as IndexOperationsApi
from pinecone.core.client.api.manage_indexes_api import ManageIndexesApi as IndexOperationsApi
from pinecone.core.client.exceptions import PineconeException
from pinecone.utils import normalize_host

Expand Down
2 changes: 1 addition & 1 deletion pinecone/control/pinecone.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from pinecone.config import PineconeConfig, Config

from pinecone.core.client.api.manage_pod_indexes_api import ManagePodIndexesApi as IndexOperationsApi
from pinecone.core.client.api.manage_indexes_api import ManageIndexesApi as IndexOperationsApi
from pinecone.core.client.api_client import ApiClient
from pinecone.utils import get_user_agent
from pinecone.core.client.models import (
Expand Down
2 changes: 1 addition & 1 deletion pinecone/core/client/api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# do not import all apis into this module because that uses a lot of memory and stack frames
# if you need the ability to import all apis from one package, import them with
# from pinecone.core.client.apis import ManagePodIndexesApi
# from pinecone.core.client.apis import ManageIndexesApi
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from pinecone.core.client.model.index_model import IndexModel


class ManagePodIndexesApi(object):
class ManageIndexesApi(object):
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Expand Down
Loading

0 comments on commit 5370b09

Please sign in to comment.