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

Bug Fix: Fix issue with trailing comma creating an empty node #1329

Merged

Conversation

mialy-defelice
Copy link
Contributor

@mialy-defelice mialy-defelice commented Nov 17, 2023

Background

Fix for issue described in FDS-1392.

When a CSV data model has a trailing comma in a list, causing an empty string to be recorded as a node, this creates an empty value node, and errors when trying to create the JSONLD.

For this issue, delete any empty nodes from lists so this does not create the cascading issues.

To Reproduce

Using the current develop-refactor-schemas branch, attempt converting attached EL.data.model.csv (see below) to JSONLD with the following CLI command:

schematic schema convert path/to/EL.data.model.csv

It should error.

To Test

Use the fix branch with the same model and command, and it should pass.

For sanity, you can test the model where I deleted the problematic comma, and it goes through the conversion on the current branch.
EL_del_comma.data.model.csv
EL.data.model.csv

@mialy-defelice mialy-defelice changed the title Develop refactor schemas f Bug Fix: Fix issue with trailing comma creating an empty node Nov 17, 2023
@mialy-defelice mialy-defelice changed the base branch from develop to develop-refactor-schemas November 17, 2023 22:11
@mialy-defelice
Copy link
Contributor Author

Will try updating load DF instead of the current fix.

@mialy-defelice
Copy link
Contributor Author

Leave in previous fix, bc we want to ensure no empty strings go through, but deal with trailing comma in load_df.

@mialy-defelice
Copy link
Contributor Author

@linglp @GiaJordan I attempted to do the fix where we let data models use the trim commas functionality in df_utils, however this resulted in many formatting changes not expected, meaning right now its not usable, for data models so I am going to stick with the fix developed in this PR.

Copy link
Contributor

@GiaJordan GiaJordan left a comment

Choose a reason for hiding this comment

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

Could reproduce the error on develop-refactor-schemas and confirm that it was resolved on this branch!

@mialy-defelice mialy-defelice merged commit bf4e10d into develop-refactor-schemas Dec 11, 2023
@mialy-defelice mialy-defelice deleted the develop-refactor-schemas-FDS-1392 branch March 8, 2024 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants