nv-dfm-lib-common#

Shared schemas and validation utilities used across DFM adapter libraries.

Installation#

This package is typically installed as a dependency of other nv-dfm-lib-* packages:

pip install nv-dfm-lib-common

Schemas#

Schema

Description

GeoJsonFile

Pydantic model for GeoJSON file output

TextureFile

Pydantic model for texture file output

TextureFileList

Pydantic model for texture file list output

XArray Schemas#

Schema definitions and validation for xarray Datasets:

Component

Description

XArraySchema

Main schema class for defining and validating xarray Dataset structure

DataVariable, Coordinate, Attribute

Schema building blocks for variables, coordinates, and attributes

check_dims, check_dtype, check_range, …

Validation functions for dataset dimensions, types, ranges, and CF conventions

Usage#

from nv_dfm_lib_common.schemas import GeoJsonFile, TextureFile, TextureFileList
from nv_dfm_lib_common.schemas.xarray import XArraySchema, check_dims, check_dtype

When building your own adapter library, use nv-dfm-lib-common schemas to keep return types consistent with the rest of the ecosystem.