diff --git a/renumics/spotlight/cli.py b/renumics/spotlight/cli.py index 9f9c230e..7854a8c7 100644 --- a/renumics/spotlight/cli.py +++ b/renumics/spotlight/cli.py @@ -7,7 +7,6 @@ import signal import sys from typing import Dict, Optional, Tuple, Union, List -from pathlib import Path import click @@ -41,13 +40,11 @@ def cli_dtype_callback( @click.command() # type: ignore @click.argument( "dataset", - type=str, required=False, - default=os.environ.get("SPOTLIGHT_TABLE_FILE", str(Path.cwd())), + default=os.environ.get("SPOTLIGHT_TABLE_FILE"), ) @click.option( "--folder", - type=str, help="Root folder for filebrowser and file lookup.", required=False, ) @@ -61,7 +58,6 @@ def cli_dtype_callback( @click.option( "--port", "-p", - type=str, default="auto", help="The port that Spotlight should listen on (use 'auto' to use a random free port)", show_default=True, @@ -99,12 +95,13 @@ def cli_dtype_callback( @click.option( "--analyze", default=[], + multiple=True, help="Automatically analyze issues for all columns.", ) @click.option("-v", "--verbose", is_flag=True) @click.version_option(spotlight.__version__) def main( - dataset: str, + dataset: Optional[str], folder: Optional[str], host: str, port: Union[int, str], diff --git a/renumics/spotlight/viewer.py b/renumics/spotlight/viewer.py index 97afec4e..f50d7c52 100644 --- a/renumics/spotlight/viewer.py +++ b/renumics/spotlight/viewer.py @@ -139,7 +139,7 @@ def show( project_root = dataset else: project_root = dataset.parent - elif isinstance(dataset, pd.DataFrame): + elif isinstance(dataset, pd.DataFrame) or dataset is None: project_root = None else: raise TypeError("Dataset has invalid type")