702: nicer error when entities update specified but entity list not attached - #859
Merged
Merged
Conversation
- this problem is caught by ODK Validate, but the error is somewhat cryptic since it refers to instance() expressions generated by pyxform for entity attributes (as shown in the replaced test test_implicit_update_mode__instance_required__error). - xls2json.py: existing secondary_instances tracking to include the file type, update question_types/geo.py accordingly
- previously the code seemed to be repetitively and inconsistently identifying the select types, so now there's 3 distinct branches: external selects, internal selects, select_from_file.
- now suggests adding a list or checking spelling. - it seems there was no existing test for the old message so new tests are added for the pass/fail cases.
- although pyproject.toml specifies the flit_core version under the build-system section, pip doesn't read that. The flit project doesn't have an upper bound on flit_core dependency so when a newer version released with a breaking API change, it broke the build.
lindsay-stevens
force-pushed
the
pyxform-702
branch
from
August 6, 2026 02:48
f4bda32 to
548ee3f
Compare
Contributor
Author
lognaturel
approved these changes
Aug 6, 2026
lognaturel
left a comment
Contributor
There was a problem hiding this comment.
Good new test cases for missing choice list declarations and the rework around different kinds of selects looks good 👍
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 #702
Why is this the best possible solution? Were any other approaches considered?
Branch based on deps-update / PR 853 branch so only commit 42bc8ab is relevant.
Catches the missing secondary instance reference to show a nicer and more specific error message. Per commit message:
Also includes a couple of seemingly straightforward refactoring improvements in code updated for / nearby 42bc8ab:
What are the regression risks?
Low risk. An external tool or training material may expect the ODK Validate message. The selects refactoring passes existing tests, although as noted in f4bda32 there are some seemingly obvious / basic scenarios that don't (or didn't) have tests.
Does this change require updates to documentation? If so, please file an issue here and include the link below.
No
Before submitting this PR, please make sure you have:
testspython -m unittestand verified all tests passruff format pyxform testsandruff check pyxform teststo lint code