sda.cli#
SDA Command Line Interface Functions.
This module contains all the command functions for the SDA CLI.
Functions#
|
Open the Excel data file for the test with the system's default application. |
|
Open the local file explorer at the test position. |
|
Open the plume webpage for the corresponding test. |
Open the local SDA JSON configuration file at ~/sda.json. |
|
|
Handle the dashboard command with proper argument parsing. |
|
Handle the plot command (equivalent to fplot). |
|
Handle the list command to show all available tests. |
|
Parse a filter expression into column, operator, and value. |
|
Apply a filter expression to a DataFrame. |
|
Handle the print command to display DataFrame with enhanced statistics. |
|
Handle the data-demon command for column name standardization analysis. |
Display help information for the SDA CLI. |
Module Contents#
- sda.cli.open_excel_file(test_name)#
Open the Excel data file for the test with the system’s default application.
- Parameters:
test_name (
str) – The name of the test to open (e.g., “T183”).
- sda.cli.open_test_explorer(test_name)#
Open the local file explorer at the test position.
- Parameters:
test_name (
str) – The name of the test to open (e.g., “T183”).
- sda.cli.open_plume_webpage(test_name)#
Open the plume webpage for the corresponding test.
- Parameters:
test_name (
str) – The name of the test to open (e.g., “T183”).
- sda.cli.open_json_file()#
Open the local SDA JSON configuration file at ~/sda.json.
If the file doesn’t exist, it will automatically be created from the default template using SDA’s config system.
- sda.cli.run_dashboard_command(args)#
Handle the dashboard command with proper argument parsing.
- Parameters:
args (
list[str]) – Command line arguments for the dashboard command.
- sda.cli.run_plot_command(args)#
Handle the plot command (equivalent to fplot).
- Parameters:
args (
list[str]) – Command line arguments for the plot command.
- sda.cli.list_tests_command(args)#
Handle the list command to show all available tests.
- Parameters:
args (
list[str]) – Command line arguments for the list command.
- sda.cli.parse_filter_expression(filter_expr)#
Parse a filter expression into column, operator, and value.
- Parameters:
filter_expr (
str) – Filter expression like ‘frequency>10’ or ‘generator=”Gen1”’- Returns:
Tuple of (column_name, operator, value)
- Return type:
tuple[str,str,str]- Raises:
ValueError – If the filter expression is invalid
- sda.cli.apply_filter_to_dataframe(df, filter_expr)#
Apply a filter expression to a DataFrame.
- Parameters:
df (
pd.DataFrame) – DataFrame to filterfilter_expr (
str) – Filter expression to apply
- Returns:
Filtered DataFrame
- Return type:
pd.DataFrame- Raises:
ValueError – If the filter expression is invalid or column doesn’t exist
- sda.cli.print_dataframe_command(args)#
Handle the print command to display DataFrame with enhanced statistics.
- Parameters:
args (
list[str]) – Command line arguments for the print command.
- sda.cli.run_demon_command(args)#
Handle the data-demon command for column name standardization analysis.
- Parameters:
args (
list[str]) – Command line arguments for the data-demon command.
- sda.cli.show_help()#
Display help information for the SDA CLI.