-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
fix: column extra in import/export #17738
Conversation
try: | ||
table_exists = example_database.has_table_by_name(dataset.table_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic was wrong, but since it's only used when loading examples (where the dataset DB is the examples DB) it works fine.
Codecov Report
@@ Coverage Diff @@
## master #17738 +/- ##
==========================================
+ Coverage 68.06% 68.07% +0.01%
==========================================
Files 1653 1653
Lines 66374 66374
Branches 7121 7121
==========================================
+ Hits 45177 45185 +8
+ Misses 19300 19292 -8
Partials 1897 1897
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
7880f47
to
1a01826
Compare
SUMMARY
When exporting a dataset, the
extra
attribute in columns was being exported as a plain string, instead of parsing the JSON. This would result in YAML like this:Instead of:
This PR:
(I also noted that the dataset
extra
attribute is not being parsed from JSON, and both import/export assume it's a string. I'll improve it in a next PR, exporting as an object and importing both formats.)BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A
TESTING INSTRUCTIONS
Added unit tests, testing that export is correct and import supports both formats.
ADDITIONAL INFORMATION