rompy.core.data.DataBlob#

pydantic model rompy.core.data.DataBlob[source]#

Data source for model ingestion.

Generic data source for files that either need to be copied to the model directory or linked if link is set to True.

Fields:
field id: str = 'data'#

Unique identifier for this data source

Whether to create a symbolic link instead of copying the file

field model_type: Literal['data_blob', 'data_link'] = 'data_blob'#

Model type discriminator

field source: AnyPath [Required]#

URI of the data source, either a local file path or a remote uri

get(destdir: str | Path, name: str | None = None, *args, **kwargs) Path[source]#

Copy or link the data source to a new directory.

Parameters:

destdir (str | Path) – The destination directory to copy or link the data source to.

Returns:

The path to the copied file or created symlink.

Return type:

Path

model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.