diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e494970..4f1f7629 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -278,10 +278,10 @@ jobs: poetry run python send_to_googledrive.py || echo "Failed to upload to Google Drive" echo "Adding skill_tree submodule to update website" poetry run agbenchmark start --mock - cd agbenchmark/challenges/frontend + cd frontend git add . git commit -m "Update website with new skill tree" - cd ../../.. + cd .. exit 0 else echo "Attempt $(($attempts + 1)) failed. Retrying..." diff --git a/.gitmodules b/.gitmodules index 268a2385..fa9049f6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -33,3 +33,6 @@ [submodule "agbenchmark/challenges"] path = agbenchmark/challenges url = https://github.com/agbenchmark/agent-evals.git +[submodule "frontend"] + path = frontend + url = https://github.com/agbenchmark/agbenchmark-frontend.git diff --git a/agbenchmark/challenges b/agbenchmark/challenges index 9c9a35e0..2ebe45f9 160000 --- a/agbenchmark/challenges +++ b/agbenchmark/challenges @@ -1 +1 @@ -Subproject commit 9c9a35e0de60ca09d826ef7c7abd6c32edca4b99 +Subproject commit 2ebe45f9c79ecfee231401f0c153e76df3426333 diff --git a/agbenchmark/utils/dependencies/graphs.py b/agbenchmark/utils/dependencies/graphs.py index af866296..48462e43 100644 --- a/agbenchmark/utils/dependencies/graphs.py +++ b/agbenchmark/utils/dependencies/graphs.py @@ -277,9 +277,7 @@ def graph_interactive_network( json_graph = json.dumps(graph_data) # Optionally, save to a file - with open( - Path("agbenchmark/challenges/frontend/public/graph.json").resolve(), "w" - ) as f: + with open(Path("frontend/public/graph.json").resolve(), "w") as f: f.write(json_graph) if html_graph_path: diff --git a/backend/main.py b/backend/main.py new file mode 100644 index 00000000..f808822b --- /dev/null +++ b/backend/main.py @@ -0,0 +1,17 @@ +from fastapi import FastAPI +from fastapi.middleware.cors import CORSMiddleware + +app = FastAPI() + +app.add_middleware( + CORSMiddleware, + allow_origins=["*"], + allow_credentials=True, + allow_methods=["*"], + allow_headers=["*"], +) + + +@app.get("/data") +async def read_data() -> dict[str, str]: + return {"data": "Hello, World!"} diff --git a/backend/requirements.txt b/backend/requirements.txt new file mode 100644 index 00000000..170703df --- /dev/null +++ b/backend/requirements.txt @@ -0,0 +1 @@ +fastapi \ No newline at end of file diff --git a/frontend b/frontend new file mode 160000 index 00000000..7e468e48 --- /dev/null +++ b/frontend @@ -0,0 +1 @@ +Subproject commit 7e468e488aaf058c047b5accf304e5f24ba534b4 diff --git a/run.sh b/run.sh new file mode 100644 index 00000000..7e1e3f79 --- /dev/null +++ b/run.sh @@ -0,0 +1,11 @@ +# poetry install + +# cd backend +# pip install -r requirement.txt +# uvicorn your_module:app --reload + +# cd frontend +# npm install +# npm run dev + +# localhost:3000 \ No newline at end of file