Fix always-empty columns being dropped from variableMeasured#45
Merged
Conversation
Columns whose values are null/empty across the entire dataset were never registered in variableMeasured, causing Psych-DS validation failures. Pre-register every column header with value:"unknown" before the null-skip guard so always-empty columns still appear in the output. When a real value is later encountered, generateMetadata upgrades value:"unknown" to the actual type. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Covers three cases: column with all empty cells, column with all "null" string values, and column that is empty in some rows but has a real value in others (verifies the type upgrades from "unknown" to the actual type). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: e80e57c The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Member
|
@htsukamoto5 the only thing missing is a changeset. This can be a |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
null, empty string, or the string"null"across every row in the dataset were silently omitted fromvariableMeasured, causing Psych-DS validation failures (the validator requires every CSV column header to have a corresponding entry)value: "unknown",description: "unknown") before the null-skip guard ingenerateObservation, so always-empty columns still appear in the outputgenerateMetadataupgradesvaluefrom"unknown"to the actual type, so columns with mixed empty/non-empty rows are unaffectedTest plan
metadata-module.test.tscovering: all-empty cells, all-"null"-string values, and partially-empty columns (verifies type upgrades correctly from"unknown")npx jestinpackages/metadata)eye_tracking_statuscolumn — entry appears invariableMeasuredwith"value": "unknown"and nolevels/minValue/maxValue🤖 Generated with Claude Code