Ticket #272 (closed task: completed)

Opened 8 weeks ago

Last modified 13 days ago

validate expressions in variable definitions

Reported by: borning Owned by: cuspa
Priority: normal Milestone: Opus Version 4.2
Component: Opus/UrbanSim GUI Version: 4.2
Keywords: Cc:

Description (last modified by borning) (diff)

Validate expressions in variable definitions added in the GUI in the Expression Library. For this ticket, we should ensure that the expressions parse correctly. Some possible enhancements (for beyond the stable release) are described in ticket#273.

Change History

Changed 8 weeks ago by borning

  • description modified (diff)

Changed 3 weeks ago by borning

This is now implemented on the XMLConfiguration side (see the method check_expression_library and the unit test for it test_check_expression_library).

How should we connect to this on the GUI side? Here are two ideas:

  • Add two buttons at the bottom of the View/Edit Expression Library dialog: "check selected variables" and "check all variables"
  • Add a button at the bottom of the View/Edit Expression Library dialog: "check selected variables", and add a menu command under Model System called "check expression library".

In either case the result would pop up as a QMessageBox, either as an "information" type if all variables check out OK, or as a "warning" type if there are errors. In the latter case the list returned by check_expression_library has the information on which variables have errors and what the error is.

Changed 13 days ago by borning

  • status changed from new to closed
  • resolution set to completed

Implemented with r3957. I moved the checker into the GUI, since when we implement the changes for ticket #273 this will need the GUI code.

Note: See TracTickets for help on using tickets.