Skip to content

Prototype: AI enabled Search and Screening for Systematic Reviews using LLMs, LlamaIndex and PubMed integration

Notifications You must be signed in to change notification settings

Lifework-Health/systematic-review-assistant

Repository files navigation

SR Assistant Prototype

Ruff

Systematic Review Assistant Prototype.

tl;dr:

❯ make
bootstrap                      How to install the `uv` project managent tool
python.insall                  Install project local Python managed by uv
python.list                    Show Python versions available with uv
install.prod                   Install runtime dependencies
install                        Install all dependencies for development
format                         Format and fix code with ruff
lint                           Lint code with ruff
typecheck                      Run MyPy
test.unit                      Run unit tests with coverage
test.integration               Run integration tests only
test.all                       Run all tests with coverage
pre-commit                     Run pre-commit on all files
clean                          Clean Python build artifacts
clean.dev                      Clean everything including development artifacts
supabase.cli                   Install Supabase CLI
supabase.dbdev                 Install dbdev DB package manager
submodules                     Sync git submodules (database-build, etc.)
help                           Show this help

Getting Started

  1. Install uv, uv is a modern Python package manager written in Rust. It has a pip compatible interface under uv pip command and resolves dependencies up to 10x faster than Poetry. uv is to Python package management what ruff is to formatting and linting. It can also manage project Python versions.

    ❯ make bootstrap
    Pick your poison:
    
        brew install uv
        pipx install uv
        pip install uv
        curl -LsSf https://astral.sh/uv/install.sh | sh
        cargo install --git https://github.com/astral-sh/uv uv
        winget install --id=astral-sh.uv  -e
        scoop install main/uv
        powershell -ExecutionPolicy ByPass -c 'irm https://astral.sh/uv/install.ps1 | iex'
    
    Or go container:  docker run ghcr.io/astral-sh/uv ...
  2. Install for development: make dev-install (or uv python install && uv sync)

  3. Run the app stages:

    uv run streamlit run src/step1/app_step1.py
    uv run streamlit run src/step2/app_step2.py

    This will change soon when we move to a multi-page app with one entrypoint (make run) for the MVP prototype.

Testing

The project uses pytest for testing, with tests separated into two categories:

  • Unit Tests (tests/unit/): Fast tests that don't require external services

    • Run with: make test-unit
    • Run with coverage: make test-cov
    • These run on every PR
  • Integration Tests (tests/integration/): Slower tests that may require external services

    • Run with: make test-integration
    • These run on PRs but failures don't block merges

Additional commands:

  • make test-all - Run all tests without coverage
  • make test-cov-all - Run all tests with coverage

Repo Overview and Conventions

  • uv is used for Python project management.
  • CICD is with GitHub Actions, the usual stuff, no packaging or releases yet. Checks are allowed to fail.
  • ruff is used for linting and formatting.
  • pre-commit] is used for linting and formatting. Tests run on push.
  • mypy is used for type checking.
  • pytest is used for unit tests with coverage.

TODO:

  • Local dev (docker compose)
  • SupaBase and Qdrant free-tier cloud services.
  • Install Renovate GitHub App for automatic dependency updates. Like Dependabot, but better. Config in .github/renovate.json.

About

Prototype: AI enabled Search and Screening for Systematic Reviews using LLMs, LlamaIndex and PubMed integration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages