Skip to content
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

Collection state machine tests #324

Merged
merged 12 commits into from
Apr 13, 2023

Conversation

levand
Copy link
Contributor

@levand levand commented Apr 10, 2023

Description of changes

New tests for collection manipulation using Hypothesis with a state machine.

Test plan

This change is the tests.

Documentation Changes

No user-facing documentation.

@levand levand requested a review from HammadB April 10, 2023 15:37
chroma_db_impl="duckdb+parquet",
persist_directory=tempfile.gettempdir() + "/tests",
),
# Settings(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Temporarily disabled to make tests faster, will re-enable before merging.


# TODO: build a strategy that constructs english sentences instead of gibberish strings
# Unsure what would happen feeding random unicode to an embedding model, could get bad results

document = st.from_type(Optional[str])

_coll_name_re = re.compile(r"^[a-zA-Z][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]$")
_coll_name_re = re.compile(r"^[a-zA-Z][a-zA-Z0-9-]{1,60}[a-zA-Z0-9]$")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will also fail until we merge #302

st.none(),
st.dictionaries(
st.text(),
st.one_of(st.text(), st.integers(), st.floats(allow_infinity=False, allow_nan=False)),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should capture the fact that infinity / nan cannot be in metadata

@levand levand marked this pull request as ready for review April 11, 2023 14:25
levand added 3 commits April 11, 2023 14:46
This reverts commit f48a07a. Going to
    use a different approach.
Saves a lot of time during testing by not re-constructing them all the time.
@levand levand merged commit 214c06c into team/hypothesis-tests Apr 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants