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

[CLN] Break up test_api.py [Part-2] #2789

Open
wants to merge 5 commits into
base: spike/break_up_test_api
Choose a base branch
from

Conversation

spikechroma
Copy link

Description of changes

Summarize the changes made by this PR.

  • Improvements & Bug fixes
    • ...
  • New functionality
    • ...

Test plan

How are these changes tested?

  • Tests pass locally with pytest for python, yarn test for js, cargo test for rust

Documentation Changes

Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs repository?

Copy link

Please tag your PR title with one of: [ENH | BUG | DOC | TST | BLD | PERF | TYP | CLN | CHORE]. See https://docs.trychroma.com/contributing#contributing-code-and-ideas

Copy link
Author

spikechroma commented Sep 12, 2024

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

@spikechroma spikechroma changed the title remove tests covered by the property testing [CLN] Break up test_api.py [Part-2] Sep 12, 2024
@spikechroma spikechroma marked this pull request as ready for review September 12, 2024 22:00
@spikechroma spikechroma force-pushed the spike/break_up_test_api branch from 16b7304 to 0fff759 Compare September 12, 2024 22:05
@spikechroma spikechroma force-pushed the spike/break_up_test_api_part_2 branch from ce11355 to 639621d Compare September 12, 2024 22:05
@spikechroma spikechroma force-pushed the spike/break_up_test_api_part_2 branch from 639621d to 9dbc092 Compare September 12, 2024 22:08
assert len(collections) == 2


def test_peek(client: ClientAPI) -> None:
Copy link
Author

Choose a reason for hiding this comment

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

this got moved to property testing folder

assert collection.name == "testspace2"


def test_collection_delete_with_invalid_collection_throws(client: ClientAPI) -> None:
Copy link
Author

Choose a reason for hiding this comment

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

this got moved to the test_api_delete file

@@ -14,19 +15,15 @@ def test_delete_invalid_id(client: ClientAPI) -> None:
assert "ID" in str(e.value)


def test_delete_where_document(client: ClientAPI) -> None:
Copy link
Author

Choose a reason for hiding this comment

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

this got moved to test_embeddings

operator_records,
)


def test_get_from_db(client: ClientAPI) -> None:
Copy link
Author

Choose a reason for hiding this comment

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

this got moved to property testing folder

assert (items["metadatas"])[0]["string_value"] == "one" # type: ignore[index]


def test_metadata_add_get_int_float(client: ClientAPI) -> None:
Copy link
Author

@spikechroma spikechroma Sep 12, 2024

Choose a reason for hiding this comment

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

this got moved to test_filtering

assert isinstance((items["metadatas"])[0]["float_value"], float) # type: ignore[index]


def test_metadata_add_query_int_float(client: ClientAPI) -> None:
Copy link
Author

@spikechroma spikechroma Sep 12, 2024

Choose a reason for hiding this comment

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

this got moved to test_filtering

persist_dir = tempfile.mkdtemp()


def test_ssl_self_signed(client_ssl: ClientAPI) -> None:
Copy link
Author

Choose a reason for hiding this comment

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

this test is already covered in test_ssl_self_signed_without_ssl_verify

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.

1 participant