Repository navigation
767: accept yes/no aliases for auto_send/delete, tidy bool settings - #874
Open
lindsay-stevens wants to merge 1 commit into
Open
lindsay-stevens wants to merge 1 commit into
lindsay-stevens wants to merge 1 commit into
Conversation
- collect bool settings uses of aliases.yes_no into new resolver func
so that they are processed in one step in the same way.
- add a warning if any such settings value didn't resolve and so the
default is used instead.
- convert older test_settings_auto_send_delete.py to use xpath style
- split existing client_editable tests into 4 test methods, and use the
same pattern for auto_send/delete (total 12 tests).
- update behaviour of auto_send/delete to match client_editable (and
the "incremental" parameter, probably others) where the attribute is
only emitted if active. This is consistent with the ODK spec, where
client behaviour only changes if the setting is active ("true").
lindsay-stevens
force-pushed
the
pyxform-767
branch
from
October 2, 2026 11:15
2e1e35a to
bdd358f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #767
Why is this the best possible solution? Were any other approaches considered?
Implements the ticket request, adds some clean-up for similar and related settings, adds test coverage. Considered extending existing processing inside xls2json but this improves consistency.
What are the regression risks?
Minor behaviour change, in that auto_send and auto_delete used to output the corresponding
orx:auto-sendandorx:auto-deleteattributes withfalseif the user explicitly set it tofalse. Now these behave likeclient_editableand only appear when the setting is active, which appears consistent with the ODK spec.A warning is added if the supplied value for a bool setting did not resolve to a yes/no/true/false alias, so that users are aware that an alternative default was used instead. No warning for missing/blank settings.
Does this change require updates to documentation? If so, please file an issue here and include the link below.
Maybe - auto_send/delete are documented, but they don't appear in the XLSForm template so it might be useful to add there.
Before submitting this PR, please make sure you have:
testspython -m unittestand verified all tests passruff format pyxform testsandruff check pyxform teststo lint code