From e36fb3e22da29847544e14098212da6d24b3f5da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9l=C3=A8ne=20Martin?= Date: Fri, 16 Apr 2021 11:06:00 -0700 Subject: [PATCH 1/2] Force secondary instance creation so query can be used --- pyxform/tests_v1/test_repeat.py | 40 ++++++++++++++++----------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/pyxform/tests_v1/test_repeat.py b/pyxform/tests_v1/test_repeat.py index 423308d8..3629f385 100644 --- a/pyxform/tests_v1/test_repeat.py +++ b/pyxform/tests_v1/test_repeat.py @@ -678,16 +678,16 @@ def test_repeat_using_select_with_reference_path_in_predicate_uses_current(self, Test relative path expansion using current if reference path is inside a predicate in a survey with select choice list """ xlsform_md = """ - | survey | | | | | - | | type | name | label | calculation | - | | begin repeat | item-repeat | Item | | - | | calculate | item-counter | | position(..) | - | | calculate | item | | instance('item')/root/item[itemindex=${item-counter}]/label | - | | begin group | item-info | Item info | | - | | note | item-note | All the following questions are about ${item}. | | - | | select one item | stock-item | Do you stock this item? | | - | | end group | item-info | | | - | | end repeat | | | | + | survey | | | | | | + | | type | name | label | choice_filter | calculation | + | | begin repeat | item-repeat | Item | | | + | | calculate | item-counter | | | position(..) | + | | calculate | item | | | instance('item')/root/item[itemindex=${item-counter}]/label | + | | begin group | item-info | Item info | | | + | | note | item-note | All the following questions are about ${item}. | | | + | | select one item | stock-item | Do you stock this item? | true() | | + | | end group | item-info | | | | + | | end repeat | | | | | | choices | | | | | | | list_name | name | label | itemindex | | | item | gasoline-regular | Gasoline, Regular | 1 | @@ -709,16 +709,16 @@ def test_repeat_using_select_uses_current_with_reference_path_in_predicate_and_i Test relative path expansion using current if reference path is inside a predicate and instance is not first expression in a survey with select choice list """ xlsform_md = """ - | survey | | | | | - | | type | name | label | calculation | - | | begin repeat | item-repeat | Item | | - | | calculate | item-counter | | position(..) | - | | calculate | item | | ${item-counter} + instance('item')/root/item[itemindex=${item-counter}]/label | - | | begin group | item-info | Item info | | - | | note | item-note | All the following questions are about ${item}. | | - | | select one item | stock-item | Do you stock this item? | | - | | end group | item-info | | | - | | end repeat | | | | + | survey | | | | | | + | | type | name | label | choice_filter | calculation | + | | begin repeat | item-repeat | Item | | | + | | calculate | item-counter | | | position(..) | + | | calculate | item | | | ${item-counter} + instance('item')/root/item[itemindex=${item-counter}]/label | + | | begin group | item-info | Item info | | | + | | note | item-note | All the following questions are about ${item}. | | | + | | select one item | stock-item | Do you stock this item? | true() | | + | | end group | item-info | | | | + | | end repeat | | | | | | choices | | | | | | | list_name | name | label | itemindex | | | item | gasoline-regular | Gasoline, Regular | 1 | From 0ac5b34be240bf612831dcd684fec65d9f6657bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9l=C3=A8ne=20Martin?= Date: Fri, 16 Apr 2021 11:08:20 -0700 Subject: [PATCH 2/2] Update for v1.5.0 release --- CHANGES.txt | 14 ++++++++++++++ README.rst | 2 +- pyxform/__init__.py | 2 +- setup.py | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index f4a24c4c..c5483266 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,19 @@ Pyxform Changelog +# v1.5.0, 2021-04-16 + +* #521 Use itext for dynamic selects with dynamic labels + * Agus Hilman @gushil (OpenClinica), Hélène Martin @lognaturel (ODK) +* #522 Add support for csv-external + * Hélène Martin @lognaturel (ODK) +* #526 Warning for dynamic defaults now more annoying than helpful + * Yaw Anokwa @yanokwa (ODK) +* #524 ${} references in predicates should be expanded using current() + * Agus Hilman @gushil (OpenClinica) +* #529 Apply section name check to sections only + * John Milner @jnm (KoBo) +* #516 Generate correct reference when selecting choices from current repeat question + * Davis Raymond @DavisRayM (Ona) # v1.4.0, 2021-02-23 diff --git a/README.rst b/README.rst index 6da4a48b..c3dfafc6 100644 --- a/README.rst +++ b/README.rst @@ -1,5 +1,5 @@ =============== -pyxform v1.4.0 +pyxform v1.5.0 =============== |circleci| |appveyor| |codecov| |black| diff --git a/pyxform/__init__.py b/pyxform/__init__.py index 0fc9d6e9..f754c256 100644 --- a/pyxform/__init__.py +++ b/pyxform/__init__.py @@ -4,7 +4,7 @@ Collect easy. """ -__version__ = "1.4.0" +__version__ = "1.5.0" from pyxform.builder import ( SurveyElementBuilder, diff --git a/setup.py b/setup.py index f90df613..0c52bf2c 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ setup( name="pyxform", - version="1.4.0", + version="1.5.0", author="github.com/xlsform", author_email="info@xlsform.org", packages=find_packages(),