From 4e4082c6e00d8fb73da411ac766d389f828aabd8 Mon Sep 17 00:00:00 2001 From: Felix Zumstein Date: Fri, 16 Aug 2024 16:08:05 +0200 Subject: [PATCH] docs --- DEVELOPER_GUIDE.md | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md index 0da597e1..ccdde567 100644 --- a/DEVELOPER_GUIDE.md +++ b/DEVELOPER_GUIDE.md @@ -2,9 +2,9 @@ To get a prod-like setup while running the app locally, run the following in separate terminals: -* `docker compose -f tests/docker-compose.redis.yaml up` -* `uvicorn app.main:main_app --host 0.0.0.0 --port 8000 --reload --ssl-keyfile ./certs/localhost+2-key.pem --ssl-certfile ./certs/localhost+2.pem` -* `export XLWINGS_SOCKETIO_SERVER_APP=true && uvicorn app.main:sio_app --host 0.0.0.0 --port 8001 --reload --ssl-keyfile ./certs/localhost+2-key.pem --ssl-certfile ./certs/localhost+2.pem` +- `docker compose -f tests/docker-compose.redis.yaml up` +- `uvicorn app.main:main_app --host 0.0.0.0 --port 8000 --reload --ssl-keyfile ./certs/localhost+2-key.pem --ssl-certfile ./certs/localhost+2.pem` +- `export XLWINGS_SOCKETIO_SERVER_APP=true && uvicorn app.main:sio_app --host 0.0.0.0 --port 8001 --reload --ssl-keyfile ./certs/localhost+2-key.pem --ssl-certfile ./certs/localhost+2.pem` in `.env`: @@ -17,12 +17,20 @@ XLWINGS_SOCKETIO_MESSAGE_QUEUE_URL=redis://localhost:6379/0 in `socketio-handlers.js`: ```js - globalThis.socket = io('https://127.0.0.1:8001', { - auth: async (callback) => { - let token = await globalThis.getAuth(); - callback({ - token: token, - }); - }, - }); +globalThis.socket = io("https://127.0.0.1:8001", { + auth: async (callback) => { + let token = await globalThis.getAuth(); + callback({ + token: token, + }); + }, +}); ``` + +# Install the xlwings Python package from its repo into xlwings-server in editable mode + +- xlwings: delete `project.toml` temporarily +- xlwings: replace `version = "dev"` with the version from `xlwings.js` +- xlwings-server: `pip uninstall xlwings` +- xlwings-server: `cd ~/dev/xlwings && python setup.py develop` +- xlwings: undo deletion of `project.toml`