-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
603: Always generate secondary instance for selects #614
Commits on Apr 20, 2023
-
Configuration menu - View commit details
-
Copy full SHA for faaf52a - Browse repository at this point
Copy the full SHA faaf52aView commit details -
Configuration menu - View commit details
-
Copy full SHA for ae54917 - Browse repository at this point
Copy the full SHA ae54917View commit details -
fix: avoid output of duplicate translations, json dump, tests
- survey.py: previous code would output position-based and reference-based translations (e.g. mylist-0 and choice:label), so it now skips reference-based translations for select_types. - survey_element.py: related to the above change, test_xform2json.py test_convert_toJSON_multi_language failed due to circular reference. Change traverses translations to remove offending objects. - pyxform_test_case.py: added the test case number to the debug/fail output, to help when there are many XPath expressions. - numerous test fixes to accommodate updated choice output.
Configuration menu - View commit details
-
Copy full SHA for 4fa1f7d - Browse repository at this point
Copy the full SHA 4fa1f7dView commit details -
Configuration menu - View commit details
-
Copy full SHA for ff31a6f - Browse repository at this point
Copy the full SHA ff31a6fView commit details -
fix: remove unused xpath expressions
- now covered by tests/xpath_helpers/choices.py
Configuration menu - View commit details
-
Copy full SHA for 66f8838 - Browse repository at this point
Copy the full SHA 66f8838View commit details
Commits on May 5, 2023
-
fix: upgrade fixture-based test for instance_xmlns setting
- The test was broken by changes to choices processing (XLSForm#603). - The test conditions seem to relate only to the instance_xmlns feature. - The new test asserts the same using the pyxformtestcase pattern.
Configuration menu - View commit details
-
Copy full SHA for df4e01e - Browse repository at this point
Copy the full SHA df4e01eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0683836 - Browse repository at this point
Copy the full SHA 0683836View commit details -
fix: import error due to local name vs. package namespaced name
- OK locally but failing on CI
Configuration menu - View commit details
-
Copy full SHA for 7807e88 - Browse repository at this point
Copy the full SHA 7807e88View commit details -
Configuration menu - View commit details
-
Copy full SHA for f6df5b2 - Browse repository at this point
Copy the full SHA f6df5b2View commit details -
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
Configuration menu - View commit details
-
Copy full SHA for 1238bd6 - Browse repository at this point
Copy the full SHA 1238bd6View commit details -
- reasonably confident that these are the expected types
Configuration menu - View commit details
-
Copy full SHA for c7caf44 - Browse repository at this point
Copy the full SHA c7caf44View commit details -
fix: import path, add base method for non-question SurveyElement
- section should import SurveyElement from where it is defined. - A NotImplementedError is commonly used to indicate a base method that should be implemented in child classes, and it is used in SurveyElement for xml_control(). The Option and Tag classes don't seem to need this method, so adding an implementation that raises this error is a bit clearer.
Configuration menu - View commit details
-
Copy full SHA for e5e21f5 - Browse repository at this point
Copy the full SHA e5e21f5View commit details -
Configuration menu - View commit details
-
Copy full SHA for c93d0a1 - Browse repository at this point
Copy the full SHA c93d0a1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 48c6f8e - Browse repository at this point
Copy the full SHA 48c6f8eView commit details -
fix: exclude select with appearance=search() from itemset, test updates
- move choices logic off to new function add_choices_info_to_question() - exclude select with appearance=search() from itemset (per comment) - new func for readability and to clarify what info is used to determine choices structures - survey.py: skip adding translations for choices, instead of just for choice_filter. Use type "Option" to detect choice elements which should be more reliable. Move get_xpath lookup under if condition so it's only called if needed. - xls2json.py: fix lookup of select type "select one external" which has an alias "select_one_external". Docs use the underscore alias but the implementation is looking for the spaces alias. - xlsform_test_case/base.py: simplify reporter function - xlsform_spec_test.py: simplify repetitive tests by adding test func. Ideally these should be re-implemented as PyxformTestCase, but they cover a lot of scenarios so for now just simplifying the structure. - test_expected_output/*.xml: update expected XML to match current behaviour, generally: 1) update body to refer to instance, 2) add new instances in model, 3) add new translations in itext, 4) remove old itext from translations. - Misc minor fixes: - utils.py: fix deprecation warning for get_sheet_by_name. - replace in-line regex with pre-compiled regex, and replace match (only looks at start of string) with search (looks at whole string). - add more constants for commonly-used internal strings so that it's easier to find where they are used, added usages to xls2json.py.
Configuration menu - View commit details
-
Copy full SHA for 42d7fd1 - Browse repository at this point
Copy the full SHA 42d7fd1View commit details -
fix: minor correctness / off-by-one error in excel data processing
- The right number of empty rows would be removed afterwards anyway, but for someone reading the code later it'd be better if that number was as stated.
Configuration menu - View commit details
-
Copy full SHA for acd7640 - Browse repository at this point
Copy the full SHA acd7640View commit details -
fix: tests for new itemset output for selects, add xls2json type hints
- yes_or_no_question and xml_tests updated for new itemset output for selects. The default_survey_sheet test expected no default_form_name. - add type hints to workbook_to_json and parse_file_to_json.
Configuration menu - View commit details
-
Copy full SHA for 2adb257 - Browse repository at this point
Copy the full SHA 2adb257View commit details
Commits on May 11, 2023
-
fix: translation tests failing due to itemset changes
- test_translations.py: - remove xpath helpers now in xpath_helpers/choices.py - update test xpath assertions to match itemset behaviour - choices.py: - improve xpath helpers to not require specification of position
Configuration menu - View commit details
-
Copy full SHA for b23d704 - Browse repository at this point
Copy the full SHA b23d704View commit details -
Configuration menu - View commit details
-
Copy full SHA for c2dd549 - Browse repository at this point
Copy the full SHA c2dd549View commit details
Commits on May 12, 2023
-
fix: support of or_other with selects in itemsets
- builder.py: - add or_other choice to survey-level choice dict - add type annotations - constants.py: add new constant for "or specify other" internal suffix - xls2json.py: add error for choice_filter + or_other. Main reason I suppose is that it's unknown how to filter the "other" choice so the user might never see it. - xlsform_spec_test.py: - fix or_other expected XML to include "other" and match sorted element names. - move or_other test into this testcase since it is the same as others there already. - builder_tests.py: update expected output to match or_other output.
Configuration menu - View commit details
-
Copy full SHA for 751e4ea - Browse repository at this point
Copy the full SHA 751e4eaView commit details