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

feat: Add launching entry point #334

Merged
merged 3 commits into from
May 27, 2024
Merged

feat: Add launching entry point #334

merged 3 commits into from
May 27, 2024

Conversation

whiterabbit1983
Copy link
Contributor

@whiterabbit1983 whiterabbit1983 commented May 18, 2024

🚀 This description was created by Ellipsis for commit f7bb7d9

Summary:

This PR adds a new CLI entry point for the application, updates the Uvicorn invocation, and registers a new script in pyproject.toml.

Key points:

  • Updated agents-api/agents_api/web.py to pass app instance directly to uvicorn.run.
  • Added new script agents-api/scripts/agents_api.py using fire for CLI support.
  • Updated agents-api/pyproject.toml to include agents-api script for launching the app with poetry run agents-api.

Generated with ❤️ by ellipsis.dev

Copy link
Contributor

sweep-ai bot commented May 18, 2024

Sweep: PR Review

Sweep is currently reviewing your pr...

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 f7bb7d9 in 44 seconds

More details
  • Looked at 45 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. agents-api/agents_api/web.py:123
  • Draft comment:
    The change from "web:app" to app in the uvicorn.run call is appropriate as it simplifies the invocation by using the app object directly, which is already available in the scope. This is a good practice and avoids unnecessary import resolution.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The change in agents-api/agents_api/web.py from "web:app" to app in the uvicorn.run call is significant. The original string "web:app" is a shorthand that tells Uvicorn to import the app object from the web module. By changing this to the app object directly, the PR author is assuming that the app object is already available in the scope where uvicorn.run is called. This is indeed the case as per the provided code snippet from web.py, where app is defined and configured in the global scope of the module. This change simplifies the invocation and removes an unnecessary import resolution step, which is a good practice especially when the app object is already available.

Workflow ID: wflow_zca9DaVbrSonDkGI


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

@alt-glitch alt-glitch merged commit d7bef51 into dev May 27, 2024
7 of 8 checks passed
@alt-glitch alt-glitch deleted the f/cli-launcher branch May 27, 2024 15:54
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