-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[ENH] Metadata for data files #1603
Conversation
90f64de
to
32cf172
Compare
@BlazZupan, @markotoplak does this change break your use of metadata? |
It does break reading any existing metadata files. Might be avoided excepting to old unpickling. |
32cf172
to
1f17c42
Compare
Current coverage is 88.67% (diff: 100%)@@ master #1603 diff @@
==========================================
Files 78 78
Lines 8124 8131 +7
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 7203 7210 +7
Misses 921 921
Partials 0 0
|
I had it implemented (the other way around, I first checked whether it's a pickle). Then I "discovered" (don't ask me how) that nobody uses .metadata and decided to switch to a "better" format while it's still time. I re-added it. For writing, pickle is used if there already exists a metadata file that is a pickle, or if the current attributes are not an This is imperfect, but I think that having a plain text format is better than a binary - when possible. I wouldn't like to have two metadata files. Any better ideas? |
ca75dee
to
7e86f80
Compare
Fixed as discussed:
|
7e86f80
to
ecc839d
Compare
@astaric, you meant something like this?
Orange already read and wrote .metadata files, but in pickle format. This is highly inconvenient since the user can't edit it. I changed the format to a (very) simplified YAML: the file is expected to contain a single block mapping. Data is read as string. If we wish, we can either try to evaluate it (with fallback to string) or use PyYAML, although I don't think we need it.