cedar.config.core module

Configuration file handling

class cedar.config.core.Config(config, schema=None)[source]

Bases: collections.abc.Mapping

CEDAR configuration file

classmethod from_template(schema=None)[source]

Load from the included YAML configuration file template

classmethod from_yaml(filename, schema=None)[source]

Load from a YAML configuration file

get_gcs_store(self)[source]

Return a GCSStore described by this config

get_gdrive_store(self)[source]

Return a GDriveStore described by this config

get_tile_grid(self)[source]

Return the Tile Grid described by this config

Returns

Return type

stems.gis.grids.TileGrid

get_tracker(self)[source]

Get the Tracker described by this store

to_yaml(self, dest=None, indent=2, sort_keys=False, **kwds)[source]

Write to a YAML (file, if dest is provided)

Parameters

dest (str or Path) – Filename to write to. If not provided, returns a str

Returns

Either the filename written to, or a str containing the YAML data if dest is None

Return type

str

validate(self)[source]

Validate the configuration against schema

Raises

ValidationError – Raised if there’s an issue