-
Notifications
You must be signed in to change notification settings - Fork 22
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
Make fastapi a regular dependency #243
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,9 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Debug examples/fastapi", | ||
"type": "python", | ||
"request": "launch", | ||
"module": "uvicorn", | ||
"args": [ | ||
"main:app", | ||
"--app-dir", | ||
"${workspaceFolder}/examples/fastapi/arcade_example_fastapi", | ||
"--port", | ||
"8002" | ||
], | ||
"jinja": true, | ||
"justMyCode": true, | ||
"cwd": "${workspaceFolder}/examples/fastapi/arcade_example_fastapi" | ||
}, | ||
{ | ||
"name": "Debug `arcade workerup --no-auth`", | ||
"type": "python", | ||
"type": "debugpy", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
See https://devblogs.microsoft.com/python/python-in-visual-studio-code-february-2024-release/ |
||
"request": "launch", | ||
"program": "${workspaceFolder}/arcade/run_cli.py", | ||
"args": ["workerup", "--no-auth"], | ||
|
@@ -29,8 +13,8 @@ | |
"cwd": "${workspaceFolder}" | ||
}, | ||
{ | ||
"name": "Debug `arcade chat -s -d -h localhost`", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cleanup: not actually streaming |
||
"type": "python", | ||
"name": "Debug `arcade chat -d -h localhost`", | ||
"type": "debugpy", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/arcade/run_cli.py", | ||
"args": ["chat", "-d", "-h", "localhost"], | ||
|
@@ -41,7 +25,7 @@ | |
}, | ||
{ | ||
"name": "Debug `arcade dev`", | ||
"type": "python", | ||
"type": "debugpy", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/arcade/run_cli.py", | ||
"args": ["dev"], | ||
|
@@ -52,7 +36,7 @@ | |
}, | ||
{ | ||
"name": "Debug `arcade evals -d` on current file", | ||
"type": "python", | ||
"type": "debugpy", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/arcade/run_cli.py", | ||
"args": ["evals", "-d", "${fileDirname}", "-h", "localhost"], | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -214,7 +214,7 @@ def evaluate(self, expected: str, actual: str) -> dict[str, float | bool]: | |
from sklearn.metrics.pairwise import cosine_similarity | ||
except ImportError: | ||
raise ImportError( | ||
"Use `pip install arcade[evals]` to install the required dependencies for similarity metrics." | ||
"Use `pip install 'arcade-ai[evals]'` to install the required dependencies for similarity metrics." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks 🙏 |
||
) | ||
vectorizer = TfidfVectorizer() | ||
tfidf_matrix = vectorizer.fit_transform([expected, actual]) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +0,0 @@ | ||
import importlib.util | ||
|
||
# FastAPI is an optional dependency, so make sure it's installed | ||
if importlib.util.find_spec("fastapi") is None: | ||
raise ImportError( | ||
"FastAPI is not installed. Please install it using `pip install arcade-ai[fastapi]`." | ||
) | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "arcade-ai" | ||
version = "1.0.1" | ||
version = "1.1.0" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since most people installed as |
||
description = "Arcade Python SDK and CLI" | ||
readme = "README.md" | ||
packages = [ | ||
|
@@ -27,11 +27,11 @@ loguru = "^0.7.0" | |
tqdm = "^4.1.0" | ||
types-python-dateutil = "2.9.0.20241003" | ||
types-pytz = "2024.2.0.20241003" | ||
opentelemetry-instrumentation-fastapi = {version = "0.48b0", optional = true} | ||
opentelemetry-exporter-otlp-proto-http = {version = "1.27.0", optional = true} | ||
opentelemetry-exporter-otlp-proto-common = {version = "1.27.0", optional = true} | ||
fastapi = {version = "^0.115.3", optional = true} | ||
uvicorn = {version = "^0.30.0", optional = true} | ||
opentelemetry-instrumentation-fastapi = "0.48b0" | ||
opentelemetry-exporter-otlp-proto-http = "1.27.0" | ||
opentelemetry-exporter-otlp-proto-common = "1.27.0" | ||
fastapi = "^0.115.3" | ||
uvicorn = "^0.30.0" | ||
scipy = {version = "^1.14.0", optional = true} | ||
numpy = {version = "^2.0.0", optional = true} | ||
scikit-learn = {version = "^1.5.0", optional = true} | ||
|
@@ -40,7 +40,6 @@ python-dateutil = {version = "^2.8.2", optional = true} | |
|
||
pyreadline3 = {version = "^3.5.4", platform = "win32"} | ||
[tool.poetry.extras] | ||
fastapi = ["fastapi", "uvicorn", "opentelemetry-instrumentation-fastapi", "opentelemetry-exporter-otlp-proto-http", "opentelemetry-exporter-otlp-proto-common"] | ||
evals = ["scipy", "numpy", "scikit-learn", "pytz", "python-dateutil"] | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cleanup. The fastapi example was removed a while ago.