rawwar commented on code in PR #37307:
URL: https://github.com/apache/airflow/pull/37307#discussion_r1581639781
##########
airflow/providers/pinecone/hooks/pinecone.py:
##########
@@ -135,119 +170,106 @@ def upsert(
**kwargs,
)
- @staticmethod
+ def get_pod_spec_obj(
+ self,
+ replicas: int | None = None,
+ shards: int | None = None,
+ pods: int | None = None,
+ pod_type: str | None = "p1.x1",
+ metadata_config: dict | None = None,
+ source_collection: str | None = None,
+ environment: str | None = None,
+ ) -> PodSpec:
+ return PodSpec(
+ environment=environment or self.environment,
+ replicas=replicas,
+ shards=shards,
+ pods=pods,
+ pod_type=pod_type,
+ metadata_config=metadata_config,
+ source_collection=source_collection,
+ )
+
+ def get_serverless_spec_obj(self, cloud, region: str | None = None) ->
ServerlessSpec:
+ return ServerlessSpec(cloud=cloud, region=region or self.region)
+
def create_index(
+ self,
Review Comment:
Sorry, we have separate methods for Spec objects and their docstrings talk
about all the required parameters. Those two functions are right above this
method. I think I'll update the docstring to mention about using the relevant
methods to generate the Spec object. I guess that would clear things
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]