Renumics / spotlight

Interactively explore unstructured datasets from your dataframe.

Home Page:https://renumics.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Columns order is not respected

luca-bondi opened this issue · comments

Describe the bug
Starting with version 1.0.0, the visualization order of the columns is always alphabetical, no matter what's the order parameter in Dataset.append_column.
Up to version 0.15, the behavior is correct.

To Reproduce
Steps to reproduce the behavior:

from tempfile import TemporaryDirectory
from renumics.backstage import Dataset
from renumics import spotlight

with TemporaryDirectory() as tmp_dir:
    spotlight_file = Path(tmp_dir).joinpath("spotlight.h5")
    with Dataset(spotlight_file, "w") as dataset:
        dataset.append_float_column("colA", order=1, values=[1, 2, 3])
        dataset.append_string_column("colB", order=2, values=["a", "b", "c"])

    viewer = spotlight.show(spotlight_file)

Expected behavior
Columns should follow the order property.

Screenshots

Snapshot from v1.4.0 - wrong order
v1 4 0

Snapshot from v0.15.0 - correct order
v0 15 0

Desktop (please complete the following information):

  • OS: macOS Ventura 13.6
  • Browser: Edge 117.0.2045.47, Chrome 117.0.5938.132, Firefox 102.15.1esr
  • Spotlight Version: 1.0.0 onward

Additional context
None

Hey! Thanks a lot for the bug report.
We removed this functionality while reorganizing our code for better support of different data sources.
It should now be working again and will be part of the next release.