Skip to content

817: Add configurability to range question type#832

Open
lindsay-stevens wants to merge 1 commit intoXLSForm:masterfrom
lindsay-stevens:pyxform-817
Open

817: Add configurability to range question type#832
lindsay-stevens wants to merge 1 commit intoXLSForm:masterfrom
lindsay-stevens:pyxform-817

Conversation

@lindsay-stevens
Copy link
Copy Markdown
Contributor

@lindsay-stevens lindsay-stevens commented Mar 24, 2026

Closes #817

  • initial implementation of checks
  • tidy up error messages
  • add tests for validations
  • add tests for output
  • remove or update older range tests
  • check for interactions/regressions/etc e.g. with settings etc

Why is this the best possible solution? Were any other approaches considered?

Follows the specification in the linked ticket, related spec ticket, and forum post.

I was not completely clear on the discussion around asc/desc range support but there is a test test_range_spec_patterns__ok to show these variants that pass without error, even though half of them would potentially produce an empty range.

What are the regression risks?

The parameters are validated more closely now so that could cause an error where there was none before, but the added errors are intended to be consistent with what Collect and/or Webforms support anyway.

Does this change require updates to documentation? If so, please file an issue here and include the link below.

Yes, though there are already filed: getodk/docs#2031 getodk/xforms-spec#336

Before submitting this PR, please make sure you have:

  • included test cases for core behavior and edge cases in tests
  • run python -m unittest and verified all tests pass
  • run ruff format pyxform tests and ruff check pyxform tests to lint code
  • verified that any code or assets from external sources are properly credited in comments

@lindsay-stevens lindsay-stevens force-pushed the pyxform-817 branch 2 times, most recently from 2aadc2b to 0369cdb Compare March 31, 2026 10:21
@lindsay-stevens lindsay-stevens marked this pull request as ready for review March 31, 2026 10:56
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.

Add configurability to range question type

1 participant