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

DataBook read issue #20

Open
nasa-ddalle opened this issue Jul 6, 2023 · 6 comments
Open

DataBook read issue #20

nasa-ddalle opened this issue Jul 6, 2023 · 6 comments

Comments

@nasa-ddalle
Copy link
Collaborator

Follow-on to #18

From @rbreslavsky:

One more comment on this. The databooks are all generated correctly now. However, when they are read back in (for carpet plots or other operations), lists of strings get split up into multiple parts. So for instance, if I have "['hvanleer', 'hvanleer']" in a cell, that gets split into two parts by util.split_line().

@nasa-ddalle
Copy link
Collaborator Author

Figured out that the issue was util.split_line() not remembering which character opened the escaped string. So the ' at the end of "['hvanleer' was closing the opening ".

@nasa-ddalle
Copy link
Collaborator Author

Should be fixed as of bfe4f55

Here's my verification test:

>>> cape.util.split_line('"[\'hvanleer\', \'hvanleer\']"', ',', 1)
['"[\'hvanleer\', \'hvanleer\']"']

A little bit hard to read, but it would have been ['"[\'hvanleer\'', '\'hvanleer\']"'] before.

I think this version could still get tricked by the string "[\"hvanleer\", \"hvanleer\"]", so I'll add one more commit to fix that one.

@rbreslavsky
Copy link

Derek, everything seems to be working now. The only thing that's still amiss is that when running lineloads (pyfun --ll) the top level databook/ll_<component_name>_line_loads.csv files don't parse the lists/strings correctly. The actual line loads data inside databook/lineload/ look to be fine, however.

@rbreslavsky
Copy link

Another note: there is also an impact to databooks. On initial databook generation, all seems to be well. But if runs are appended to the databook, the column data no longer line up with the column titles.

@rbreslavsky
Copy link

@nasa-ddalle, has this been looked at or fixed for databooks?

nasa-ddalle added a commit that referenced this issue Apr 10, 2024
This should address the issue, based on testing, but I could be wrong
nasa-ddalle added a commit that referenced this issue Apr 10, 2024
This should address the issue, based on testing, but I could be wrong
@nasa-ddalle
Copy link
Collaborator Author

Ok, I think this should finally be fixed. Patches applied to both main and v1.1 branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants