CI workflow, install/run scripts, and idiot-proof quick start#6
Merged
Conversation
- .github/workflows/ci.yml runs pytest across Python 3.10/3.11/3.12, syntax-checks frontend JS via node --check, validates JSON, and smoke-tests install.sh + run.sh with Ollama mocked out. - install.sh is idempotent: detects Python >=3.10, creates backend/.venv, installs deps, probes Ollama, pulls the default model if the daemon is reachable. Never installs system binaries. - run.sh launches uvicorn with TUTOR_SERVE_FRONTEND=1 so the backend serves both the API and the static UI on a single port. - docs/install-runtime-workflow.md compares five install-to-runtime flows and documents the chosen two-script blend. - README gains an idiot-proof Quick start section with troubleshooting and expected behaviour when Ollama is offline. - scripts/smoke_run.sh exercises /api/health and / for CI and local verification.
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.
Summary
Brings the project to a runnable, testable state with a one-command CI
pipeline and a two-command local setup.
CI (
.github/workflows/ci.yml)backend/requirements-dev.txt. All 89 tests pass locally.node --checkon everyfrontend/*.js; JSON parsecheck on
frontend/**/*.jsonandcurriculum/**/*.json.shellcheckoninstall.sh/run.sh, then afull install + run smoke test that hits
/api/healthand/withTUTOR_SKIP_OLLAMA=1so CI never needs an LLM.Idiot-proof install (
install.sh,run.sh)git cloneto a browser tab:./install.shthen./run.sh.install.shis idempotent: reuses the venv, never installs systempackages (Ollama in particular), prints the exact install command if
Ollama is missing, and offers to pull
gemma3:4bonly when theOllama daemon is already reachable.
run.shsetsTUTOR_SERVE_FRONTEND=1so the backend serves both theREST API and the static PWA on a single port (default 8001). The web
UI loads even when Ollama is offline — chat replies return a clear
503 instead of hanging.
TUTOR_PORT,TUTOR_HOST,TUTOR_MODEL,TUTOR_SKIP_OLLAMA,TUTOR_SKIP_MODEL_PULL,TUTOR_NONINTERACTIVE.Docs
docs/install-runtime-workflow.mdevaluates five candidate flows(manual / Docker / one-shot bootstrap / two scripts / Make) on
steps, intervention, ease, and risk, and explains the chosen blend.
behaviour when Ollama is not running.
Test plan
cd backend && .venv/bin/pytest -q→ 89 passednode --check frontend/*.js→ all four files parseTUTOR_SKIP_OLLAMA=1 ./install.shfrom clean state and from areused venv → both succeed and are idempotent
TUTOR_SKIP_OLLAMA=1 ./run.sh→ backend reachable on the port;/api/healthreturnsstatus: degraded,/returns the SPA./scripts/smoke_run.sh→ printssmoke ok🤖 Generated by Computer