Command-line-interface (CLI)

cruiseplan.cli package.

This package contains command-line interface modules for cruiseplan:

  • main: Primary CLI entry point and command dispatcher

  • stations: Commands for managing and validating station definitions

  • schedule: Commands for generating and displaying cruise schedules

  • download: Commands for downloading external data sources

  • enrich: Commands for enriching cruise data with additional information

  • pangaea: Commands for interacting with Pangaea data repository

  • validate: Commands for validating cruise configuration files

  • utils: Shared utility functions for CLI operations

These modules provide the user interface for interacting with cruiseplan functionality through the command line, supporting the full workflow from configuration to output generation.

cruiseplan.cli.main module

cruiseplan CLI - Modern subcommand architecture for oceanographic cruise planning.

This module provides the main command-line interface for the cruiseplan system, implementing a git-style subcommand pattern with various operations for cruise planning, data processing, and output generation.

cruiseplan.cli.main.enrich_main(args: Namespace) None[source]

Placeholder for enrich logic.

Parameters:

args (argparse.Namespace) – Parsed command-line arguments containing config_file.

cruiseplan.cli.main.main()[source]

Main CLI entry point following git-style subcommand pattern.

cruiseplan.cli.main.pangaea_main(args: Namespace) None[source]

Placeholder for PANGAEA data processing logic.

Parameters:

args (argparse.Namespace) – Parsed command-line arguments containing doi_file.

cruiseplan.cli.main.schedule_main(args: Namespace) None[source]

Placeholder for schedule subcommand logic.

Parameters:

args (argparse.Namespace) – Parsed command-line arguments containing config_file and output_dir.

cruiseplan.cli.main.stations_main(args: Namespace) None[source]

Placeholder for stations subcommand logic.

Parameters:

args (argparse.Namespace) – Parsed command-line arguments containing lat, lon bounds.

cruiseplan.cli.main.validate_main(args: Namespace) None[source]

Placeholder for validate logic.

Parameters:

args (argparse.Namespace) – Parsed command-line arguments containing config_file.

cruiseplan.cli.bathymetry module

Bathymetry data download command.

This module implements the ‘cruiseplan bathymetry’ command for downloading bathymetry data assets required for cruise planning.

Thin CLI layer that delegates all business logic to the API layer.

cruiseplan.cli.bathymetry.main(args: Namespace) None[source]

Thin CLI wrapper for bathymetry command.

Delegates all business logic to the cruiseplan.bathymetry() API function.

cruiseplan.cli.pangaea module

Unified PANGAEA command.

This module implements the ‘cruiseplan pangaea’ command that can either: 1. Search PANGAEA datasets by query + geographic bounds, then download station data 2. Process an existing DOI list file directly into station data

Thin CLI layer that delegates all business logic to the API layer.

cruiseplan.cli.pangaea.determine_workflow_mode(args: Namespace) str[source]

Determine whether we’re in search mode or DOI file mode.

cruiseplan.cli.pangaea.main(args: Namespace) None[source]

Thin CLI wrapper for pangaea command.

Delegates all business logic to the cruiseplan.pangaea() API function.

cruiseplan.cli.pangaea.validate_lat_lon_bounds(lat_bounds: list[float], lon_bounds: list[float]) tuple[float, float, float, float][source]

Validate and convert latitude/longitude bounds into bounding box tuple.

This is a simple CLI helper that validates the user input format.

cruiseplan.cli.stations module

Interactive station placement command.

Thin CLI wrapper that calls the cruiseplan.stations() API function. This follows the established pattern used by process.py, validate.py, map.py, and schedule.py.

cruiseplan.cli.stations.main(args: Namespace) None[source]

Main entry point for interactive station placement.

Thin CLI wrapper that calls the cruiseplan.stations() API function. This follows the established pattern used by process.py, validate.py, map.py, and schedule.py.

Parameters:

args (argparse.Namespace) – Parsed command line arguments

cruiseplan.cli.process module

Unified configuration processing command.

This module implements the ‘cruiseplan process’ command that runs the complete workflow: enrichment -> validation -> map generation.

Thin CLI layer that delegates all business logic to the API layer.

cruiseplan.cli.process.main(args: Namespace) None[source]

Thin CLI wrapper for process command.

Delegates all business logic to the cruiseplan.process() API function.

cruiseplan.cli.schedule module

Cruise schedule generation command.

This module implements the ‘cruiseplan schedule’ command for generating comprehensive cruise schedules from YAML configuration files.

Thin CLI layer that delegates all business logic to the API layer.

cruiseplan.cli.schedule.main(args: Namespace) None[source]

Thin CLI wrapper for schedule command.

Delegates all business logic to the cruiseplan.schedule() API function.

cruiseplan.cli.enrich module (part of cruiseplan.cli.process)

Configuration enrichment command.

This module implements the ‘cruiseplan enrich’ command for adding missing data to existing YAML configuration files.

Thin CLI layer that delegates all business logic to the API layer.

cruiseplan.cli.enrich.main(args: Namespace) None[source]

Thin CLI wrapper for enrich command.

Delegates all business logic to the cruiseplan.enrich() API function.

cruiseplan.cli.validate module (part of cruiseplan.cli.process)

Configuration validation command.

This module implements the ‘cruiseplan validate’ command for comprehensive validation of YAML configuration files without modification.

Thin CLI layer that delegates all business logic to the API layer.

cruiseplan.cli.validate.main(args: Namespace) None[source]

Thin CLI wrapper for validate command.

Delegates all business logic to the cruiseplan.validate() API function.

cruiseplan.cli.map module (part of cruiseplan.cli.process)

Map generation command.

This module implements the ‘cruiseplan map’ command for generating cruise track visualizations (PNG maps and KML files).

Thin CLI layer that delegates all business logic to the API layer.

cruiseplan.cli.map.main(args: Namespace) None[source]

Thin CLI wrapper for map command.

Delegates all business logic to the cruiseplan.map() API function.