diff --git a/pygeoweaver/__main__.py b/pygeoweaver/__main__.py index e4a69f2..08190d7 100644 --- a/pygeoweaver/__main__.py +++ b/pygeoweaver/__main__.py @@ -216,7 +216,7 @@ def get_process_by_name_command(process_name): :param process_name: The name of the process. :type process_name: str """ - get_process_by_name(process_name) + return get_process_by_name(process_name) @find_command.command("id") @@ -228,7 +228,7 @@ def get_process_by_id_command(process_id): :param process_id: The ID of the process. :type process_id: str """ - get_process_by_id(process_id) + return get_process_by_id(process_id) @find_command.command("language") @@ -240,7 +240,7 @@ def get_process_by_language_command(language): :param language: The programming language of the processes. :type language: str """ - get_process_by_language(language) + return get_process_by_language(language) def main(): diff --git a/pygeoweaver/sc_find.py b/pygeoweaver/sc_find.py index ee99849..2af053a 100644 --- a/pygeoweaver/sc_find.py +++ b/pygeoweaver/sc_find.py @@ -2,6 +2,8 @@ from pygeoweaver.constants import * import pandas as pd +from pygeoweaver.utils import check_ipython + def get_process_by_name(process_name): """ @@ -24,6 +26,8 @@ def get_process_by_name(process_name): pd.set_option("display.max_rows", None) # Display all rows pd.set_option("display.expand_frame_repr", False) # Prevent truncation of columns pd.DataFrame(matching_processes) + if not check_ipython(): + return pd.DataFrame(matching_processes) def get_process_by_id(process_id): @@ -47,6 +51,8 @@ def get_process_by_id(process_id): pd.set_option("display.max_rows", None) # Display all rows pd.set_option("display.expand_frame_repr", False) # Prevent truncation of columns pd.DataFrame(matching_processes) + if not check_ipython(): + return pd.DataFrame(matching_processes) def get_process_by_language(language): @@ -70,3 +76,5 @@ def get_process_by_language(language): pd.set_option("display.max_rows", None) # Display all rows pd.set_option("display.expand_frame_repr", False) # Prevent truncation of columns pd.DataFrame(matching_processes) + if not check_ipython(): + return pd.DataFrame(matching_processes)