RELATE is a Django-based learning management system (LMS). Its main unit of interactivity is a flow: a sequence of pages described via YAML containing a Markdown flavor. Database support centers on Postgres for production and SQLite for testing and development. It uses uv for Python package management and rollup/npm for JS/frontend package management.
accounts/: Custom user model appcourse/: Core LMS business logicrelate/: Supporting functionalitydocker-image-run-py/: Code for building the Python autograder Docker imagesfrontend/: JS frontend code (uses an ESLint configuration)prairietest/: Interoperability with PrairieTest test center managementtests/: pytest-driven test suite
Always ensure uv run ruff check passes before finishing a change.
Run uv run basedpyright and aim to keep it passing. Use judgment:
-
If making it pass requires large amounts of type annotation unrelated to the change at hand, or if the diagnostics relate to external packages, it is acceptable to sweep the associated diagnostics into the baseline instead:
uv run basedpyright --writebaseline
Run tests with:
uv run pytest -n 4 # standard test suite
uv run pytest --slow -n 4 # includes slow tests
Both commands can take multiple minutes. Focus test runs on newly-created or modified tests rather than the full suite, and rely on CI for full coverage.