Spaces:
Running
Running
More fixes for tests.
Browse files
.github/workflows/test.yaml
CHANGED
@@ -10,7 +10,7 @@ jobs:
|
|
10 |
runs-on: ubuntu-latest
|
11 |
steps:
|
12 |
- uses: actions/checkout@v4
|
13 |
-
|
14 |
- name: Install uv
|
15 |
uses: astral-sh/setup-uv@v5
|
16 |
with:
|
@@ -37,8 +37,8 @@ jobs:
|
|
37 |
run: |
|
38 |
cd lynxkite-app
|
39 |
pytest
|
40 |
-
|
41 |
-
- name: Run graph analytics tests
|
42 |
run: |
|
43 |
cd lynxkite-graph-analytics
|
44 |
pytest
|
@@ -51,17 +51,17 @@ jobs:
|
|
51 |
run: |
|
52 |
cd lynxkite-app/web
|
53 |
npm i
|
54 |
-
npx playwright install --with-deps
|
55 |
|
56 |
- name: Run Playwright tests
|
57 |
run: |
|
58 |
cd lynxkite-app/web
|
59 |
npm run test
|
60 |
-
|
61 |
- uses: actions/upload-artifact@v4
|
62 |
name: Upload playwright report
|
63 |
if: ${{ !cancelled() }}
|
64 |
with:
|
65 |
name: playwright-report
|
66 |
path: lynxkite-app/web/playwright-report/
|
67 |
-
retention-days: 30
|
|
|
10 |
runs-on: ubuntu-latest
|
11 |
steps:
|
12 |
- uses: actions/checkout@v4
|
13 |
+
|
14 |
- name: Install uv
|
15 |
uses: astral-sh/setup-uv@v5
|
16 |
with:
|
|
|
37 |
run: |
|
38 |
cd lynxkite-app
|
39 |
pytest
|
40 |
+
|
41 |
+
- name: Run graph analytics tests
|
42 |
run: |
|
43 |
cd lynxkite-graph-analytics
|
44 |
pytest
|
|
|
51 |
run: |
|
52 |
cd lynxkite-app/web
|
53 |
npm i
|
54 |
+
npx playwright install --with-deps
|
55 |
|
56 |
- name: Run Playwright tests
|
57 |
run: |
|
58 |
cd lynxkite-app/web
|
59 |
npm run test
|
60 |
+
|
61 |
- uses: actions/upload-artifact@v4
|
62 |
name: Upload playwright report
|
63 |
if: ${{ !cancelled() }}
|
64 |
with:
|
65 |
name: playwright-report
|
66 |
path: lynxkite-app/web/playwright-report/
|
67 |
+
retention-days: 30
|
examples/Graph RAG
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
"data": {
|
8 |
"title": "Input document",
|
9 |
"params": {
|
10 |
-
"filename": "
|
11 |
},
|
12 |
"display": null,
|
13 |
"error": null,
|
|
|
7 |
"data": {
|
8 |
"title": "Input document",
|
9 |
"params": {
|
10 |
+
"filename": "examples/example-pizza.md"
|
11 |
},
|
12 |
"display": null,
|
13 |
"error": null,
|
lynxkite-app/src/lynxkite_app/crdt.py
CHANGED
@@ -161,7 +161,7 @@ def try_to_load_workspace(ws: pycrdt.Map, name: str):
|
|
161 |
ws: CRDT object to udpate with the workspace contents.
|
162 |
name: Name of the workspace to load.
|
163 |
"""
|
164 |
-
json_path = f"
|
165 |
if os.path.exists(json_path):
|
166 |
ws_pyd = workspace.load(json_path)
|
167 |
# We treat the display field as a black box, since it is a large
|
|
|
161 |
ws: CRDT object to udpate with the workspace contents.
|
162 |
name: Name of the workspace to load.
|
163 |
"""
|
164 |
+
json_path = f"{config.DATA_PATH}/{name}"
|
165 |
if os.path.exists(json_path):
|
166 |
ws_pyd = workspace.load(json_path)
|
167 |
# We treat the display field as a black box, since it is a large
|
lynxkite-app/src/lynxkite_app/main.py
CHANGED
@@ -107,7 +107,7 @@ def list_dir(path: str):
|
|
107 |
def make_dir(req: dict):
|
108 |
path = config.DATA_PATH / req["path"]
|
109 |
assert path.is_relative_to(config.DATA_PATH)
|
110 |
-
assert not path.exists()
|
111 |
path.mkdir()
|
112 |
|
113 |
|
@@ -116,7 +116,6 @@ def delete_dir(req: dict):
|
|
116 |
path: pathlib.Path = config.DATA_PATH / req["path"]
|
117 |
assert all([path.is_relative_to(config.DATA_PATH), path.exists(), path.is_dir()])
|
118 |
shutil.rmtree(path)
|
119 |
-
return list_dir(path.parent)
|
120 |
|
121 |
|
122 |
@app.get("/api/service/{module_path:path}")
|
|
|
107 |
def make_dir(req: dict):
|
108 |
path = config.DATA_PATH / req["path"]
|
109 |
assert path.is_relative_to(config.DATA_PATH)
|
110 |
+
assert not path.exists(), f"{path} already exists"
|
111 |
path.mkdir()
|
112 |
|
113 |
|
|
|
116 |
path: pathlib.Path = config.DATA_PATH / req["path"]
|
117 |
assert all([path.is_relative_to(config.DATA_PATH), path.exists(), path.is_dir()])
|
118 |
shutil.rmtree(path)
|
|
|
119 |
|
120 |
|
121 |
@app.get("/api/service/{module_path:path}")
|
lynxkite-app/web/playwright.config.ts
CHANGED
@@ -24,7 +24,7 @@ export default defineConfig({
|
|
24 |
},
|
25 |
],
|
26 |
webServer: {
|
27 |
-
command: 'cd
|
28 |
url: 'http://127.0.0.1:8000',
|
29 |
reuseExistingServer: false,
|
30 |
},
|
|
|
24 |
},
|
25 |
],
|
26 |
webServer: {
|
27 |
+
command: 'cd ../.. && LYNXKITE_DATA=examples lynxkite',
|
28 |
url: 'http://127.0.0.1:8000',
|
29 |
reuseExistingServer: false,
|
30 |
},
|