Spaces:
Running
Running
Merge pull request #210 from biggraph/darabos-gitignore
Browse files- .gitignore +1 -2
- README.md +2 -4
- lynxkite-app/tests/test_main.py +2 -0
- lynxkite-bio/uv.lock +0 -0
- lynxkite-core/src/lynxkite/core/ops.py +9 -4
- lynxkite-core/uv.lock +86 -0
- test.sh +6 -0
.gitignore
CHANGED
@@ -13,10 +13,9 @@ __pycache__
|
|
13 |
node_modules
|
14 |
dist
|
15 |
build
|
16 |
-
joblib-cache
|
17 |
*.egg-info
|
18 |
|
19 |
-
|
20 |
|
21 |
# Playwright
|
22 |
test-results
|
|
|
13 |
node_modules
|
14 |
dist
|
15 |
build
|
|
|
16 |
*.egg-info
|
17 |
|
18 |
+
examples/.*
|
19 |
|
20 |
# Playwright
|
21 |
test-results
|
README.md
CHANGED
@@ -53,12 +53,10 @@ npm run dev
|
|
53 |
|
54 |
## Executing tests
|
55 |
|
56 |
-
|
57 |
|
58 |
```bash
|
59 |
-
|
60 |
-
$ cd lynxkite-app
|
61 |
-
$ pytest
|
62 |
```
|
63 |
|
64 |
## Documentation
|
|
|
53 |
|
54 |
## Executing tests
|
55 |
|
56 |
+
Run all tests with a single command, or look inside to see how to run them individually:
|
57 |
|
58 |
```bash
|
59 |
+
./test.sh
|
|
|
|
|
60 |
```
|
61 |
|
62 |
## Documentation
|
lynxkite-app/tests/test_main.py
CHANGED
@@ -2,9 +2,11 @@ import pathlib
|
|
2 |
import uuid
|
3 |
from fastapi.testclient import TestClient
|
4 |
from lynxkite_app.main import app, detect_plugins
|
|
|
5 |
import os
|
6 |
|
7 |
|
|
|
8 |
client = TestClient(app)
|
9 |
|
10 |
|
|
|
2 |
import uuid
|
3 |
from fastapi.testclient import TestClient
|
4 |
from lynxkite_app.main import app, detect_plugins
|
5 |
+
from lynxkite.core import ops
|
6 |
import os
|
7 |
|
8 |
|
9 |
+
ops.user_script_root = None
|
10 |
client = TestClient(app)
|
11 |
|
12 |
|
lynxkite-bio/uv.lock
ADDED
The diff for this file is too large to render.
See raw diff
|
|
lynxkite-core/src/lynxkite/core/ops.py
CHANGED
@@ -412,13 +412,18 @@ def load_catalogs(snapshot_name: str):
|
|
412 |
CATALOGS = {k: dict(v) for k, v in snap.items()}
|
413 |
|
414 |
|
|
|
|
|
|
|
|
|
415 |
def load_user_scripts(workspace: str):
|
416 |
"""Reloads the *.py in the workspace's directory and higher-level directories."""
|
417 |
if "plugins loaded" in CATALOGS_SNAPSHOTS:
|
418 |
load_catalogs("plugins loaded")
|
419 |
-
|
420 |
-
|
421 |
-
|
|
|
422 |
for p in path.parents:
|
423 |
req = p / "requirements.txt"
|
424 |
if req.exists():
|
@@ -431,7 +436,7 @@ def load_user_scripts(workspace: str):
|
|
431 |
run_user_script(f)
|
432 |
except Exception:
|
433 |
traceback.print_exc()
|
434 |
-
if p ==
|
435 |
break
|
436 |
|
437 |
|
|
|
412 |
CATALOGS = {k: dict(v) for k, v in snap.items()}
|
413 |
|
414 |
|
415 |
+
# Generally the same as the data directory, but it can be overridden.
|
416 |
+
user_script_root = pathlib.Path()
|
417 |
+
|
418 |
+
|
419 |
def load_user_scripts(workspace: str):
|
420 |
"""Reloads the *.py in the workspace's directory and higher-level directories."""
|
421 |
if "plugins loaded" in CATALOGS_SNAPSHOTS:
|
422 |
load_catalogs("plugins loaded")
|
423 |
+
if not user_script_root:
|
424 |
+
return
|
425 |
+
path = user_script_root / workspace
|
426 |
+
assert path.is_relative_to(user_script_root), f"Path '{path}' is invalid"
|
427 |
for p in path.parents:
|
428 |
req = p / "requirements.txt"
|
429 |
if req.exists():
|
|
|
436 |
run_user_script(f)
|
437 |
except Exception:
|
438 |
traceback.print_exc()
|
439 |
+
if p == user_script_root:
|
440 |
break
|
441 |
|
442 |
|
lynxkite-core/uv.lock
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
version = 1
|
2 |
+
revision = 2
|
3 |
+
requires-python = ">=3.11"
|
4 |
+
|
5 |
+
[[package]]
|
6 |
+
name = "colorama"
|
7 |
+
version = "0.4.6"
|
8 |
+
source = { registry = "https://pypi.org/simple" }
|
9 |
+
sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload_time = "2022-10-25T02:36:22.414Z" }
|
10 |
+
wheels = [
|
11 |
+
{ url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload_time = "2022-10-25T02:36:20.889Z" },
|
12 |
+
]
|
13 |
+
|
14 |
+
[[package]]
|
15 |
+
name = "griffe"
|
16 |
+
version = "1.7.3"
|
17 |
+
source = { registry = "https://pypi.org/simple" }
|
18 |
+
dependencies = [
|
19 |
+
{ name = "colorama" },
|
20 |
+
]
|
21 |
+
sdist = { url = "https://files.pythonhosted.org/packages/a9/3e/5aa9a61f7c3c47b0b52a1d930302992229d191bf4bc76447b324b731510a/griffe-1.7.3.tar.gz", hash = "sha256:52ee893c6a3a968b639ace8015bec9d36594961e156e23315c8e8e51401fa50b", size = 395137, upload_time = "2025-04-23T11:29:09.147Z" }
|
22 |
+
wheels = [
|
23 |
+
{ url = "https://files.pythonhosted.org/packages/58/c6/5c20af38c2a57c15d87f7f38bee77d63c1d2a3689f74fefaf35915dd12b2/griffe-1.7.3-py3-none-any.whl", hash = "sha256:c6b3ee30c2f0f17f30bcdef5068d6ab7a2a4f1b8bf1a3e74b56fffd21e1c5f75", size = 129303, upload_time = "2025-04-23T11:29:07.145Z" },
|
24 |
+
]
|
25 |
+
|
26 |
+
[[package]]
|
27 |
+
name = "iniconfig"
|
28 |
+
version = "2.1.0"
|
29 |
+
source = { registry = "https://pypi.org/simple" }
|
30 |
+
sdist = { url = "https://files.pythonhosted.org/packages/f2/97/ebf4da567aa6827c909642694d71c9fcf53e5b504f2d96afea02718862f3/iniconfig-2.1.0.tar.gz", hash = "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7", size = 4793, upload_time = "2025-03-19T20:09:59.721Z" }
|
31 |
+
wheels = [
|
32 |
+
{ url = "https://files.pythonhosted.org/packages/2c/e1/e6716421ea10d38022b952c159d5161ca1193197fb744506875fbb87ea7b/iniconfig-2.1.0-py3-none-any.whl", hash = "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760", size = 6050, upload_time = "2025-03-19T20:10:01.071Z" },
|
33 |
+
]
|
34 |
+
|
35 |
+
[[package]]
|
36 |
+
name = "lynxkite-core"
|
37 |
+
version = "0.1.0"
|
38 |
+
source = { virtual = "." }
|
39 |
+
dependencies = [
|
40 |
+
{ name = "griffe" },
|
41 |
+
]
|
42 |
+
|
43 |
+
[package.optional-dependencies]
|
44 |
+
dev = [
|
45 |
+
{ name = "pytest" },
|
46 |
+
]
|
47 |
+
|
48 |
+
[package.metadata]
|
49 |
+
requires-dist = [
|
50 |
+
{ name = "griffe", specifier = ">=1.7.3" },
|
51 |
+
{ name = "pytest", marker = "extra == 'dev'" },
|
52 |
+
]
|
53 |
+
provides-extras = ["dev"]
|
54 |
+
|
55 |
+
[[package]]
|
56 |
+
name = "packaging"
|
57 |
+
version = "25.0"
|
58 |
+
source = { registry = "https://pypi.org/simple" }
|
59 |
+
sdist = { url = "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f", size = 165727, upload_time = "2025-04-19T11:48:59.673Z" }
|
60 |
+
wheels = [
|
61 |
+
{ url = "https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", size = 66469, upload_time = "2025-04-19T11:48:57.875Z" },
|
62 |
+
]
|
63 |
+
|
64 |
+
[[package]]
|
65 |
+
name = "pluggy"
|
66 |
+
version = "1.5.0"
|
67 |
+
source = { registry = "https://pypi.org/simple" }
|
68 |
+
sdist = { url = "https://files.pythonhosted.org/packages/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1", size = 67955, upload_time = "2024-04-20T21:34:42.531Z" }
|
69 |
+
wheels = [
|
70 |
+
{ url = "https://files.pythonhosted.org/packages/88/5f/e351af9a41f866ac3f1fac4ca0613908d9a41741cfcf2228f4ad853b697d/pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669", size = 20556, upload_time = "2024-04-20T21:34:40.434Z" },
|
71 |
+
]
|
72 |
+
|
73 |
+
[[package]]
|
74 |
+
name = "pytest"
|
75 |
+
version = "8.3.5"
|
76 |
+
source = { registry = "https://pypi.org/simple" }
|
77 |
+
dependencies = [
|
78 |
+
{ name = "colorama", marker = "sys_platform == 'win32'" },
|
79 |
+
{ name = "iniconfig" },
|
80 |
+
{ name = "packaging" },
|
81 |
+
{ name = "pluggy" },
|
82 |
+
]
|
83 |
+
sdist = { url = "https://files.pythonhosted.org/packages/ae/3c/c9d525a414d506893f0cd8a8d0de7706446213181570cdbd766691164e40/pytest-8.3.5.tar.gz", hash = "sha256:f4efe70cc14e511565ac476b57c279e12a855b11f48f212af1080ef2263d3845", size = 1450891, upload_time = "2025-03-02T12:54:54.503Z" }
|
84 |
+
wheels = [
|
85 |
+
{ url = "https://files.pythonhosted.org/packages/30/3d/64ad57c803f1fa1e963a7946b6e0fea4a70df53c1a7fed304586539c2bac/pytest-8.3.5-py3-none-any.whl", hash = "sha256:c69214aa47deac29fad6c2a4f590b9c4a9fdb16a403176fe154b79c0b4d4d820", size = 343634, upload_time = "2025-03-02T12:54:52.069Z" },
|
86 |
+
]
|
test.sh
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash -xue
|
2 |
+
|
3 |
+
cd "$(dirname $0)"
|
4 |
+
pytest --asyncio-mode=auto
|
5 |
+
cd lynxkite-app/web
|
6 |
+
npm run test
|