Skip to content
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,18 @@ jobs:
uses: ./.github/workflows/_go-tests.yml
secrets: inherit

typo-check:
name: Check for typos
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout chroma-core/chroma
uses: actions/checkout@v4

- name: Run typo check
uses: crate-ci/[email protected]
with:
config: typos.toml

lint:
name: Lint
runs-on: blacksmith-4vcpu-ubuntu-2404
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-dev-javascript-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
echo "Push to main branch, releasing dev version to GH packages"
echo "NPM_SCRIPT=release_dev" >> "$GITHUB_ENV"
else
echo "The ref does not point to main, exiting workflow" # we alredy make the check above but this is a good practice
echo "The ref does not point to main, exiting workflow" # we already make the check above but this is a good practice
exit 1
fi
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion bin/test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Sanity check script to ensure that the Chroma client can connect
# and is capable of recieving data.
# and is capable of receiving data.
import chromadb

# run in in-memory mode
Expand Down
12 changes: 6 additions & 6 deletions chromadb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def EphemeralClient(
settings = Settings()
settings.is_persistent = False

# Make sure paramaters are the correct types -- users can pass anything.
# Make sure parameters are the correct types -- users can pass anything.
tenant = str(tenant)
database = str(database)

Expand All @@ -175,7 +175,7 @@ def PersistentClient(
settings.persist_directory = str(path)
settings.is_persistent = True

# Make sure paramaters are the correct types -- users can pass anything.
# Make sure parameters are the correct types -- users can pass anything.
tenant = str(tenant)
database = str(database)

Expand All @@ -189,7 +189,7 @@ def RustClient(
database: str = DEFAULT_DATABASE,
) -> ClientAPI:
"""
Creates an ephemeral or persistance instance of Chroma that saves to disk.
Creates an ephemeral or persistent instance of Chroma that saves to disk.
This is useful for testing and development, but not recommended for production use.

Args:
Expand All @@ -204,7 +204,7 @@ def RustClient(
settings.is_persistent = path is not None
settings.persist_directory = path or ""

# Make sure paramaters are the correct types -- users can pass anything.
# Make sure parameters are the correct types -- users can pass anything.
tenant = str(tenant)
database = str(database)

Expand Down Expand Up @@ -353,7 +353,7 @@ def CloudClient(
if settings is None:
settings = Settings()

# Make sure paramaters are the correct types -- users can pass anything.
# Make sure parameters are the correct types -- users can pass anything.
tenant = tenant or os.environ.get("CHROMA_TENANT")
if tenant is not None:
tenant = str(tenant)
Expand Down Expand Up @@ -392,7 +392,7 @@ def Client(
database: The database to use for this client. Defaults to the default database.
"""

# Make sure paramaters are the correct types -- users can pass anything.
# Make sure parameters are the correct types -- users can pass anything.
tenant = str(tenant)
database = str(database)

Expand Down
2 changes: 1 addition & 1 deletion chromadb/api/models/AsyncCollection.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ async def delete(

Args:
ids: The ids of the embeddings to delete
where: A Where type dict used to filter the delection by. E.g. `{"$and": [{"color" : "red"}, {"price": {"$gte": 4.20}}]}`. Optional.
where: A Where type dict used to filter the deletion by. E.g. `{"$and": [{"color" : "red"}, {"price": {"$gte": 4.20}}]}`. Optional.
where_document: A WhereDocument type dict used to filter the deletion by the document content. E.g. `{"$contains": "hello"}`. Optional.

Returns:
Expand Down
2 changes: 1 addition & 1 deletion chromadb/api/models/Collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ def delete(

Args:
ids: The ids of the embeddings to delete
where: A Where type dict used to filter the delection by. E.g. `{"$and": [{"color" : "red"}, {"price": {"$gte": 4.20}]}}`. Optional.
where: A Where type dict used to filter the deletion by. E.g. `{"$and": [{"color" : "red"}, {"price": {"$gte": 4.20}]}}`. Optional.
where_document: A WhereDocument type dict used to filter the deletion by the document content. E.g. `{"$contains": "hello"}`. Optional.

Returns:
Expand Down
6 changes: 3 additions & 3 deletions chromadb/api/models/CollectionCommon.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def _validate_and_prepare_get_request(
validate_ids(ids=unpacked_ids)

validate_filter_set(filter_set=filters)
validate_include(include=include, dissalowed=["distances"])
validate_include(include=include, disallowed=["distances"])

if "data" in include and self._data_loader is None:
raise ValueError(
Expand All @@ -260,7 +260,7 @@ def _validate_and_prepare_get_request(

# Prepare
request_include = include
# We need to include uris in the result from the API to load datas
# We need to include uris in the result from the API to load data
if "data" in include and "uris" not in include:
request_include.append("uris")

Expand Down Expand Up @@ -322,7 +322,7 @@ def _validate_and_prepare_query_request(
request_where = filters["where"]
request_where_document = filters["where_document"]

# We need to manually include uris in the result from the API to load datas
# We need to manually include uris in the result from the API to load data
request_include = include
if "data" in request_include and "uris" not in request_include:
request_include.append("uris")
Expand Down
2 changes: 1 addition & 1 deletion chromadb/api/rust.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def __init__(self, system: System):
@override
def start(self) -> None:
# Construct the SqliteConfig
# TOOD: We should add a "config converter"
# TODO: We should add a "config converter"
if self._system.settings.require("is_persistent"):
persist_path = self._system.settings.require("persist_directory")
sqlite_persist_path = persist_path + "/chroma.sqlite3"
Expand Down
2 changes: 1 addition & 1 deletion chromadb/api/segment.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ def _search(
database: str = DEFAULT_DATABASE,
) -> SearchResult:
raise NotImplementedError(
"Seach is not implemented for SegmentAPI"
"Search is not implemented for SegmentAPI"
)

@trace_method("SegmentAPI.delete_collection", OpenTelemetryGranularity.OPERATION)
Expand Down
6 changes: 3 additions & 3 deletions chromadb/api/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,7 @@ def validate_where_document(where_document: WhereDocument) -> None:
)


def validate_include(include: Include, dissalowed: Optional[Include] = None) -> None:
def validate_include(include: Include, disallowed: Optional[Include] = None) -> None:
"""Validates include to ensure it is a list of strings. Since get does not allow distances, allow_distances is used
to control if distances is allowed"""

Expand All @@ -1046,9 +1046,9 @@ def validate_include(include: Include, dissalowed: Optional[Include] = None) ->
f"Expected include item to be one of {', '.join(valid_items)}, got {item}"
)

if dissalowed is not None and any(item == e for e in dissalowed):
if disallowed is not None and any(item == e for e in disallowed):
raise ValueError(
f"Include item cannot be one of {', '.join(dissalowed)}, got {item}"
f"Include item cannot be one of {', '.join(disallowed)}, got {item}"
)


Expand Down
2 changes: 1 addition & 1 deletion chromadb/auth/token_authn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

class TokenTransportHeader(str, Enum):
"""
Accceptable token transport headers.
Acceptable token transport headers.
"""

# I don't love having this enum here -- it's weird to have an enum
Expand Down
2 changes: 1 addition & 1 deletion chromadb/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ def reset_state(self) -> None:


def get_class(fqn: str, type: Type[C]) -> Type[C]:
"""Given a fully qualifed class name, import the module and return the class"""
"""Given a fully qualified class name, import the module and return the class"""
module_name, class_name = fqn.rsplit(".", 1)
module = importlib.import_module(module_name)
cls = getattr(module, class_name)
Expand Down
2 changes: 1 addition & 1 deletion chromadb/db/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def param(self, idx: int) -> pypika.Parameter:

class ParameterValue(pypika.Parameter): # type: ignore
"""
Wrapper class for PyPika paramters that allows the values for Parameters
Wrapper class for PyPika parameters that allows the values for Parameters
to be expressed inline while building a query. See get_sql() for
detailed usage information.
"""
Expand Down
2 changes: 1 addition & 1 deletion chromadb/db/migrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class MigratableDB(SqlDB):
importlib_resources.

All migrations in the same directory are assumed to be dependent on previous
migrations in the same directory, where "previous" is defined on lexographical
migrations in the same directory, where "previous" is defined on lexicographical
ordering of filenames.

Migrations have a ascending numeric version number and a hash of the file contents.
Expand Down
2 changes: 1 addition & 1 deletion chromadb/db/mixins/sysdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ def _insert_metadata(
) -> None:
# It would be cleaner to use something like ON CONFLICT UPDATE here But that is
# very difficult to do in a portable way (e.g sqlite and postgres have
# completely different sytnax)
# completely different syntax)
add_attributes_to_current_span(
{
"num_keys": len(metadata),
Expand Down
Loading
Loading