Skip to content

Add examples to docstrings that use actual Docassemble syntax, not python repl syntax - #1111

Open
nonprofittechy wants to merge 2 commits into
mainfrom
more-useful-docstrings
Open

nonprofittechy wants to merge 2 commits into
mainfrom
more-useful-docstrings

Conversation

@nonprofittechy

Copy link
Copy Markdown
Member

This only edits docstrings. Previewed all of the rendered doc pages in local Docusaurus checkout to make sure they look good and checked accuracy of examples.

image

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Several copy-pasted documentation examples contain incorrect or incomplete syntax.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity · 1 Low severity

Open (2)
What changed in this PR

Updates AssemblyLine docstrings with Docassemble-native YAML, Mako, and Jinja2 examples.

Changes:

  • Replaces Python REPL examples with practical Docassemble syntax.
  • Adds examples across document, session, language, signing, people, and court APIs.
  • Improves code-fence formatting and documentation rendering.
File Summary
docassemble/​AssemblyLine/​sign.py Added signature and font examples.
docassemble/​AssemblyLine/​sessions.py Added session examples; minor cleanup remains for adjacent examples and wording.
docassemble/​AssemblyLine/​language.py Added language-selection examples.
docassemble/​AssemblyLine/​custom_jinja_filters.py Updated filter examples; catchall example needs its module declaration.
docassemble/​AssemblyLine/​al_general.py Added people and helper examples; repeated users declarations need correction.
docassemble/​AssemblyLine/​al_document.py Added document and exhibit examples; one OCR event name is incorrect.
docassemble/​AssemblyLine/​al_courts.py Added court-loader examples.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docassemble/AssemblyLine/al_document.py Outdated
`background_action()`; `to_pdf` must be an initialized DAFile:

```yaml
event: al_exhibit_ocr_pages_bg
Comment thread docassemble/AssemblyLine/sessions.py Outdated
Comment on lines +1952 to +1953
With `saved_filename` and `saved_session_id` identifying the saved
session selected by the user, in an interview code block:
@nonprofittechy

Copy link
Copy Markdown
Member Author

@copilot Fix the code for all comments in this review thread.

When a review comment includes a suggested change, apply the suggestion exactly.

Do not make changes beyond what is described in the linked review thread.

Co-authored-by: nonprofittechy <7645641+nonprofittechy@users.noreply.github.com>

Copilot AI commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

@copilot Fix the code for all comments in this review thread.

When a review comment includes a sugg...

Addressed in 89da353.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants