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

0.0.14 #18

Merged
merged 15 commits into from
Jul 25, 2022
Merged

0.0.14 #18

merged 15 commits into from
Jul 25, 2022

Conversation

azazellochg
Copy link
Collaborator

Add shlex kwarg for parsing multi-item fields (@jamesmkrieger). False by default as it slow down parsing (e.g. iterRows) by a lot.

README.rst Outdated Show resolved Hide resolved
Copy link
Member

@delarosatrevin delarosatrevin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jamesmkrieger for the improvement! Is there any difference (in speed or results) when using shlex? I don't like to let the option to use it or not to the user (developer) of the emtable API. I think one should always get the correct results and not think if your table will contain quoted values. What about if we always use shlex for splitting?

emtable/metadata.py Outdated Show resolved Hide resolved
@azazellochg
Copy link
Collaborator Author

Thanks @jamesmkrieger for the improvement! Is there any difference (in speed or results) when using shlex? I don't like to let the option to use it or not to the user (developer) of the emtable API. I think one should always get the correct results and not think if your table will contain quoted values. What about if we always use shlex for splitting?

Shlex, if used by default, slows down our example tests x10 times

@delarosatrevin
Copy link
Member

This is a serious slowdown....anyway might be good to be able to handle these cases without shlex.

@azazellochg
Copy link
Collaborator Author

While having quotes as delimiters for the column value is allowed by STAR format, this is the first case I see anybody using them. There are rare cases when relion has "" (empty) values but that's it

@jamesmkrieger
Copy link
Contributor

We actually have another case that made me aware of it in our Zernike3D programs. There’s also another case where we’re thinking of using it.

I guess there won’t be that many others though.

@azazellochg
Copy link
Collaborator Author

Extra kwarg removed, quotes are checked internally now as requested by @delarosatrevin .

@jamesmkrieger
Copy link
Contributor

Looks good to me

@azazellochg
Copy link
Collaborator Author

azazellochg commented Jul 23, 2022

One more case covered, when the column value is "ggg ggg" and not " ggg ggg "

Copy link
Member

@delarosatrevin delarosatrevin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@delarosatrevin delarosatrevin merged commit 07f7759 into master Jul 25, 2022
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

Successfully merging this pull request may close these issues.

None yet

3 participants