Local development & quality assurance WIP
This guide covers running LITEFile locally, running test suites (Pytest and Playwright), type checking, and code formatting.
1. Local setup with Astral uv
-
Install uv (if not already installed):
curl -LsSf https://astral.sh/uv/install.sh | sh -
Sync dependencies:
uv sync --group dev -
Initialize the SQLite database:
cd efile_appuv run python manage.py migrate --run-syncdb -
Start the development server:
uv run python manage.py runserverOpen
http://127.0.0.1:8000in your browser. -
Start the document extraction worker in a second terminal:
cd efile_appuv run python manage.py process_document_extractionsUploads complete in the web process. This worker analyzes queued lead PDFs in the background.
2. Running automated tests
Pytest (unit & integration tests)
# Run all unit tests
pytest -q
# Run efile app tests only
pytest efile_app/efile/ -q
# Run with test coverage report
pytest --cov=efile_app --cov-report=term-missing
Playwright (end-to-end filing matrix tests)
Playwright tests in efile_app/tests/ verify the complete 14-step user workflow against the Tyler test EFSP.
cd efile_app
npm install
npx playwright install
# Run the complete reorganized filing matrix spec in Tyler test environment
RUN_FILING_MATRIX=1 npx playwright test tests/reorganized-filing-matrix.spec.js
3. Code formatting & type checking
LITEFile enforces high code quality through Ruff and Ty:
# Run Ruff linting and auto-formatting
uv run ruff check .
uv run ruff format .
# Run Ty type checking
uv run ty check
# Run pre-commit hooks
uv run pre-commit run --all-files