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

Grouped columns - optional alternative syntax? #153

Open
liebermeister opened this issue Jul 30, 2020 · 4 comments
Open

Grouped columns - optional alternative syntax? #153

liebermeister opened this issue Jul 30, 2020 · 4 comments

Comments

@liebermeister
Copy link

Hi Jonathan,

we talked about this already, but I'd like to bring this up again.

Since SBtab does not support grouped tables, it will not be able to import ObjTables files that use this feature. Therefore, it would be great if there was an option in ObjTables that allows for import and export of data files in an alternative form. Instead of

 | !GROUP |       |

!A | !X | !Y |!B

this form could read, for example,

!A | !::GROUP::X | !::GROUP::Y | !B

It's not urgent, but it would be good to know whether you would be willing to implement this in principle.

Thank you!

Best,
Wolf

@liebermeister liebermeister changed the title Groupe columns - optional alternative syntax? Grouped columns - optional alternative syntax? Jul 30, 2020
@jonrkarr
Copy link
Member

In principle, we could flatten out of the column headings. The one issue I forsee is that the separator character(s) (e.g. ::) would need to disallowed from the names of the individual columns. I didn't implement this early because SBtab does indicate some groups of columns, but it didn't seem to be used consistently.

Also, should the group be preceded by !! (e.g., !!Group :: !Column) since groups correspond to their own classes?

@liebermeister
Copy link
Author

Ok great! We don't have to decide this soon, but it's important for me to know that it can be done in the future.

I think the !! syntax would be nice (because it's very consistent with the semantics of grouped columns), but it makes it a bit harder to recognise the table header lines (which, then, are not the only lines anymore that can start with !!). So yet another possibilty, to avoid this, would be something like

:!!Group!Column
or
:!!Group:!Column

I will discuss this with Timo.

Thank you!!

@jonrkarr
Copy link
Member

I offer this is as a suggestion. I think we should try to be consistent in the usage of the ! and !!. To me, the :: is inconsistent with the current markup.

Actually, I don't think we need a separator. Its sufficient to use !! to denote a group and ! to denote a column of a group. In addition, we have to disallow ! from table names. We can flexibility allow white space (not tabs) between the group name and column name. It could look like this:

!!Group-name !Column-name

@liebermeister
Copy link
Author

Thank you! I will think about this with Timo.

@jonrkarr jonrkarr added the future label Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants