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

Add tests for docs routes #452

Merged

Conversation

creatorrr
Copy link
Contributor

@creatorrr creatorrr commented Aug 10, 2024

Add tests for docs routes in agents-api/tests/test_docs_routes.py.

  • Create Docs Tests
    • Add test for creating user doc.
    • Add test for creating agent doc.
  • Delete Doc Test
    • Add test for deleting a doc.
  • Get Doc Test
    • Add test for getting a doc.
  • List Docs Tests
    • Add test for listing user docs.
    • Add test for listing agent docs.
  • Search Docs Tests
    • Add test for searching user docs.
    • Add test for searching agent docs.

For more details, open the Copilot Workspace session.


🚀 This description was created by Ellipsis for commit e0c3140

Summary:

Add tests for document routes in agents-api, and update SDKs and API documentation for user and agent document management.

Key points:

  • Add tests in agents-api/tests/test_docs_routes.py for document routes.
  • Test POST /users/{user.id}/docs for creating user documents.
  • Test POST /agents/{agent.id}/docs for creating agent documents.
  • Test DELETE /agents/{agent.id}/docs/{doc_id} for deleting agent documents.
  • Test DELETE /users/{user.id}/docs/{doc_id} for deleting user documents.
  • Test GET /docs/{doc_id} for retrieving documents.
  • Test GET /users/{user.id}/docs for listing user documents.
  • Test GET /agents/{agent.id}/docs for listing agent documents.
  • Test POST /users/{user.id}/search for searching user documents.
  • Test POST /agents/{agent.id}/search for searching agent documents.
  • Update sdks/python/julep/api/client.py and sdks/ts/src/api/services/DefaultService.ts for new delete routes.
  • Update typespec/docs/endpoints.tsp for new API endpoints.

Generated with ❤️ by ellipsis.dev

Add tests for docs routes in `agents-api/tests/test_docs_routes.py`.

* **Create Docs Tests**
  - Add test for creating user doc.
  - Add test for creating agent doc.
* **Delete Doc Test**
  - Add test for deleting a doc.
* **Get Doc Test**
  - Add test for getting a doc.
* **List Docs Tests**
  - Add test for listing user docs.
  - Add test for listing agent docs.
* **Search Docs Tests**
  - Add test for searching user docs.
  - Add test for searching agent docs.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/julep-ai/julep?shareId=XXXX-XXXX-XXXX-XXXX).
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 128f074 in 19 seconds

More details
  • Looked at 186 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. agents-api/tests/test_docs_routes.py:11
  • Draft comment:
    Ensure that the data structures used in tests match the actual API specifications to avoid issues with API changes. Consider using a schema validation library to dynamically validate request and response structures against the OpenAPI definitions.
  • Reason this comment was not posted:
    Confidence of 0% on close inspection, compared to threshold of 50%.

Workflow ID: wflow_TDPhL6w6N7hBaXGy


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

Signed-off-by: Diwank Tomer <[email protected]>
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 e0c3140 in 1 minute and 20 seconds

More details
  • Looked at 1210 lines of code in 18 files
  • Skipped 1 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. agents-api/tests/test_docs_routes.py:55
  • Draft comment:
    The test for deleting a document is using the wrong endpoint URL. It should use /users/{user.id}/docs/{doc_id} instead of /docs/{doc_id} to align with the updated API routes.
url=f"/users/{user.id}/docs/{doc_id}",
  • Reason this comment was not posted:
    Confidence of 0% on close inspection, compared to threshold of 50%.

Workflow ID: wflow_t96p5TjKZ2yQmuVy


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

@whiterabbit1983 whiterabbit1983 merged commit f0111d8 into dev-tasks-disable-routes Aug 10, 2024
2 of 6 checks passed
@whiterabbit1983 whiterabbit1983 deleted the creatorrr/add-docs-routes-tests branch August 10, 2024 17:53
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