Skip to content

Commit

Permalink
move development details into CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
austin-denoble committed Jul 29, 2024
1 parent 153ca94 commit 87dafb3
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 41 deletions.
37 changes: 37 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## Contributing and development

### Prereqs

1. A [current version of Go](https://go.dev/doc/install) (recommended 1.21+)
2. The [just](https://github.com/casey/just?tab=readme-ov-file#installation) command runner
3. The [protobuf-compiler](https://grpc.io/docs/protoc-installation/)

Then, execute `just bootstrap` to install the necessary Go packages

### .env Setup

An easy way to keep track of necessary environment variables is to create a `.env` file in the root of the project.
This project comes with a sample `.env` file (`.env.sample`) that you can copy and modify. At the very least, you
will need to include the `PINECONE_API_KEY` variable in your `.env` file for the tests to run locally.

````shell
### API Definitions submodule

The API Definitions are in a private submodule. To checkout or update the submodules execute in the root of the project:

```shell
git submodule update --init --recursive
````
For working with submodules, see the [Git Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules)
documentation.
### Just commands
`just test` : Executes all tests for the pinecone package
`just gen` : Generates Go client code from the API definitions
`just docs` : Generates Go docs and starts http server on localhost
`just bootstrap` : Installs necessary go packages for gen and docs
42 changes: 1 addition & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ func main() {
fmt.Printf("%+v", *idx)
}
}
```
```

#### Delete an index

Expand Down Expand Up @@ -614,43 +614,3 @@ func main() {
## Support

To get help using go-pinecone, reach out to [email protected].

## Contributing and development

### Prereqs

1. A [current version of Go](https://go.dev/doc/install) (recommended 1.21+)
2. The [just](https://github.com/casey/just?tab=readme-ov-file#installation) command runner
3. The [protobuf-compiler](https://grpc.io/docs/protoc-installation/)

Then, execute `just bootstrap` to install the necessary Go packages

### .env Setup

An easy way to keep track of necessary environment variables is to create a `.env` file in the root of the project.
This project comes with a sample `.env` file (`.env.sample`) that you can copy and modify. At the very least, you
will need to include the `PINECONE_API_KEY` variable in your `.env` file for the tests to run locally.

```shell
### API Definitions submodule

The API Definitions are in a private submodule. To checkout or update the submodules execute in the root of the project:

```shell
git submodule update --init --recursive
```

For working with submodules, see the [Git Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules)
documentation.

### Just commands

`just test` : Executes all tests for the pinecone package

`just test-unit`: Executes only unit tests for the pinecone package

`just gen` : Generates Go client code from the API definitions

`just docs` : Generates Go docs and starts http server on localhost

`just bootstrap` : Installs necessary go packages for gen and docs

0 comments on commit 87dafb3

Please sign in to comment.