Add claude GitHub actions 1780848545607#192
Open
dalang059 wants to merge 10 commits into
Open
Conversation
Reduce CHUNK_SIZE from 800 to 500 to stay within the embedding model's 256-token window, preventing silent truncation. Increase MAX_RESULTS from 5 to 8 to maintain retrieval coverage with the smaller chunks. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add fixed-position circular toggle button (top-right) with sun/moon SVG icons - Add [data-theme=light] CSS variable overrides: light gray/white surfaces, dark slate text, same blue primary, adjusted shadows and focus rings - Swap code block backgrounds from hardcoded rgba values to --code-bg variable so they adapt correctly in both themes - Add .theme-transitioning class for smooth 300ms color transitions on toggle - Persist theme choice to localStorage; restore on page load (defaults to dark)
- Add black and ruff as dev dependencies in pyproject.toml - Configure [tool.black] (line-length 88, py313 target) and [tool.ruff.lint] (E/F/I rules, E501 ignored, E402 per-file ignore for app.py where warnings.filterwarnings must precede imports) - Apply black formatting across all 13 Python source files - Fix 29 ruff issues: unsorted imports, unused imports, duplicate StaticFiles import in app.py, and move stray FileResponse import to top of app.py - Add scripts/format.sh (applies black + ruff --fix in-place) - Add scripts/lint.sh (check-only mode for CI / pre-commit use)
- Add backend/tests/test_api_endpoints.py with 18 tests covering all three
FastAPI endpoints (POST /api/query, GET /api/courses, DELETE /api/session/{id}).
Tests verify status codes, response body fields, session auto-creation vs
reuse, input validation (422 on missing query), and 500 error propagation.
- Extend backend/tests/conftest.py with shared API test infrastructure:
_build_test_api_app() builds a minimal FastAPI app mirroring app.py routes
with an injected rag_system, avoiding the static-file mount and ChromaDB
init that prevent direct app.py import in tests.
mock_rag_system fixture provides a pre-configured MagicMock.
api_client fixture wires TestClient to the test app.
- Add [tool.pytest.ini_options] to pyproject.toml (testpaths, pythonpath,
addopts) so `uv run pytest` works from the project root without extra args.
- Add httpx>=0.28 to dev dependencies (required by starlette TestClient
in starlette 0.46+ / FastAPI 0.116+).
# Conflicts: # pyproject.toml # uv.lock
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.