File tree Expand file tree Collapse file tree 4 files changed +15
-8
lines changed
Expand file tree Collapse file tree 4 files changed +15
-8
lines changed Original file line number Diff line number Diff line change 1515 with :
1616 python-version : " 3.13"
1717 - name : Install dependencies
18- run : uv sync --dev
18+ run : uv sync --extra dev
1919 - name : Run tests
20- run : uv run --dev pytest
20+ run : uv run --extra dev pytest
Original file line number Diff line number Diff line change 22
33# Create/refresh a local .venv and install deps from pyproject/uv.lock
44install :
5- uv sync --dev
5+ uv sync --extra dev
66
77# Optional: create venv explicitly (uv sync will also create one if missing)
88venv :
@@ -13,15 +13,15 @@ ingest:
1313 uv run ingest.py
1414
1515chat :
16- uv run chat.py
16+ uv run chat.py
1717
1818# Run the automated test suite
1919test :
20- uv run --dev pytest
20+ uv run --extra dev pytest
2121
2222# Create/update a lockfile explicitly (optional; uv sync also updates it)
2323lock :
24- uv lock
24+ uv lock
2525
2626clean :
2727 rm -rf .rag
Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ dependencies = [
1313 " pyyaml>=6.0.3" ,
1414]
1515
16- [tool . uv ]
17- dev-dependencies = [
16+ [project . optional-dependencies ]
17+ dev = [
1818 " pytest>=8.3.3" ,
1919]
2020
Original file line number Diff line number Diff line change @@ -36,13 +36,20 @@ def ingest_module():
3636 )
3737 created = True
3838
39+ added_to_path = False
40+ if str (project_root ) not in sys .path :
41+ sys .path .insert (0 , str (project_root ))
42+ added_to_path = True
43+
3944 try :
4045 if "ingest" in sys .modules :
4146 module = sys .modules ["ingest" ]
4247 else :
4348 module = importlib .import_module ("ingest" )
4449 yield module
4550 finally :
51+ if added_to_path and str (project_root ) in sys .path :
52+ sys .path .remove (str (project_root ))
4653 if created and config_path .exists ():
4754 config_path .unlink ()
4855
You can’t perform that action at this time.
0 commit comments