Skip to content

Commit

Permalink
Restructure repository (#35)
Browse files Browse the repository at this point in the history
OpenAPI generates Rust code in the form of a crate. To publish our SDK
without separately publishing the OpenAPI code as its own crate, we want
to include it as a module in our SDK instead of as an external
dependency.

- Remove workspace and make `pinecone_sdk` the root project.
- OpenAPI code generates to temporary folder `.openapi-crate`.
- OpenAPI dependencies are added to `Cargo.toml` for `pinecone_sdk`.
- Bash script copies source files from the generated crate into
`src/openapi` and also updates imports in these files to reflect the new
project structure.
- Protobuf code is also moved into `src/protos` and turned into a
module.
- Disables warnings for generated code (openapi and proto).

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] 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
- [x] Infrastructure change (CI configs, etc)
- [ ] Non-code change (docs, etc)
- [ ] None of the above: (explain here)

All existing test cases pass.
  • Loading branch information
emily-emily committed Jul 29, 2024
1 parent 838b4aa commit f5bf76a
Show file tree
Hide file tree
Showing 91 changed files with 316 additions and 1,100 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ outer-protos/thirdparty/**
**/.env
**/.swp

.openapi-crate/


# IDE, editor, and OS-specific files
.idea/
Expand Down
Loading

0 comments on commit f5bf76a

Please sign in to comment.