Pyxform v1.0 release

I'd like to move towards a release by this Thursday. There's a lot of great unreleased functionality that will be very helpful for users and will conclude several roadmap items. I will summarize risks below so that it's hopefully easy for folks to chime in with any concerns. Thank you, @adam.butler for putting pyxform on the agenda for the @TAB call on Wednesday.

Full release notes
  • #357 Add list_name to generated JSON to get static choice list
    • Carlos Quiros @qlands (QLands Technology Consultants)
  • #372 Add support for Java versions that don't have dots in them
  • #289 Do not generate dummy instance content for external instances
  • #378 Fix black configuration for CircleCI
  • #375 Use data as the default root node name instead of the filename
  • #384 If there is only one sheet, use that as the survey sheet
  • #376 Don't generate translation blocks if there is only one language
  • #386 Expand XPath references in upload questions
    • James Tedrick @tedrick (ESRI)
  • #389 Use the filename as the form_id if no explicit form_id is set by settings
  • #392 Add identify-user audit attribute
  • #397 Better Python 2/3 unicode support for ODKValidateError strings
  • #402 Create instance of NullHandler, instead of class reference
    • Brendan Zerr @axonxorz
  • #400 Add track-changes-reasons audit attribute
  • #385 Add support for dynamic defaults
  • #382 Fix crash when displaying ODK Validate errors
  • #380 Add repeat instance in addition to template to the model
  • #408 Remove Python 2.7, 3.5 and 3.6 support, add Python 3.8
  • #412 Preserve attribute ordering across all Python versions
  • #394 Add pyxform version to XForm output
  • #406 Identify first argument of pulldata by splitting on comma
    • Hélène Martin @lognaturel (Nafundi)
  • #410 Output a string bind type for selects
  • #418 Clarify duplicate choice error message
    • Hélène Martin @lognaturel (Nafundi)
  • #417 Add support for last-saved
    • Hélène Martin @lognaturel (Nafundi)

This is considered a v1 release because the XML output will change in several ways. We have done our best to verify that core ODK tools and Enketo will be compatible with these changes, including several versions back. However, older versions of core ODK tools will not be compatible with all changes. This has had negative impact on users in the past (@Batkinson, you may want to make note of these changes). Other downstream tools may be affected, particularly by the following:

  • #289 Do not generate dummy instance content for external instances
    This changes the XML structure.

  • #375 Use data as the default root node name instead of the filename
    This change ensures a predictable root node name. This will make it easier to share raw XPath expressions and will mean that renaming files will not change the XML output. It will also ensure shorter XML output when the filename is long. Users that need a specific root name can introduce the name setting in the settings sheet. For example, when making a permissible update to a form previously uploaded to Aggregate, users will need to use the old filename as the root node name. Tools that use pyxform directly to generate updates to forms will likely want to override the root node name.

  • #385 Add support for dynamic defaults
    Values in the default column that include any of mod, div, *, |, +, -, [, ], {, }, (, ) will be treated as dynamic values and will bet used in setvalue actions in the resulting XML. A warning will be output to let users know that not all tools support dynamic defaults in this way. Tools that don't support setvalue will have unpredictable behavior if used with a form with a dynamic default.

  • #380 Add repeat instance in addition to template to the model
    In Collect, the implication is that one first repeat instance will always be displayed before the user is prompted to add another one. The XML will have changed so some tools may see that as a form update. pyxform will issue a warning.

  • #394 Add pyxform version to XForm output
    Every form generated by pyxform will include an odk:generated-by="pyxform vx.x.x" attribute on the root node name. This will be included in submissions meaning that submissions will be slightly larger in size.

  • #410 Output a string bind type for selects
    Tools that look for select or select1 bind types will no longer work as expected.

  • #417 Add support for last-saved
    This is risky because it extends the way that XPath references are expanded from ${} notation. Additionally, unlike all of the other PRs, it has only been reviewed by folks from one organization (myself and @yanokwa).

4 Likes