Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Categorical Select bugfix + Rework of initialization of data dictionary columns for data types #395

Merged
merged 11 commits into from
Apr 11, 2023

Conversation

jarmoza
Copy link
Contributor

@jarmoza jarmoza commented Apr 5, 2023

This PR addresses both #386 and #390. A list of changes made by file below.

annot-categorical.vue

  • Removed label attribute for v-select as it was unnecessary and producing a warning. value is used for showing what was just selected and retrieving what had been selected upon component re-mount
  • Added component function selectOptionAndUpdate as we would like to avoid multiline attribute code

annot-continuous-values.vue

  • Added component function selectHeuristic as we would like to avoid multiline attribute code

index.js

Formatting/streamlining

  • Added a comment to describe the new annotation count store field
  • Small streamlining of getColumnDescription, getHarmonizedPreview implementation
  • updateAnnotationCount - Updated this function for a clean check of data type for the column followed by the annotation condition. This way we do not have to worry about cascading conditions.

Feature 390 - Initialization of specialized structures for data types

  • alterColumnCategoryMapping - this has been rewritten to allow for the addition of special structures transformationHeuristic and valueMap in dataDictionary.annotated.<column-name>. Determination of which should be added is dependent on the category assigned to each column in dataDictionary.annotated.<column-name>.
  • getHeuristic - transformationHeuristic property will now always be present for continuous values-categorized columns

Bug fix 386

  • getSelectedCategoricalOption - used to determine via lookup of stored identifier in valueMap what the label for that identifier is
  • selectCategoricalOption - 1) Deletes values from the value map for categorical columns if the annotated value is removed (blank vue select),
    and 2) Changes/adds the annotated value to the valueMap when an option is selected from the vue-select in annot-categorical
  • setHeuristic - Either adds the heuristic from the drop down or deletes the heuristic for a column in annot-continuous-values

Test updates for the fix and feature

  • store-getter-getHeuristic.cy.js
  • store-getter-getSelectedCategoricalOption.cy.js
  • store-mutation-selectCategoricalOption.cy.js
  • store-mutation-updateAnnotationCount.cy.js

Any string referring to data table column in the repo now is called columnName

  • alterColumnCategoryMap.cy.js
  • column-linking-table.cy.js
  • annot-continuous-values.cy.js
  • annot-columns.cy.js
  • column-linking-table.vue (In addition attributes for the b-table have been reordered.)
  • annot-columns.vue

@jarmoza jarmoza added annotation page bug:functional Functional defects resulting from feature changes. feat:improve Incremental, user facing improvements of an existing feature. labels Apr 5, 2023
@jarmoza jarmoza marked this pull request as draft April 5, 2023 17:34
@jarmoza jarmoza marked this pull request as ready for review April 5, 2023 23:32
@rmanaem rmanaem self-requested a review April 6, 2023 15:07
store/index.js Outdated Show resolved Hide resolved
Copy link
Contributor

@rmanaem rmanaem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requested two changes.
Regarding the docstring change, feel free to remove it if you think its presence is unnecessary.

jarmoza and others added 2 commits April 11, 2023 10:27
Co-authored-by: Arman Jahanpour <77515879+rmanaem@users.noreply.github.com>
@jarmoza
Copy link
Contributor Author

jarmoza commented Apr 11, 2023

@rmanaem Changes committed. Take a look.

Copy link
Contributor

@rmanaem rmanaem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👨🏼‍🍳

@jarmoza jarmoza merged commit 34aa283 into dev_components_talk_to_store_directly Apr 11, 2023
3 checks passed
@jarmoza jarmoza deleted the jarmoza-386 branch April 11, 2023 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
annotation page bug:functional Functional defects resulting from feature changes. feat:improve Incremental, user facing improvements of an existing feature.
Projects
None yet
2 participants