Skip to content

Fix computed fields, parser conditionals, and ship pytest plugin#22

Merged
ericof merged 4 commits intomainfrom
issue-17-root-key-computed-filter
Apr 2, 2026
Merged

Fix computed fields, parser conditionals, and ship pytest plugin#22
ericof merged 4 commits intomainfrom
issue-17-root-key-computed-filter

Conversation

@ericof
Copy link
Copy Markdown
Member

@ericof ericof commented Apr 2, 2026

Summary

Test plan

  • make test passes (412 tests)
  • make format && make lint && make lint-mypy clean
  • make docs-html builds without errors
  • make docs-vale reports 0 errors on new pages
  • make docs-linkcheckbroken reports no broken links

Closes #17
Closes #19
Closes #20
Closes #21

ericof added 4 commits April 2, 2026 10:41
When root_key is set, the filter that strips computed fields before a
retry pass now operates on the inner dict instead of the top-level
wrapper. Also introduces make_questions/make_form schema-based test
fixtures and migrates all renderer tests to use JSONSchema dicts.

Closes #17
jsonschema_to_form now delegates to _build_subquestions for the root
schema, so conditional questions defined via top-level allOf/if/then
blocks are parsed into the form. Also migrates condition tests in
test_stdlib.py from direct Form construction to schema dicts.

Closes #20
_build_subquestions now inserts allOf/if/then conditional questions
immediately after the question they depend on, instead of appending
them after all properties. This produces intuitive question ordering
and fixes back-navigation between gating and conditional questions.

Closes #21
Add tui_forms.fixtures package with a pytest plugin registered via the
pytest11 entry point. Provides make_questions, make_form, render_form,
and render_form_capture_input fixtures that adapt patching strategy
based on the renderer class. Typed with runtime-checkable Protocols.

Install with tui-forms[test].

Closes #19
@ericof ericof merged commit b7a4981 into main Apr 2, 2026
11 checks passed
@ericof ericof deleted the issue-17-root-key-computed-filter branch April 2, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant