Command-line-interface (CLI)
cruiseplan.cli package.
This package contains command-line interface modules for cruiseplan:
main: Primary CLI entry point and command dispatcherbathymetry: Download bathymetry dataenrich: Enrich cruise YAML with computed fieldsforecast: Generate real-time rolling station plan forecastslist: List activities in a schedule with indicesmap: Generate cruise track mapspangaea: Export data to Pangaeaprocess: Process cruise YAML into enriched outputschedule: Generate cruise schedulesstations: Validate and display station definitionsvalidate: Validate cruise configuration files
- cruiseplan.cli.handle_cli_errors(command_name: str, verbose: bool = False)[source]
Context manager that catches and formats standard cruiseplan CLI errors.
- Parameters:
command_name (str) – Name shown in RuntimeError messages (e.g. “map”, “schedule”).
verbose (bool) – If True, print a full traceback on unexpected errors.
cruiseplan.cli.main module
cruiseplan CLI - Subcommand dispatcher for oceanographic cruise planning.
Each subcommand is defined in its own module (e.g. cruiseplan/cli/schedule.py) via a build_parser(subparsers) function. This module wires them together and dispatches to the appropriate run(args) function.
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.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.build_parser(subparsers: _SubParsersAction) ArgumentParser[source]
Add the pangaea subparser and return it.
- cruiseplan.cli.pangaea.determine_workflow_mode(args: Namespace) str[source]
Determine whether we’re in search mode or DOI file mode.
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.build_parser(subparsers: _SubParsersAction) ArgumentParser[source]
Add the stations subparser and return it.
- cruiseplan.cli.stations.run(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.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.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.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.map module (part of cruiseplan.cli.process)
Map generation command.
This module implements the ‘cruiseplan map’ command for generating cruise track visualisations (PNG maps and KML files).
Thin CLI layer that delegates all business logic to the API layer.