You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Problem
Implement the following new methods:
- `start_import`
- `describe_import`
- `list_imports`
- `cancel_import`
## Solution
#### Code generation changes
Since these features are in prerelease, they only exist in the spec for
the upcoming 2024-10 API version. This required me to make modifications
to the codegen script that is now run as:
```
./codegen/build-oas.sh 2024-07 false && ./codegen/build-oas.sh 2024-10 true
```
The second boolean argument is used to tell the codegen script whether
the generated code should be stored in a new `pinecone/core_ea`
subpackage. In the future we should probably do more to hide this
complexity from the developer, but for now it is good enough.
#### Code organization
For the bespoke bits of the implementation that wrap the generated code,
I have put them into a new class, `ImportFeatureMixin`, that the `Index`
class inherits from. These functions could have all been implemented
directly in the `Index` class, but I thought it a bit tidier to
segregate these into a separate spot than just dump everything into one
giant file.
#### Overridden repr representation on generated objects
The default print output in the generated classes comes from pprint and
it looks quite poor for large objects. So I installed overrides that
dump the objects into a formatted json style instead. I had previously
done something similar for describe_index, etc, methods, so for this PR
it was just a matter of cleaning up that logic a bit and moving it
somewhere it could be reused.
So far, I haven't tweaked the generated classes to do this approach
across the board because it doesn't work well for long arrays of vector
values.
## Type of Change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] This change requires a documentation update
- [ ] Infrastructure change (CI configs, etc)
- [ ] Non-code change (docs, etc)
- [ ] None of the above: (explain here)
## Test Plan
Manual testing with a dev release is in this [demo
notebook](https://colab.research.google.com/drive/1W3OhMDG1yW2rdwx-ZulYH847m9R_IUuK#scrollTo=gGvVbfkYNz61
)
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+23
Original file line number
Diff line number
Diff line change
@@ -142,3 +142,26 @@ Hello, from your virtualenv!
142
142
```
143
143
144
144
If you experience any issues please [file a new issue](https://github.com/pinecone-io/pinecone-python-client/issues/new).
145
+
146
+
147
+
## Consuming API version upgrades
148
+
149
+
These instructions can only be followed by Pinecone employees with access to our private APIs repository.
150
+
151
+
Prerequisites:
152
+
- You must be an employee with access to private Pinecone repositories
153
+
- You must have [Docker Desktop](https://www.docker.com/products/docker-desktop/) installed and running. Our code generation script uses a dockerized version of the OpenAPI CLI.
154
+
- You must have initialized the git submodules under codegen
155
+
156
+
```sh
157
+
git submodule
158
+
```
159
+
160
+
161
+
To regenerate the generated portions of the client with the latest version of the API specifications, you need to have Docker Desktop running on your local machine.
details ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Additional information about the error. This field is not guaranteed to be present.. [optional] # noqa: E501
170
+
details ({str: (bool, dict, float, int, list, str, none_type)}): Additional information about the error. This field is not guaranteed to be present.. [optional] # noqa: E501
details ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Additional information about the error. This field is not guaranteed to be present.. [optional] # noqa: E501
263
+
details ({str: (bool, dict, float, int, list, str, none_type)}): Additional information about the error. This field is not guaranteed to be present.. [optional] # noqa: E501
0 commit comments