Skip to content

Commit

Permalink
Merge pull request #41 from pinecone-io/poetry_pre_commit
Browse files Browse the repository at this point in the history
Add pre-commit, configure to run poetry pre-commit hooks
  • Loading branch information
daverigby authored Feb 29, 2024
2 parents 0344d1b + 8aaf636 commit 5e124b6
Show file tree
Hide file tree
Showing 4 changed files with 201 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/python-poetry/poetry
# Hooks from https://python-poetry.org/docs/pre-commit-hooks/
rev: '1.8.1'
hooks:
- id: poetry-check
- id: poetry-lock
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,14 @@ When a dataset is specified the index will be populated with it if the existing
1. While this can run locally on a machine in your home network, you **will** experience additional latencies depending on your location. It is recommended to use this on a VM in the cloud, preferably on the same cloud provider (GCP,AWS) and in the same region to minimize the latency. This will give a more accurate picture of how your infrastructure performs with Pinecone when you go to production.
2. The test cases included in the locust.py file are designed to generate random queries along with random categories. It also exercises several endpoints such as query, fetch, delete, and demonstrates metadata filtering. You should consider your use case and adjust these tests accordingly to reflect the real world scenarios you expect to encounter.
3. There is a lot of functionality built into Locust and we encourage you to [review the documentation](https://docs.locust.io/en/stable/index.html) and make use of all of the functionality it offers.


## Developing locust-pinecone

PRs are welcome!

The project defines a set of [pre-commit hooks](https://pre-commit.com), which should be enabled to check commits pass all checks. After installing project dependencies (via `poetry install`), run:

```shell
pre-commit install
```
181 changes: 180 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ tabulate = "^0.9.0"
[tool.poetry.group.dev.dependencies]
pytest = "^8.0.2"
flake8 = "^7.0.0"
pre-commit = "^3.6.2"

[build-system]
requires = ["poetry-core"]
Expand Down

0 comments on commit 5e124b6

Please sign in to comment.