diff --git a/backend/agent.py b/backend/src/agent.py similarity index 100% rename from backend/agent.py rename to backend/src/agent.py diff --git a/backend/agents/conversation.py b/backend/src/agents/conversation.py similarity index 100% rename from backend/agents/conversation.py rename to backend/src/agents/conversation.py diff --git a/backend/app.py b/backend/src/app.py similarity index 100% rename from backend/app.py rename to backend/src/app.py diff --git a/backend/app_mixins/__init__.py b/backend/src/app_mixins/__init__.py similarity index 100% rename from backend/app_mixins/__init__.py rename to backend/src/app_mixins/__init__.py diff --git a/backend/app_mixins/chat.py b/backend/src/app_mixins/chat.py similarity index 100% rename from backend/app_mixins/chat.py rename to backend/src/app_mixins/chat.py diff --git a/backend/chat.py b/backend/src/chat.py similarity index 100% rename from backend/chat.py rename to backend/src/chat.py diff --git a/backend/database.py b/backend/src/database.py similarity index 100% rename from backend/database.py rename to backend/src/database.py diff --git a/backend/gral.py b/backend/src/gral.py similarity index 100% rename from backend/gral.py rename to backend/src/gral.py diff --git a/backend/inference.py b/backend/src/inference.py similarity index 100% rename from backend/inference.py rename to backend/src/inference.py diff --git a/backend/server.py b/backend/src/server.py similarity index 98% rename from backend/server.py rename to backend/src/server.py index 257a021..0cd57e4 100644 --- a/backend/server.py +++ b/backend/src/server.py @@ -8,7 +8,8 @@ import asyncio import nest_asyncio # Vue frontend -frontend_path = '../frontend/dist' +# relative to the module file???? wtf +frontend_path = '../../frontend/dist' def start_server(app): server = Quart(__name__, static_folder=frontend_path) diff --git a/backend/stream.py b/backend/src/stream.py similarity index 100% rename from backend/stream.py rename to backend/src/stream.py diff --git a/backend/tools.py b/backend/src/tools.py similarity index 100% rename from backend/tools.py rename to backend/src/tools.py diff --git a/run.sh b/run.sh index 83983bb..8f7ae37 100644 --- a/run.sh +++ b/run.sh @@ -14,8 +14,7 @@ case "$1" in "") data_dir=$(realpath ./local-data) mkdir -p $data_dir - cd backend - python app.py $data_dir + python backend/src/app.py $data_dir ;; "cli") node cli/main.js "$2" @@ -26,14 +25,13 @@ case "$1" in rm -f test-data/horde.db # Start backend in the background - cd backend - python app.py ../test-data & + python backend/src/app.py ../test-data & BACKEND_PID=$! echo "Started backend: $BACKEND_PID" sleep 2 # Run tests - cd ../testing + cd testing bash signup.sh #node login.js node suite.js @@ -41,20 +39,6 @@ case "$1" in # Finalize the backend server kill $BACKEND_PID ;; - "debug") - # Debug doesn't work very well... I don't use it. - cd backend - python app.py & - - cd ../frontend - # This can be skipped if chrome IS installed - export CHROME_EXECUTABLE=chromium - export BACKEND_URL="ws://localhost:5000" - flutter run -d chrome - - # Close backend when debugger closes - kill $! - ;; "watch") # requires 'inotify-tools' package cd frontend @@ -65,8 +49,7 @@ case "$1" in *) if [ -d "$1" ]; then data_dir=$(realpath $1) - cd backend - python app.py $data_dir + python backend/src/app.py $data_dir else echo "Error: unknown command or directory '$1'" fi