Skip to content

Commit 402d635

Browse files
committed
Change catalog_names to catalog_labels for consistency
1 parent ab66f01 commit 402d635

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/astro_image_display_api/api_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ def _assert_empty_catalog_table(self, table):
7979
assert len(table) == 0
8080
assert sorted(table.colnames) == sorted(["x", "y", "coord"])
8181

82-
def _get_catalog_names_as_set(self):
83-
marks = self.image.catalog_names
82+
def _get_catalog_labels_as_set(self):
83+
marks = self.image.catalog_labels
8484
return set(marks)
8585

8686
@pytest.mark.parametrize("load_type", ["fits", "nddata", "array"])
@@ -489,7 +489,7 @@ def test_load_multiple_catalogs(self, catalog):
489489
catalog_label="test2",
490490
)
491491

492-
assert sorted(self.image.catalog_names) == ["test1", "test2"]
492+
assert sorted(self.image.catalog_labels) == ["test1", "test2"]
493493

494494
# No guarantee markers will come back in the same order, so sort them.
495495
t1 = self.image.get_catalog(catalog_label="test1")
@@ -513,7 +513,7 @@ def test_load_multiple_catalogs(self, catalog):
513513
# other one without a label.
514514
self.image.remove_catalog(catalog_label="test1")
515515
# Make sure test1 is really gone.
516-
assert self.image.catalog_names == ("test2",)
516+
assert self.image.catalog_labels == ("test2",)
517517

518518
# Get without a catalog
519519
t2 = self.image.get_catalog()

src/astro_image_display_api/image_viewer_logic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ def get_catalog(
590590
return result
591591

592592
@property
593-
def catalog_names(self) -> tuple[str, ...]:
593+
def catalog_labels(self) -> tuple[str, ...]:
594594
return tuple(self._user_catalog_labels())
595595

596596
# Methods that modify the view

src/astro_image_display_api/interface_definition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ def get_catalog(
543543

544544
@property
545545
@abstractmethod
546-
def catalog_names(self) -> tuple[str, ...]:
546+
def catalog_labels(self) -> tuple[str, ...]:
547547
"""
548548
Names of the loaded catalogs.
549549

0 commit comments

Comments
 (0)