-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: xform2json choice filters support, minor codestyle improvements
- builder.py: add type hint, remove unnecessary dict - xform2json.py: - _set_survey_name now handles multiple instances - _set_submission_info now sets itemset details from secondary instance, and attempts to parse choice filters - _set_translations now returns value to be set in __init__() - _get_text_from_translation now does media comparison as a list, since a dictkeysview is not a list - add _get_choices to include choices in internal xform representation - xls2json.py - skip adding choice lists that aren't used in the xform to avoid extra unnecessary data. Maybe worth a warning or maybe not. - add secondary instance for table-list appearance, but reject it if it was being added with a choice filter (not supported). - xform2json_test.py: - expand test_load_from_dump variables for easier debugging - add test cases for choice filters, field-list and table-list - these test cases can be refactored to PyxformTestCase at some stage - xls2xform_tests.py: use equivalent test method instead of keyword - update expected XML from inline choices to secondary itemset for the following (these can be refactored to XPath PyxformTestCase): - test_table_list.py - repeat_date_test.xml - xml_escaping.xml
- Loading branch information
1 parent
f6df5b2
commit 1238bd6
Showing
9 changed files
with
127 additions
and
57 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Binary file not shown.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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