Castorini Onboard
Unified development environment setup for the Castorini Python repos, whether the user wants one repo or several.
Supported Repos
| Repo | PyPI Name | CLI Binary | GitHub |
|---|---|---|---|
| nuggetizer | nuggetizer |
nuggetizer |
castorini/nuggetizer |
| ragnarok | pyragnarok |
ragnarok |
castorini/ragnarok |
| rank_llm | rank-llm |
rank-llm |
castorini/rank_llm |
| umbrela | umbrela |
umbrela |
castorini/umbrela |
Context Detection
- If cwd is inside one of the 4 repos (check for
pyproject.tomlwith matching project name) → install that one. - If the user explicitly asks for one repo, install only that repo.
- If cwd is the monorepo root or elsewhere and the request is ambiguous → ask which repo(s) to install, or install all if the user says so.
Prerequisites
- Python 3.11+
- Git (SSH access to
github.com:castorini)
uv Detection
command -v uv
If present, use uv silently. If absent, ask the user once: install uv or proceed with pip.
Virtual Environment Preference
- Prefer a shared
.venv-sharedin the current workspace root over repo-local.venvdirectories. - Before creating any environment, check whether
.venv-sharedalready exists in the current workspace root and reuse it if present. - Only fall back to a repo-local environment if the shared environment is unavailable or the user explicitly asks for isolation.
Install Flow
- Resolve which repository or repositories are in scope.
- Clone any missing repositories with SSH access to
castorini/<repo>. - Reuse
.venv-sharedwhen it already exists in the workspace root. - Prefer
uvfor sync and dependency-group support. - Fall back to
piponly whenuvis unavailable or the user explicitly asks. - For the common multi-repo cloud/API source install, prefer one shared editable install command:
uv pip install \
-e './ragnarok[cloud,api]' \
-e './nuggetizer[api]' \
-e './umbrela[cloud,api]' \
-e './rank_llm[openai,api]'
This pulls OpenAI support for all four repos and API or uvicorn support for each repo from its own declared extras instead of relying on an indirect transitive install from another package.
- Run the repo CLI
doctor --output jsonsmoke test after install. - Run
pre-commit installin each repository after a source install.
Post-Install (all source installs)
pre-commit install
Reference Files
references/extras.md— Per-repo optional dependency stacksreferences/install-recipes.md— Per-repo clone, install, and smoke-test command sequences
Gotchas
uv sync --group devunderstands dependency groups;pip install -e .does not. If you fall back to pip, install dev tools manually.ragnarokuses the package namepyragnarokon PyPI even though the repo and CLI command areragnarok.rank_llmuses the package name and CLI binaryrank-llm, while the repository and import package are spelledrank_llm.rank_llmsupportsopenaiandapias separate extras; use both when the user wants OpenAI-backed reranking plus HTTP serving helpers.umbrelaonly needs Java 21 forpyserinievaluation workflows, not for the default cloud-oriented development install.- When reusing
.venv-shared, make sure it was created with a Python version compatible with the target repo instead of blindly reusing an older interpreter. - Run smoke tests from inside the target repository so editable installs and local entry points resolve correctly.