temporian
temporian copied to clipboard
Extra elipsis when displaying a single-event EventSet
In this case the ellipsis (...
) should not be displayed
I think this is happening due to :
# Create ellipsis row between first half and last half if more than max_timestamps entries
table.appendChild(html_table_row(dom, row))
if (
timestamp_idx == ((max_timestamps // 2) - 1)
and num_timestamps > max_timestamps
) or (max_timestamps == 1): # THIS IS CREATING THE ELLIPSE
ellipsis_row = [ELLIPSIS] * (
1 + len(visible_feats) + int(has_hidden_feats)
)
table.appendChild(html_table_row(dom, ellipsis_row))
at here: def display_html.
Maybe we can do max_timestamps == 1 and num_timestamps > 1
instead of just or (max_timestamps == 1):
Yes, the max_timestamps
is the min(config.display_max_events, num_timestamps)
so when we fixed the ellipsis for display_max_events == 1
we broke it when num_timestamps == 1
Adding that check would fix it, although I think we can factor-out the num_timestamps > max_timestamps
and do something like:
(num_timestamps > max_timestamps) and ( (timestamp_idx == ((max_timestamps // 2) - 1)) or (max_timestamps == 1) )
and I feel that the last 2 conditions linked by the or
could be simplified into a single one 🤔
Yes, the
max_timestamps
is themin(config.display_max_events, num_timestamps)
so when we fixed the ellipsis fordisplay_max_events == 1
we broke it whennum_timestamps == 1
Adding that check would fix it, although I think we can factor-out thenum_timestamps > max_timestamps
and do something like:(num_timestamps > max_timestamps) and ( (timestamp_idx == ((max_timestamps // 2) - 1)) or (max_timestamps == 1) )
and I feel that the last 2 conditions linked by the
or
could be simplified into a single one 🤔
Can you tell me how to run jupyter notebooks
in our venv
so, that I can test it because if I just download the jupyter
extension from vscode
and try to run something; the kernel just don't detect the poetry venv
you can install jupyter bypassing the pyproject.toml with poetry run pip install jupyter
and then poetry run jupyter notebook
.
For vscode, I always set poetry config virtualenvs.path .venv
and poetry config virtualenvs.in-project true
so that poetry creates a folder .venv
inside my project which vscode is able to find