Skip to content

Commit 13ad789

Browse files
committed
Update contributing
1 parent fd58704 commit 13ad789

File tree

1 file changed

+41
-24
lines changed

1 file changed

+41
-24
lines changed

CONTRIBUTING.md

Lines changed: 41 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,47 @@ If you want to extract only the path to your new virtualenv, you can run `poetry
7575

7676
### Step 4. Enable pre-commit hooks.
7777

78-
Run `poetry run pre-commit install` to enable checks to run when you commit so you don't have to find out during your CI run that minor issues need to be addressed.
78+
Run `poetry run pre-commit install` to enable checks to run when you commit so you don't have to find out during your CI run that minor lint issues need to be addressed.
79+
80+
## Common tasks
81+
82+
### Running tests
83+
84+
- Unit tests: `make test-unit`
85+
- Integration tests: `PINECONE_API_KEY="YOUR API KEY" make test-integration`
86+
- Run the tests in a single file: `poetry run pytest tests/unit/data/test_bulk_import.py -s -vv`
87+
88+
### Running the ruff linter / formatter
89+
90+
These should automatically trigger if you have enabled pre-commit hooks with `poetry run pre-commit install`. But in case you want to trigger these yourself, you can run them like this:
91+
92+
```
93+
poetry run ruff check --fix # lint rules
94+
poetry run ruff format # formatting
95+
```
96+
97+
If you want to adjust the behavior of ruff, configurations are in `pyproject.toml`.
98+
99+
100+
### Consuming API version upgrades
101+
102+
These instructions can only be followed by Pinecone employees with access to our private APIs repository.
103+
104+
Prerequisites:
105+
- You must be an employee with access to private Pinecone repositories
106+
- 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.
107+
- You must have initialized the git submodules under codegen
108+
109+
```sh
110+
git submodule
111+
```
112+
113+
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.
114+
115+
```sh
116+
./codegen/
117+
```
118+
79119

80120
## Loading your virtualenv in another shell
81121

@@ -146,26 +186,3 @@ Hello, from your virtualenv!
146186
```
147187

148188
If you experience any issues please [file a new issue](https://github.com/pinecone-io/pinecone-python-client/issues/new).
149-
150-
151-
## Consuming API version upgrades
152-
153-
These instructions can only be followed by Pinecone employees with access to our private APIs repository.
154-
155-
Prerequisites:
156-
- You must be an employee with access to private Pinecone repositories
157-
- 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.
158-
- You must have initialized the git submodules under codegen
159-
160-
```sh
161-
git submodule
162-
```
163-
164-
165-
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.
166-
167-
168-
169-
```sh
170-
./codegen/
171-
```

0 commit comments

Comments
 (0)