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

Getter getMissingValues for Phase 2 Store Refactor #355

Merged
merged 6 commits into from
Feb 15, 2023

Conversation

jarmoza
Copy link
Contributor

@jarmoza jarmoza commented Feb 9, 2023

This closes #278.

This PR implements a getter for retrieving any values that have been marked as "missing' for a particular given column in the annotated data dictionary. The expectation is that if there are any missing values they will be stored in dataDictionary.annotated.<columnName>.missingValues.

Also implemented are unit tests for three scenarios for this getter:

  1. Retrieving the missing values list fromdataDictionary.annotated.<columnName>.missingValues
  2. Returning an empty list if there are no missing values (no missingValues key) in the column entr in the dataDictionary.annotated object
  3. Returning an empty list if the column itself is not listed in dataDictionary.annotated

This is related to #275 - which will be implemented following this PR.

@jarmoza jarmoza added annotation page data store maint:refactor Simplifying or restructuring existing code or documentation. labels Feb 9, 2023
@jarmoza jarmoza changed the base branch from master to dev_components_talk_to_store_directly February 9, 2023 19:46
Copy link
Contributor

@surchs surchs left a comment

Choose a reason for hiding this comment

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

Looks very nice @jarmoza. As mentioned in the comment, I think this is the inverse situation to the previous PR: as far as I understand, this getter is supposed to take a "category" and then go and fetch the missing values from all columns that have been associated with this category.

The annot-missing-values component is (afaik) the only user of this, and it expects a specific format for this - take a look. Make sure to update the getter name in this component as well.

store/index.js Outdated Show resolved Hide resolved
store/index.js Show resolved Hide resolved
Copy link
Contributor

@surchs surchs left a comment

Choose a reason for hiding this comment

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

Looks great @jarmoza, thanks for the changes - didn't realize the PR was still open. Good to go 🎉 !

@jarmoza jarmoza merged commit dfacbaa into dev_components_talk_to_store_directly Feb 15, 2023
@jarmoza jarmoza deleted the jamroza-278 branch February 15, 2023 17:29
@jarmoza jarmoza restored the jamroza-278 branch February 15, 2023 17:40
@jarmoza jarmoza deleted the jamroza-278 branch February 15, 2023 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
annotation page data store maint:refactor Simplifying or restructuring existing code or documentation.
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

create getter for missing values of a category
2 participants