Skip to content
Snippets Groups Projects

Connect EditSingleParamDialog with ValueColorEdit

Merged Lan Dam requested to merge i194_connect_edit_single_param_dialog_with_edit_value_color into develop

closes #194 (closed)

Beside connecting EditSingleParamDialog with ValueColorEdit, this MR has the following changes:

  • Combine 'description' with 'instruction' in plot_type_info to remove redundancy.
  • Add check in ValueColors string for number of valueColor, duplicated value, order of value
  • Show error when checking ValueColors string the first time ValueColorEdit is created to help developer check if ValueColors that are added into DB not from the GUI are valid.
Edited by Lan Dam

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Lan Dam added 6 commits

    added 6 commits

    • 9ce60789 - remove from plot_type key 'instruction' and combine its content to description...
    • 956111f6 - implement validate_value_color_str() and its unittest
    • 8aa82970 - apply validate_value_color_str in ParamDialog
    • 086c655f - modify edit_single_param_dialog so it replace ValueColorEdit instead of...
    • a560b371 - apply validate_value_color_str in value_color_edit and remove plot_type...
    • c89cdfbd - docstring

    Compare with previous version

  • Lan Dam added 6 commits

    added 6 commits

    • 8b78603a - add parameter in header of error message, header is only used in Param Dialog,...
    • fd2a0643 - add to ValueColorEdit arguments: is_first_created, row_id, param; print...
    • 115dc5dd - add to EditSingleParamDialog is_value_color_first_created param
    • 98b4105a - ParamDialog: add param is_value_color_first_created; add in arguments passed...
    • 4aa1f8ec - modify some pattern to accept empty string
    • 13c73c9f - fix unittest to match with changes

    Compare with previous version

  • Lan Dam changed title from connect edit single param dialog with edit value color to Connect EditSingleParamDialog with ValueColorEdit

    changed title from connect edit single param dialog with edit value color to Connect EditSingleParamDialog with ValueColorEdit

  • Lan Dam changed the description

    changed the description

  • Lan Dam removed review request for @kienle

    removed review request for @kienle

  • Lan Dam requested review from @kienle

    requested review from @kienle

  • Kien Le added 1 commit

    added 1 commit

    • 4a2f564e - Validate database content at the start

    Compare with previous version

  • Lan Dam added 4 commits

    added 4 commits

    • 669b5d61 - remove self.is_value_color_first_created, correct param sent to...
    • d3e2c41d - remove is_value_color_first_created, correct para passed to ValueColorEdit,...
    • b2c8a832 - remove is_first_created in value_color_edit
    • ee81ceb2 - validate_value_color_str: remove arguments rowid and param, remove header in...

    Compare with previous version

  • Lan Dam added 1 commit

    added 1 commit

    • eec88441 - modify unittest for new changes

    Compare with previous version

  • Lan Dam removed review request for @kienle

    removed review request for @kienle

  • Lan Dam requested review from @kienle

    requested review from @kienle

  • Lan Dam added 1 commit

    added 1 commit

    • 3df91d1b - change class name for unittest

    Compare with previous version

  • Kien Le resolved all threads

    resolved all threads

  • 227 225 f"when no Plot Type is selected.")
    228 226 else:
    229 msg = (f"Row {row_id}: No ValueColors is required for "
    227 msg = (f"{header}No ValueColors is required for "
    230 228 f"Plot Type {plot_type}.")
    231 229 return False, msg
    232 230 return True, ''
    233 231
    232 def validate_database_content(self):
    233 for row_id, row_content in enumerate(self.database_rows):
    234 is_row_valid, msg = self.validate_row(row_id, row_content)
    235 if not is_row_valid:
    236 QMessageBox.critical(
    237 self, f'Validation Failed on {row_content[0]}', msg)
    238 print(msg) # Show on terminal to track back later.
    239 return True, ''
    • It would be good to let the user know that the valueColors will be set to the default value if there is a problem with the valueColors in the database.

    • Author Maintainer

      If I know you want this, we didn't have to write a separate check. Just give the warning inside value_color_edit.

    • Please register or sign in to reply
  • The only problems left are pretty minor, so I'll pre-approve. You can merge this MR once you addressed all the comments.

  • Kien Le approved this merge request

    approved this merge request

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading