ShapefileMetadata#

class caf.space.metadata.ShapefileMetadata(*, name, path, id_col, weighting_data=None)[source]#

Bases: BaseConfig

Store shapefile metadata.

Class for creating, storing and loading metadata relating to shapefiles used for translations. This is not currently used but could be part of a GUI.

Attributes

model_computed_fields

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_extra

Get extra fields set during validation.

model_fields

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

name

path

id_col

weighting_data

Methods

Attributes Documentation

Parameters:
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_extra#

Get extra fields set during validation.

Returns:

A dictionary of extra fields, or None if config.extra is not set to “allow”.

model_fields: ClassVar[Dict[str, FieldInfo]] = {'id_col': FieldInfo(annotation=str, required=True), 'name': FieldInfo(annotation=str, required=True), 'path': FieldInfo(annotation=Path, required=True), 'weighting_data': FieldInfo(annotation=Union[WeightMetadata, NoneType], required=False, default=None)}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

model_fields_set#

Returns the set of fields that have been explicitly set on this model instance.

Returns:
A set of strings representing the fields that have been set,

i.e. that were not filled from defaults.

name: str[source]#
path: Path[source]#
id_col: str[source]#
weighting_data: WeightMetadata | None[source]#