Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,10 @@ jobs:

- name: Test
run: turbo test

- name: Install uv
uses: astral-sh/setup-uv@v6

- name: Run python tests
run: uv run pytest
working-directory: python
3 changes: 0 additions & 3 deletions .github/workflows/trunk-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,3 @@ jobs:

- name: Trunk Code Quality
uses: trunk-io/trunk-action@v1

- name: Ty Check
run: uv run ty check
4 changes: 2 additions & 2 deletions python/src/cairo_coder/server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
the Cairo Coder RAG pipeline via HTTP and WebSocket endpoints.
"""

from .app import CairoCoderServer, app, create_app
from .app import CairoCoderServer, create_app

__all__ = ["CairoCoderServer", "create_app", "app"]
__all__ = ["CairoCoderServer", "create_app"]
13 changes: 7 additions & 6 deletions python/src/cairo_coder/server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,10 +626,10 @@ async def lifespan(app: FastAPI):

_vector_db = None


# Create FastAPI app instance
app = create_app(get_vector_store_config())

def create_app_factory():
"""Factory function for creating the app, used by uvicorn in reload mode."""
ConfigManager.load_config()
return create_app(get_vector_store_config())

def main():
import argparse
Expand All @@ -646,14 +646,15 @@ def main():
# TODO: Find a proper pattern for it?
# TODO: multi-model management?
uvicorn.run(
"cairo_coder.server.app:app",
"cairo_coder.server.app:create_app_factory",
host="0.0.0.0",
port=3001,
reload=args.dev,
log_level="info",
workers=args.workers,
factory=True,
)


if __name__ == "__main__":
# Create FastAPI app instance
main()