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

feat(json): Allow empty addendum json #81

Merged
merged 2 commits into from
Oct 9, 2020
Merged

Conversation

blackmad
Copy link
Contributor

@blackmad blackmad commented Oct 9, 2020

I had a csv import that was silently failing because my addendum_json_XXX field was empty in some rows.

This change allows for empty values in addenum_json_XXX fields and adds a lot of tests for both that field and other json fields in csv import

In a separate change, I will attempt to print out badRecordCount somewhere, and in another I will propose we log failed rows to stderr

@blackmad blackmad requested review from orangejulius and Joxit October 9, 2020 19:33
Copy link
Member

@Joxit Joxit left a comment

Choose a reason for hiding this comment

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

3 console.log to remove.

const documentStream = DocumentStream.create('prefix', stats);

test_stream([input], documentStream, function(err, actual) {
// console.log(JSON.stringify(actual, null, 2));
Copy link
Member

Choose a reason for hiding this comment

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

Line to remove



test_stream([input], documentStream, function(err, actual) {
console.log(JSON.stringify(actual, null, 2));
Copy link
Member

Choose a reason for hiding this comment

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

Line to remove



test_stream([input], documentStream, function(err, actual) {
console.log(JSON.stringify(actual, null, 2));
Copy link
Member

Choose a reason for hiding this comment

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

Line to remove

@blackmad blackmad changed the title Allow empty addendum json feat(json): Allow empty addendum json Oct 9, 2020
@blackmad blackmad merged commit 5c7ba7b into master Oct 9, 2020
@blackmad blackmad deleted the allow-empty-addendum-json branch October 9, 2020 22:20
@Joxit
Copy link
Member

Joxit commented Oct 9, 2020

You did not remove lines with console.log?
Don't forget to use Conventional Commit to trigger release...
Use squash instead of merge

@blackmad
Copy link
Contributor Author

blackmad commented Oct 9, 2020 via email

@blackmad
Copy link
Contributor Author

blackmad commented Oct 9, 2020 via email

@Joxit
Copy link
Member

Joxit commented Oct 11, 2020

The Conventional Commits specification is a lightweight convention on top of commit messages. It provides an easy set of rules for creating an explicit commit history; which makes it easier to write automated tools on top of. This convention dovetails with SemVer, by describing the features, fixes, and breaking changes made in commit messages.

This means that the first line of the commit should use the conventional commit spec. Here, you use the Conventional Commit on the PR title and not on your commits.

And in the merge commit, feat(json) is located in the second line of the commit message and not in the first one.

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