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

More test fixes #1752

Merged
merged 3 commits into from
Jan 3, 2025
Merged

More test fixes #1752

merged 3 commits into from
Jan 3, 2025

Conversation

NolanTrem
Copy link
Collaborator

@NolanTrem NolanTrem commented Jan 3, 2025

Important

Enhances test_collection fixture for cleanup, modifies assertions in test_filters.py, and renames test files for clarity.

  • Behavior:
    • Enhances test_collection fixture in conftest.py to clean up documents and collection post-tests, handling R2RException during cleanup.
    • Modifies assertions in test_filters.py to use issubset for expected document IDs.
  • Docstring:
    • Updates docstring for test_collection to reflect cleanup behavior.
  • Renames:
    • Renames test_chunks.py, test_collections.py, and test_config.py to unit_test_chunks.py, unit_test_collections.py, and unit_test_config.py respectively.
  • Misc:
    • Removes redundant click.echo statements in docker_utils.py.

This description was created by Ellipsis for defb2fd. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to c7ca586 in 12 seconds

More details
  • Looked at 36 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. py/tests/integration/conftest.py:160
  • Draft comment:
    Consider simplifying the cleanup process by removing the nested try-except blocks. You can handle exceptions for document deletion and collection deletion separately without nesting them.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The cleanup process in the test_collection fixture is not handling exceptions in the most efficient way. The nested try-except blocks can be simplified to improve readability and maintainability.

Workflow ID: wflow_UVQdJmwVXN3UDxxI


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on 6c4a7fa in 36 seconds

More details
  • Looked at 53 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. py/tests/integration/test_filters.py:89
  • Draft comment:
    The use of issubset here is incorrect. It should be == to ensure the found IDs match the expected IDs exactly, not just as a subset.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The test is checking for documents NOT in collection 0. The expected results are doc3 and doc4. However, since this is a search API, it's possible that the search could return additional relevant results beyond just the collection filter. The change to issubset() seems intentional to make the test more flexible while still ensuring the key documents we expect are included.
    I could be wrong about the search API behavior - maybe it's guaranteed to only return exact collection matches. The original test author may have had a reason for using exact equality.
    The change appears to be an intentional relaxation of the test constraints, and the issubset() check still verifies the core functionality - that documents not in collection 0 are included in results.
    The comment should be deleted. The change to issubset() appears intentional and valid for testing search results where additional matches beyond the expected set are acceptable.
2. py/tests/integration/test_filters.py:126
  • Draft comment:
    The use of issubset here is incorrect. It should be == to ensure the found IDs match the expected IDs exactly, not just as a subset.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_Fr3R7s4xNlzy4wBh


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on defb2fd in 10 seconds

More details
  • Looked at 20 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. py/cli/utils/docker_utils.py:111
  • Draft comment:
    Consider adding a log or echo statement to inform users about the default port change.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The removal of the echo statement might affect user feedback.
2. py/cli/utils/docker_utils.py:158
  • Draft comment:
    Consider adding a log or echo statement to inform users about the default port change.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The removal of the echo statement might affect user feedback.

Workflow ID: wflow_pIwgbQd4VMSNHvvh


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@NolanTrem NolanTrem merged commit 670b21c into main Jan 3, 2025
14 checks passed
@NolanTrem NolanTrem deleted the Nolan/MoreTestCleanup branch January 3, 2025 23:27
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