API Reference

CLI Module

Josh command-line interface wrapper

cli.JoshCLI Executes Josh CLI commands via subprocess.
cli.CLIResult Result of any CLI command execution.
cli.RunConfig Arguments for ‘java -jar joshsim.jar run’ command.
cli.RunRemoteConfig Arguments for ‘java -jar joshsim.jar runRemote’ command.
cli.NetcdfPreprocessConfig Preprocess NetCDF files into Josh’s .jshd format.
cli.GeotiffPreprocessConfig Preprocess GeoTIFF/COG files into Josh’s .jshd format.
cli.CsvPreprocessConfig Preprocess CSV point data into Josh’s .jshd format.
cli.ValidateConfig Arguments for ‘java -jar joshsim.jar validate’ command.

Jobs Module

Job configuration and parameter sweep execution

jobs.JobConfig Configuration for a job (may be template for expansion).
jobs.SweepConfig Configuration for parameter sweep expansion.
jobs.ConfigSweepParameter A configuration parameter to sweep over in job expansion.
jobs.FileSweepParameter A file parameter to sweep over in job expansion.
jobs.JobExpander Expands JobConfig with sweeps into concrete ExpandedJobs.
jobs.JobSet A collection of jobs to execute (from expanding a JobConfig).
jobs.ExpandedJob A fully-expanded job with concrete parameter values.
jobs.run_sweep Execute all jobs in a JobSet.
jobs.SweepResult Results from running a parameter sweep.
jobs.AdaptiveSweepResult Results from running an adaptive (Optuna) sweep.

Strategies Module

Sweep expansion strategies for parameter optimization

strategies.SweepStrategy Base class for sweep expansion strategies.
strategies.CartesianStrategy Full cartesian product of all parameters (default strategy).
strategies.OptunaStrategy Bayesian optimization using Optuna.
strategies.strategy_from_dict Create a strategy from a dict (YAML deserialization).
strategies.run_adaptive_sweep Run an adaptive sweep using Optuna.
strategies.sample_params_from_trial Sample parameters from an Optuna trial.

Registry Module

DuckDB-backed experiment tracking

registry.RunRegistry DuckDB-backed registry for tracking parameter sweeps and job runs.
registry.RegistryCallback Helper for recording CLI results in the registry.
registry.SessionInfo Information about a sweep session.
registry.ConfigInfo Information about a job configuration.
registry.RunInfo Information about a job run.
registry.DataSummary Summary of data loaded in the registry.

Cell Data Module

Data loading and diagnostic queries

cell_data.CellDataLoader Load Josh export CSVs into the cell_data table.
cell_data.DiagnosticQueries Pre-built queries for common diagnostic plots and analysis.

Diagnostics Module

Quick visualization for simulation sanity checks

diagnostics.SimulationDiagnostics Diagnostic plotting backed by a RunRegistry.

Sweep Module

High-level sweep orchestration

sweep.SweepManager Convenience orchestrator for parameter sweeps.
sweep.SweepManagerBuilder Builder for SweepManager with flexible configuration.
sweep.recover_sweep_results Load CSV results from completed sweep jobs into the registry.
sweep.load_job_results Load CSV results for a single job into the registry.
sweep.LoadConfig Configuration for result loading behavior.
sweep.ResultLoadError Raised when result loading fails after retries.

JAR Module

Josh JAR file management

jar.JarMode JAR selection mode. Select one of JarMode.PROD, JarMode.DEV, or JarMode.LOCAL.
jar.JarManager Manages Josh JAR files.
jar.get_jar Get path to a jar, downloading if necessary.