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

Shortify group nodes representation #515

Merged
merged 4 commits into from
Apr 30, 2018

Conversation

kurlov
Copy link
Contributor

@kurlov kurlov commented Mar 25, 2018

Summary

Shortify nodes printing in case it exceeds limit.

Related to #493

@kurlov kurlov changed the title WIP shortify group nodes representation Shortify group nodes representation Apr 1, 2018
@kurlov kurlov force-pushed the feature/datanode_prettify branch from 21f50ec to f28aa33 Compare April 1, 2018 18:35
@kurlov
Copy link
Contributor Author

kurlov commented Apr 1, 2018

I looked at panda`s data print, did not find convenient way to change how many rows to show, so I think this feature is not important.

pandas:

27     25501716774  1503637308000    ok    1511413308000
28     25501716774  1503637308000    ok    1514005308000
29     27007209462  1493956747000    ok    1493956747000
...            ...            ...   ...              ...
11269   9729054875  1486533428000    ok    1512453428000
11270   9729054875  1486533428000    ok    1515045428000
11271   9729086309  1496908950000    ok    1496908950000

quilt

<GroupNode>
subnode_000
subnode_001
subnode_002
subnode_003
subnode_004

...

subnode_015
subnode_016
subnode_017
subnode_018
subnode_019'

@akarve akarve requested a review from kevinemoore April 2, 2018 17:08
Copy link
Contributor

@kevinemoore kevinemoore left a comment

Choose a reason for hiding this comment

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

Just a couple of very minor requests.

# strip last new line if needed
if items[-1] == '\n':
items.pop()
# copare with + 1 helps to prevent hide under '...' only one item
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing the m in compare.

@@ -6,7 +6,7 @@
import pandas as pd
from six import iteritems, string_types

from .tools import core
from .tools import core, const
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe just import const.PRETTY_MAX_LEN?

@kurlov kurlov force-pushed the feature/datanode_prettify branch from f5457a0 to 85c8c4c Compare April 5, 2018 21:22
@kurlov
Copy link
Contributor Author

kurlov commented Apr 5, 2018

@kevinemoore Please, review this PR again.

Thanks!

@akarve akarve merged commit 84dd557 into quiltdata:master Apr 30, 2018
items.append('\n')
items += sorted(self._data_keys())
# strip last new line if needed
if items[-1] == '\n':
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't work for empty nodes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Whoops, you are right, my bad.

akarve added a commit that referenced this pull request May 10, 2018
akarve added a commit that referenced this pull request May 11, 2018
* revert #515 until bugs are resolved

* remove constant
@akarve
Copy link
Member

akarve commented May 11, 2018 via email

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.

3 participants