Skip to content

config_validator

validate_route_config(config)

Validates a route config

Parameters:

Name Type Description Default
config str or dict

route config to be validated. If type 'str', tries to read in as a filename and open file as json If type 'dict', assumes it's already read in from a json file

required

Raises:

Type Description
TypeError

Incorrect config parsed in. Must be 'str' or 'dict'

FileNotFoundError

Could not read in file if 'str' parsed

ValidationError

Malformed route config

validate_vessel_config(config)

Validates a vessel config

Parameters:

Name Type Description Default
config str or dict

Vessel config to be validated. If type 'str', tries to read in as a filename and open file as json If type 'dict', assumes it's already read in from a json file

required

Raises:

Type Description
TypeError

Incorrect config parsed in. Must be 'str' or 'dict'

FileNotFoundError

Could not read in file if 'str' parsed

ValidationError

Malformed vessel config

validate_waypoints(waypoints)

Validates the input from a waypoints csv file

Parameters:

Name Type Description Default
waypoints str or DataFrame

the waypoint file to be validated

required

Raises:

Type Description
TypeError

Incorrect config parsed in. Must be 'str' or 'pd.DataFrame'

FileNotFoundError

Could not read in file if 'str' parsed

AssertionError

Malformed waypoints config