Project specs#
- Pydantic model esgvoc.api.project_specs.CatalogExtension[source]#
Bases:
BaseModel
Show JSON schema
{ "title": "CatalogExtension", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "version": { "title": "Version", "type": "string" } }, "required": [ "name", "version" ] }
- Pydantic model esgvoc.api.project_specs.CatalogProperties[source]#
Bases:
BaseModel
Show JSON schema
{ "title": "CatalogProperties", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "url_template": { "title": "Url Template", "type": "string" }, "extensions": { "items": { "$ref": "#/$defs/CatalogExtension" }, "title": "Extensions", "type": "array" } }, "$defs": { "CatalogExtension": { "properties": { "name": { "title": "Name", "type": "string" }, "version": { "title": "Version", "type": "string" } }, "required": [ "name", "version" ], "title": "CatalogExtension", "type": "object" } }, "required": [ "name", "url_template", "extensions" ] }
- field extensions: list[CatalogExtension] [Required][source]#
The extensions of the catalog.
- Pydantic model esgvoc.api.project_specs.CatalogProperty[source]#
Bases:
BaseModel
A dataset property described in a catalog.
Show JSON schema
{ "title": "CatalogProperty", "description": "A dataset property described in a catalog.", "type": "object", "properties": { "source_collection": { "title": "Source Collection", "type": "string" }, "catalog_field_value_type": { "title": "Catalog Field Value Type", "type": "string" }, "is_required": { "title": "Is Required", "type": "boolean" }, "source_collection_term": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Source Collection Term" }, "catalog_field_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Catalog Field Name" }, "source_collection_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Source Collection Key" } }, "required": [ "source_collection", "catalog_field_value_type", "is_required" ] }
- field catalog_field_name: str | None = None[source]#
The name of the collection referenced in the catalog.
- field is_required: bool [Required][source]#
Specifies if the property must be present in the dataset properties.
- field source_collection: str [Required][source]#
The project collection that originated the property.
- Pydantic model esgvoc.api.project_specs.CatalogSpecification[source]#
Bases:
BaseModel
A catalog specifications.
Show JSON schema
{ "title": "CatalogSpecification", "description": "A catalog specifications.", "type": "object", "properties": { "version": { "title": "Version", "type": "string" }, "catalog_properties": { "$ref": "#/$defs/CatalogProperties" }, "dataset_properties": { "items": { "$ref": "#/$defs/CatalogProperty" }, "title": "Dataset Properties", "type": "array" }, "file_properties": { "items": { "$ref": "#/$defs/CatalogProperty" }, "title": "File Properties", "type": "array" } }, "$defs": { "CatalogExtension": { "properties": { "name": { "title": "Name", "type": "string" }, "version": { "title": "Version", "type": "string" } }, "required": [ "name", "version" ], "title": "CatalogExtension", "type": "object" }, "CatalogProperties": { "properties": { "name": { "title": "Name", "type": "string" }, "url_template": { "title": "Url Template", "type": "string" }, "extensions": { "items": { "$ref": "#/$defs/CatalogExtension" }, "title": "Extensions", "type": "array" } }, "required": [ "name", "url_template", "extensions" ], "title": "CatalogProperties", "type": "object" }, "CatalogProperty": { "description": "A dataset property described in a catalog.", "properties": { "source_collection": { "title": "Source Collection", "type": "string" }, "catalog_field_value_type": { "title": "Catalog Field Value Type", "type": "string" }, "is_required": { "title": "Is Required", "type": "boolean" }, "source_collection_term": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Source Collection Term" }, "catalog_field_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Catalog Field Name" }, "source_collection_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Source Collection Key" } }, "required": [ "source_collection", "catalog_field_value_type", "is_required" ], "title": "CatalogProperty", "type": "object" } }, "required": [ "version", "catalog_properties", "dataset_properties", "file_properties" ] }
- field catalog_properties: CatalogProperties [Required][source]#
The properties of the catalog.
- field dataset_properties: list[CatalogProperty] [Required][source]#
The properties of the dataset described in a catalog.
- field file_properties: list[CatalogProperty] [Required][source]#
The properties of the files described in a catalog.
- Pydantic model esgvoc.api.project_specs.DrsPart[source]#
Bases:
BaseModel
A fragment of a DRS specification
Show JSON schema
{ "title": "DrsPart", "description": "A fragment of a DRS specification", "type": "object", "properties": { "source_collection": { "title": "Source Collection", "type": "string" }, "source_collection_term": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Source Collection Term" }, "is_required": { "title": "Is Required", "type": "boolean" } }, "required": [ "source_collection", "is_required" ] }
- Pydantic model esgvoc.api.project_specs.DrsSpecification[source]#
Bases:
BaseModel
A DRS specification.
Show JSON schema
{ "title": "DrsSpecification", "description": "A DRS specification.", "type": "object", "properties": { "type": { "$ref": "#/$defs/DrsType" }, "regex": { "title": "Regex", "type": "string" }, "separator": { "title": "Separator", "type": "string" }, "properties": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Properties" }, "parts": { "items": { "$ref": "#/$defs/DrsPart" }, "title": "Parts", "type": "array" } }, "$defs": { "DrsPart": { "description": "A fragment of a DRS specification", "properties": { "source_collection": { "title": "Source Collection", "type": "string" }, "source_collection_term": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Source Collection Term" }, "is_required": { "title": "Is Required", "type": "boolean" } }, "required": [ "source_collection", "is_required" ], "title": "DrsPart", "type": "object" }, "DrsType": { "description": "The types of DRS specification (directory, file name and dataset id).", "enum": [ "directory", "file_name", "dataset_id" ], "title": "DrsType", "type": "string" } }, "required": [ "type", "regex", "separator", "parts" ] }
- class esgvoc.api.project_specs.DrsType(*values)[source]#
-
The types of DRS specification (directory, file name and dataset id).
- Pydantic model esgvoc.api.project_specs.ProjectSpecs[source]#
Bases:
BaseModel
A project specifications.
Show JSON schema
{ "title": "ProjectSpecs", "description": "A project specifications.", "type": "object", "properties": { "project_id": { "title": "Project Id", "type": "string" }, "description": { "title": "Description", "type": "string" }, "drs_specs": { "additionalProperties": { "$ref": "#/$defs/DrsSpecification" }, "propertyNames": { "$ref": "#/$defs/DrsType" }, "title": "Drs Specs", "type": "object" }, "catalog_specs": { "anyOf": [ { "$ref": "#/$defs/CatalogSpecification" }, { "type": "null" } ], "default": null } }, "$defs": { "CatalogExtension": { "properties": { "name": { "title": "Name", "type": "string" }, "version": { "title": "Version", "type": "string" } }, "required": [ "name", "version" ], "title": "CatalogExtension", "type": "object" }, "CatalogProperties": { "properties": { "name": { "title": "Name", "type": "string" }, "url_template": { "title": "Url Template", "type": "string" }, "extensions": { "items": { "$ref": "#/$defs/CatalogExtension" }, "title": "Extensions", "type": "array" } }, "required": [ "name", "url_template", "extensions" ], "title": "CatalogProperties", "type": "object" }, "CatalogProperty": { "description": "A dataset property described in a catalog.", "properties": { "source_collection": { "title": "Source Collection", "type": "string" }, "catalog_field_value_type": { "title": "Catalog Field Value Type", "type": "string" }, "is_required": { "title": "Is Required", "type": "boolean" }, "source_collection_term": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Source Collection Term" }, "catalog_field_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Catalog Field Name" }, "source_collection_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Source Collection Key" } }, "required": [ "source_collection", "catalog_field_value_type", "is_required" ], "title": "CatalogProperty", "type": "object" }, "CatalogSpecification": { "description": "A catalog specifications.", "properties": { "version": { "title": "Version", "type": "string" }, "catalog_properties": { "$ref": "#/$defs/CatalogProperties" }, "dataset_properties": { "items": { "$ref": "#/$defs/CatalogProperty" }, "title": "Dataset Properties", "type": "array" }, "file_properties": { "items": { "$ref": "#/$defs/CatalogProperty" }, "title": "File Properties", "type": "array" } }, "required": [ "version", "catalog_properties", "dataset_properties", "file_properties" ], "title": "CatalogSpecification", "type": "object" }, "DrsPart": { "description": "A fragment of a DRS specification", "properties": { "source_collection": { "title": "Source Collection", "type": "string" }, "source_collection_term": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Source Collection Term" }, "is_required": { "title": "Is Required", "type": "boolean" } }, "required": [ "source_collection", "is_required" ], "title": "DrsPart", "type": "object" }, "DrsSpecification": { "description": "A DRS specification.", "properties": { "type": { "$ref": "#/$defs/DrsType" }, "regex": { "title": "Regex", "type": "string" }, "separator": { "title": "Separator", "type": "string" }, "properties": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Properties" }, "parts": { "items": { "$ref": "#/$defs/DrsPart" }, "title": "Parts", "type": "array" } }, "required": [ "type", "regex", "separator", "parts" ], "title": "DrsSpecification", "type": "object" }, "DrsType": { "description": "The types of DRS specification (directory, file name and dataset id).", "enum": [ "directory", "file_name", "dataset_id" ], "title": "DrsType", "type": "string" } }, "additionalProperties": true, "required": [ "project_id", "description", "drs_specs" ] }
- field catalog_specs: CatalogSpecification | None = None[source]#
The catalog specifications of the project.
- field drs_specs: dict[DrsType, DrsSpecification] [Required][source]#
The DRS specifications of the project (directory, file name and dataset id).