Skip to main content

Automated quality checks in Assembly Line

Docassemble interviews combine several languages in one package: YAML for interview logic, Python for data models, Mako and Jinja2 for templating, Markdown and HTML for screen formatting, and DOCX and PDF for the documents users receive. The Document Assembly Line runs a set of automated checks over all of them, so that broken links, template typos, and accessibility barriers are caught in a pull request instead of by a self-represented litigant.


What the checks catch

  1. Accessibility barriers: skipped heading levels, unlabelled fields, missing image alt text, low contrast in custom themes, and untagged PDFs.
  2. Template and syntax errors: broken Jinja2 expressions ({{ user.nam }} instead of {{ user.name }}), malformed Mako, and invalid YAML, before a user hits a runtime exception.
  3. Broken links: every absolute HTTP and HTTPS link in interview screens and templates is requested, so users never land on a dead page.
  4. Document drift: the exact text that changed in a Word template, readable in a pull request without opening Microsoft Word.
  5. Python style and correctness: Black formatting, docstrings that match their signatures, type checks, a security scan, and unit tests.
  6. Server health: scheduled checks that every installed interview on a live server still loads.

The toolchain

Tool or actionScopeWhat it doesHow it runs
dayamlcheckerYAML, Python, DOCX, URLsStatic checker for interview structure, WCAG failures, DOCX accessibility, and broken linksLocally from the command line, and inside da_build
ALActions/da_buildPackage build, YAML, DOCX, PDF, URLsBuilds the package, runs dayamlchecker over interview YAML and DOCX templates, audits PDF templates with veraPDF, and checks URLsGitHub Actions
ALActions/valid_jinja2DOCX templatesCompiles the Jinja2 expressions in changed .docx files, recognizing 124 Docassemble and Jinja2 filtersGitHub Actions
ALActions/word_diffDOCX templatesConverts changed .docx files to Markdown and side-by-side HTML diffsGitHub Actions
ALActions/black-formattingPythonEnforces Black formattingGitHub Actions
ALActions/docsigPython docstringsChecks that Google-style docstrings match function signaturesGitHub Actions
ALActions/pythontestsPythonRuns Mypy, Bandit, and the pytest suiteGitHub Actions
ALActions/da_playground_installDeploymentInstalls the branch into a Docassemble playground project for manual testingGitHub Actions
ALActions/da_packageDeploymentInstalls the package server-wide on a test or staging serverGitHub Actions
ALActions/hall_monitorMonitoringChecks that installed interviews on a live server still load, and alerts by email or TeamsGitHub Actions, on a cron schedule
Static and dynamic testing are complementary

These checks are static: they run in seconds in a lightweight container, reading source code, templates, and documents without booting a Docassemble server. They cannot tell you whether an interview actually works. For that, use ALKiln, which drives a headless browser through a real interview on a running server.


What a run looks like

The summary page of a da_build workflow run, showing a successful build job and an annotations panel listing URL checker warnings


Next steps