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

Uncontrolled columns - import and export #156

Open
liebermeister opened this issue Jul 31, 2020 · 1 comment
Open

Uncontrolled columns - import and export #156

liebermeister opened this issue Jul 31, 2020 · 1 comment

Comments

@liebermeister
Copy link

Hi Jonathan,

I'm sorry for bringing this up again, it's about the "uncontrolled" columns (those that do not start with a "!").

If I remember correctly, the parser does not ignore them, but reads them and attaches their content to the data objects as "comments" or extra information. For my own intended usage of ObjTables (for the results of Enzyme Cost Minimisation) it would be important that this information can also be exported again, such that after a round of import and export, the "uncontrolled" columns would still exist. I think this is not the case right now.

Could you implement this?

Thank you!!

Best,
Wolf

@jonrkarr
Copy link
Member

ObjTables ignores this information. Similarly, ObjTables ignores additional worksheets. There isn't a great way to deal with this content for a couple of reasons

  • ObjTables is oriented around information having a clear semantic meaning, which additional columns and worksheets don't have (at least not which is transparent to the schema).
  • ObjTables does not directly map spreadsheets to other spreadsheets. The content goes through objects which can also be manipulated programmatically. In this cases, there's no meaningful notion of columns.

Extra columns could be parsed into a attribute, e.g. Model._extra_attrs. To deal with the potential issue that column headings could be empty or repeated, it would have to be a list of tuples of column headings and values of each row. Users of the Python package could easily misuse this. The spreadsheet output would have to try to infer the column headings.

We would have to hack a mechanism to deal with extra workshseets.

In both cases, ObjTables would not reproduce any formatting. This is somewhat intentional so that ObjTables produces "canonically" formatted spreadsheets.

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