Closed lindsay-stevens closed 2 years ago
I've updated Validate manually to https://github.com/getodk/validate/releases/tag/v1.17.0 and run nosetests
without the new test erroring.
~so I think it should work. I'm not as confident as I'd like to be because I wasn't able to run the automatic Validate update script (something has changed there?) and I'm having trouble running tests in my IDE.~
With a clear head I fixed my environment and was able to both run the Validate update script and run tests from my IDE. Hopefully you can do the update in a commit here and then move forward, @lindsay-stevens.
I've taken a first look through and this looks great to me and thoroughly tested. I'll take a deeper dive asap. @MartijnR perhaps you'll be interested in a peek as well? I think you were particularly interested in this change at some point.
Thanks! Very cool! I played around converting some forms and wasn't able to break it.
Closes #461
Why is this the best possible solution? Were any other approaches considered?
xls2json.py
: Added value, label to allowed params for select_from_file question types.question.py
: Updated to use params (if any) as the default itemset_ref value. Other logic around dynamic labels etc then layers on top.test_external_instances_for_selects.py
:md_table_to_workbook
method since openpyxl can write files.ODK Validate rejects certain characters for the
value
andlabel
parameters. Presumably theref
value is placed into a XPath, and characters that are XPath operators cause a problem. The error from ODK Validate looks like the below.Since this isn't super clear, the parameter values are validated by pyxform with the regex
^[a-zA-Z_][a-zA-Z0-9\-_\.]*$
. The error message is similar to other design issues, e.g.What are the regression risks?
None are anticipated.
Does this change require updates to documentation? If so, please file an issue here and include the link below.
randomize
andseed
).Before submitting this PR, please make sure you have:
tests
nosetests
and verified all tests passblack pyxform tests
to format code