Implement deterministic ordering - #12
Open
anuj452005 wants to merge 6 commits into
Open
Conversation
|
Please reference the issue number |
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.
Implement CHT-specific customizations for pyxform update
This PR implements all the CHT-specific customizations needed for the pyxform update, ensuring backward compatibility with existing forms while incorporating the latest features from XLSForm/pyxform.
Changes Made
1. Deterministic Ordering of XML Attributes
node()function inutils.pyto usesorted(kwargs.items())instead of the default iteration2. Instance Tag Values Copying
utils.pyto allow tag attributes to pass through except when the tag attribute matches the element's tag nametests/test_instance_tag_values.pyto verify this functionality3. Language Tag Format
constants.pyfor language tag format_translation_pathmethod insurvey_element.pyto support the simplified format (e.g.,label::eninstead oflabel::/data/label:en)tests/test_language_tag_format.pyto verify the simplified format is used4. Empty Label Handling
xml_label_and_hintmethod insurvey_element.pyto handle empty labelstests/test_empty_label.pyto verify empty labels are handled correctly5. Verification of Existing Customizations
tag="hidden"attributeDocumentation
migration.mdthat explains:Testing
All tests are passing, including:
tests/test_deterministic_ordering.pytests/test_instance_tag_values.pytests/test_language_tag_format.pytests/test_empty_label.pytests/test_custom_question_types.pytests/test_meta_section.pyNote: Some tests in the full test suite may fail due to ODK Validate issues, but these are not related to the implemented features and will be addressed separately.
Benefits
This PR addresses all the requirements outlined in the original issue, ensuring a smooth transition to the updated pyxform while preserving all CHT-specific functionality.