-
Notifications
You must be signed in to change notification settings - Fork 110
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
Make type names JSON Table Schema conformant #40
Comments
You just need a mapping, like the one in ktbh: classes = { There's no need for everyone depending on messytables to change their code |
A mapping where though - messytables flows through into dataconverters and thence dataproxy etc etc |
I really like the json table schema but I don't think that messytables is the right point to set the type names. Especially since we use only classes and not strings to identify types. I'll close this for now. |
So where would it go? DataConverters? |
Yes, it should go into DataConverters. Imo, messytables is a basic library that should not care about the actual output to the user. |
Please do NOT stick it in DataConvertors! It's already in one downstream package; it should be horizontally integrated. Either stick it in a shim, or stick it in messytables. I shall write a shim; we can then use that, and decide later whether the shim should be in messytables |
I've stuck a shim up at: https://github.com/mk270/messytables-jts |
@mk270 Great. Now the question is whether the mapping should become part of messytables. I think it makes sense as long as it's not too confusing for people who use messytables. Would you like to add it and then we can discuss things based on the proposal? |
Well, people who use messytables aren't going to get confused unless they call any JTS-related functionality. Let's wait for the JTS spec to be formally frozen, and for messytables-jts to have a few weeks in production, before worrying about whether to incorporate the mapping in messytables itself. There's no hurry, right, and we'd benefit from comparing what other people are doing with it, too? |
I'm +1 for getting this in. I think it would be really good if messytables were JTS conformant ... |
Add messytables -> jts converter, with docs. Fixes #40
@domoritz hmmm - i should have reviewed this more carefully :-) I think there was a bit of a confusion here. I don't think we need JTS output from messytables - we just wanted the celltypes to conform to JTS types list. Questions:
|
Hmm. I'm afraid I still don't understand what you want.
What would that actually mean? The types can already be mapped to the JTS types easily.
I'll revert 6e98d06 later. |
I mean not mapping to JTS types but using JTS types as default :-) I want messytables to just support JTS types out of the box - not have to use some special version of messytables to get the JTS types ... |
Well, that is a huge change because it would break every application that uses messytables. Also, we could not use things like the format for dates any more. How about we add a |
This is going to couple messytables to JTS such that there'll be pressure to break JTS to accommodate new types in messytables, and vice versa. That means people will be more hesitant to rely on either of them. |
@rgrp @mk270 What would be the advantage of supporting only JTS in messytables? Doesn't it mkae more sense to have this as a return type from dataconvereters? |
No, it doesn't make more sense to return it from dataconvertors, as stated further up at #40 (comment) The only questions are whether JTS should be output by messytables (I don't mind, but it seems like a waste of effort given that messytables-jts exists), and whether messytables should break a bunch of things which depend on it and change its interface the better to reflect JTS. If we break downstream, then people won't use messytables. So it's like taking messytables in house. |
@rgrp Well, it's not in the list of attributes. I made a pull request to fix that frictionlessdata/datapackage#45. Most people (~90%) should probably use dataconverters but not everyone. I don't see any problems when we tie messytables and jts because jts should be a standard and be used in implementations. @rgrp I'm not 100% sure, I understand what you want. Do you only want us to return strings instead of classes for types or a whole jts with the data? I think we need an example to know what we are talking about. Is it okay, if I revert the jts commit from messytables for now until we come up with a proper solution? |
Yes, ok to revert the JTS stuff - we certainly should not change any interface with folks until we have thoroughly discussed etc. What i'm motivated by is what you get when we convert the "metadata" we get from messytables to JSON e.g. look at the metadata here (which is messytables type info converted through dataconverters to json): |
Can't you just use messytables-jts in dataconverters? |
👍 for using the jts in dataconverters instead of messytables. I understand the motivation but I don't think that messtables as a low-level library is the right place for it. What I would do is adding a field to the messytables type classes which is called Alternatively, we can keep |
@domoritz this sounds good - can you explain the proposed change to messytables a bit more and how this would be used in e.g. dataconverters ... |
See http://www.dataprotocols.org/en/latest/json-table-schema.html#types
etc
The text was updated successfully, but these errors were encountered: