-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ENH] reset back to previous JS api, keeping other improvements #2714
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
@@ -46,7 +47,7 @@ export class ChromaClient { | |||
/** | |||
* @ignore | |||
*/ | |||
private api: DefaultApi & ConfigOptions; | |||
public api: DefaultApi & ConfigOptions; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this has to be public for the Collection object to use it.
we could pass the api object to Collection
- but i like the idea that if you change some client settings, that all Collection objects created through that client will start using these settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I worry a little that this could confuse users who see this pop up in their autocomplete, but I don't think there's a great solution besides making a third wrapper class over api
. Not a blocking issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea - there is a way to pseudo-hide it using some typescript f****ery - but I think that is worse and less maintainable. what about renaming it to something like _InternalApi
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah underscoring seems like a good option for now
@@ -102,7 +103,7 @@ export class ChromaClient { | |||
} | |||
|
|||
/** @ignore */ | |||
private init(): Promise<void> { | |||
init(): Promise<void> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this also can no longer be private.
@codetheweb my todos (not blocking your review)
|
@@ -46,7 +47,7 @@ export class ChromaClient { | |||
/** | |||
* @ignore | |||
*/ | |||
private api: DefaultApi & ConfigOptions; | |||
public api: DefaultApi & ConfigOptions; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I worry a little that this could confuse users who see this pop up in their autocomplete, but I don't think there's a great solution besides making a third wrapper class over api
. Not a blocking issue.
322dd34
to
a273f1f
Compare
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @jeffchuber and the rest of your teammates on Graphite |
## Description of changes Upon further discussion - we decided we preferred the object-oriented JS API given our design constraints. This PR reverts the api to the previous design while keeping the other improvements introduced in #2542 ## Test plan Existing JS client test coverage ## Documentation Changes *Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the [docs repository](https://github.com/chroma-core/docs)?* Yes
Upon further discussion - we decided we preferred the object-oriented JS API given our design constraints. This PR reverts the api to the previous design while keeping the other improvements introduced in #2542 Existing JS client test coverage *Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the [docs repository](https://github.com/chroma-core/docs)?* Yes
Description of changes
Upon further discussion - we decided we preferred the object-oriented JS API given our design constraints.
This PR reverts the api to the previous design while keeping the other improvements introduced in #2542
Test plan
Existing JS client test coverage
Documentation Changes
Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs repository?
Yes