scverse / scverse/spatialdata

`_get_unique_label_values_as_index()` should be included as a case of `get_values()`

Open
#522 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
394
Forks
95
Avg merge
4d 3h
Merged PRs (30d)
7

Description

get_values() should have an argument, like index: bool=False, that should return the index when index=True.

Returning the index of shapes and points is straighforward, but currently for returning the index of single-scale and multi-scale labels we use the private function _get_unique_label_values_as_index(). get_values() would make the access more ergonomic.

  • when implemented, update the tables notebook removing the reference to the private function.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing get_values() implementation and the private _get_unique_label_values_as_index() helper to understand how shapes, points, and single- or multi-scale labels are handled. Add the index option described in the issue, then update the tables notebook to remove its private-function reference. Done means get_values(index=True) provides the relevant index and the notebook no longer calls the private helper.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.