-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description of changes All component instances now inherit from a base `Component` class defining `start` and `stop` methods, and to track their dependencies throughout the system. The `System` class has been updated to start and stop all components in dependency order. All these material changes are in `chromadb/config.py` This was necessary to properly implement testing in the new architecture. The new version of the system has more stateful components with (e.g.) active subscriptions. It is necessary to provide an explicit mechanism to shut down the whole stack or else consumers could continue operating unexpectedly in the background and not be garbage collected. Most of the changes in this PR are to fix existing type signature errors. All components of the system are now subclasses of `EnforceOverrides` which ensures that all signatures match at runtime, and which operates independently from the type checker (so the `#type: ignore` is not sufficient to fix it.) This PR also disables the `type-abstract` MyPy error code. In my opinion this is an incorrect type rule although there is [https://github.com/python/mypy/issues/4717](active discussion) on the topic. ## Test plan Unit + integration tests updated and passing. ## Documentation Changes No changes to user-facing APIs. --------- Co-authored-by: hammadb <hammad@trychroma.com>
- Loading branch information
Showing
22 changed files
with
572 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.