Skip to content

Commit

Permalink
Merge pull request #1402 from Sage-Bionetworks/develop-FDS-1947-json-…
Browse files Browse the repository at this point in the history
…schema-bug

Convert nans in manifest to empty strings just prior to JSON Schema Validation
  • Loading branch information
mialy-defelice authored Apr 11, 2024
2 parents 77fbaf7 + a332b6f commit 46572cf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions schematic/models/validate_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,9 @@ def validate_manifest_values(
warnings = []
col_attr = {} # save the mapping between column index and attribute name

# Replace nans with empty strings so jsonschema
manifest = manifest.replace({np.nan: ""})

# numerical values need to be type string for the jsonValidator
for col in manifest.select_dtypes(
include=[int, np.int64, float, np.float64]
Expand Down

0 comments on commit 46572cf

Please sign in to comment.