Files
chroma/.vscode
Luke VanderHart 75f5a8172f Improved component model (#629)
## 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>
2023-06-02 10:15:52 -04:00
..
2023-06-02 10:15:52 -04:00