From 9383656686cab5d6b464963a5d7f67b0ab2a8ab0 Mon Sep 17 00:00:00 2001 From: Jaladh Singhal Date: Wed, 11 Dec 2024 13:54:09 -0800 Subject: [PATCH] Make sorting documentation more clear --- docs/usage/viewing-tables.rst | 4 +++- firefly_client/firefly_client.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/usage/viewing-tables.rst b/docs/usage/viewing-tables.rst index 5437d06..6d87145 100644 --- a/docs/usage/viewing-tables.rst +++ b/docs/usage/viewing-tables.rst @@ -22,7 +22,7 @@ without showing the table in the viewer, use :meth:`FireflyClient.fetch_table`: fc.fetch_table(file_on_server=tval, tbl_id='invisible-table') -Alternatively, you can turn off the `visible` parameter in :meth:`FireflyClient.fetch_table`: +Alternatively, you can turn off the `visible` parameter in :meth:`FireflyClient.show_table`: .. code-block:: py @@ -67,3 +67,5 @@ order: .. code-block:: py fc.sort_table_column(tbl_id=tbl_id_2mass_psc, column_name='j_m', sort_direction='ASC') + +If a column has sorting, it can be removed by specifying `sort_direction=''`. diff --git a/firefly_client/firefly_client.py b/firefly_client/firefly_client.py index b15792f..1c6d228 100644 --- a/firefly_client/firefly_client.py +++ b/firefly_client/firefly_client.py @@ -1952,8 +1952,8 @@ def sort_table_column(self, tbl_id, column_name, sort_direction=''): column_name : `str` Name of the table column to sort sort_direction : {'', 'ASC', 'DESC'}, optional - Direction of sort: '' for unsorted, 'ASC' for ascending, and 'DESC' - for descending. Default is ''. + Direction of sort: '' for unsorted (or for removing the sort), + 'ASC' for ascending, and 'DESC' for descending. Default is ''. Returns --------