NekUpload.validate package
- class NekUpload.validate.ValidateGeometry(file_path: str)[source]
Bases:
objectClass responsible for all geometry validation checks
- check_schema() bool[source]
Checks whether file conforms to HDF5 geometry schema
- Raises:
GeometryFileException – _description_
- Returns:
Passed
- Return type:
bool
- class NekUpload.validate.ValidateOutput(file_path: str)[source]
Bases:
objectClass responsible for all output file validation checks
- check_checkpoint_from_filter_schema(session_file: str, geometry_file: str, solver, filter_checkpoint_list: list[str], chkpoint_file_list: list[str]) bool[source]
- check_checkpoint_schema(filter_checkpoint_list: list[str], chkpoint_file_list: list[str]) bool[source]
- check_chkpoint_filter_shape_only_vars(session_file: str, geometry_file: str, solver, chkpoint_file: str)[source]
Assumes number of fields in chkpoint file are from VARIABLES list
- Parameters:
session_file (str) – _description_
geometry_file (str) – _description_
solver (_type_) – _description_
chkpoint_file (str) – _description_
- Raises:
ExperimentalException – _description_
- check_commit_is_public() bool[source]
Check that the GitSHA in the file is public
- Returns:
_description_
- Return type:
bool
- check_schema() bool[source]
Check Output file conforms to HDF5 schema
- Raises:
OutputSchemaHDF5Validator – _description_
- Returns:
Passed
- Return type:
bool
- class NekUpload.validate.ValidateSession(file_path: str)[source]
Bases:
objectClass responsible for validation session files
- check_boundary_condition_schema(boundary_condition_files: list[str]) bool[source]
Identifies boundary condition files, and checks against schema
- Parameters:
boundary_condition_files (list[str]) – INput files
- Returns:
Valid
- Return type:
bool
- check_boundary_conditions_reference(boundary_condition_files: list[str]) bool[source]
Checks whetehr all files referenced in BOUNDARYCONDITION in session file are present in the input list
- Parameters:
boundary_condition_files (list[str]) – Input file list
- Raises:
SessionFileException – _description_
- Returns:
Valid
- Return type:
bool
- check_boundary_definition(geometry_file: str) bool[source]
Check that all boundaries defined in session file are present in the geometry file
- Parameters:
geometry_file (str) – Geometry nekg file
- Returns:
Valid if all boundaries in geometry files are defined in nekg file
- Return type:
bool
- check_consistent_output_shape(geometry_file: str, output_file: str, solver: SolverType, field_count: int = 0) tuple[bool, list[str]][source]
- check_expansion_definition(geometry_file: str) bool[source]
Check whether expansion definition reference the composite objects defined in the geometry file
- Parameters:
geometry_file (str) – Path to geometry nekg file
- Returns:
Valid
- Return type:
True
- check_function_reference(function_file_list: list[str]) bool[source]
Checks whetehr all files referenced in FUNCTION in session file are present in the input list
- Parameters:
function_file_list (list[str]) – Input file list
- Raises:
SessionFileException – _description_
- Returns:
Valid
- Return type:
bool
- check_geometry_file_reference(geometry_file: str) bool[source]
Check whether the geometry file provided is the one referencedd by the session file
- Parameters:
geometry_file (str) – Geometry file name
- Raises:
SessionFileException – _description_
- Returns:
Valid
- Return type:
bool
- check_schema() bool[source]
Check file conforms to XML session schema
- Returns:
Passed
- Return type:
bool
- is_valid_xml(xml_file: str, schema_file_path: str) bool[source]
Checks whether XML file conforms to a schema
- Parameters:
xml_file (str) – XML file path
schema_file_path (str) – XSD schema file path
- Raises:
XMLSchemaException – _description_
- Returns:
Passed
- Return type:
bool
Submodules
- NekUpload.validate.exceptions module
ExperimentalExceptionGeometryFileExceptionHDF5SchemaExceptionHDF5SchemaExistenceExceptionHDF5SchemaExtraDefinitionExceptionHDF5SchemaInconsistentExceptionHDF5SchemaMissingDatasetExceptionHDF5SchemaMissingDefinitionExceptionMissingInputFileExceptionMissingOutputFileExceptionOutputFileExceptionSessionFileExceptionXMLSchemaException
- NekUpload.validate.files module
NekGeometryFileNekOutputFileNekSessionFileNekSessionFile.BASIS_TYPENekSessionFile.INTEGRATION_POINTS_TYPENekSessionFile.get_all_boundary_condition_files()NekSessionFile.get_all_defined_boundary_regions()NekSessionFile.get_all_function_files()NekSessionFile.get_equation_type()NekSessionFile.get_expansions()NekSessionFile.get_filters()NekSessionFile.get_geometry_info()NekSessionFile.get_homogeneous_modes()NekSessionFile.get_homogeneous_property()NekSessionFile.get_parameters()NekSessionFile.get_refinements()NekSessionFile.get_solver()NekSessionFile.get_variable_list()NekSessionFile.is_forcing_defined()NekSessionFile.is_movement()
ensure_composite_format()
- NekUpload.validate.geometry module
GeometrySchemaHDF5ValidatorGeometrySchemaHDF5Validator.BASE_GROUPSGeometrySchemaHDF5Validator.DATASETS_1D_MAPSGeometrySchemaHDF5Validator.DATASETS_1D_MESHGeometrySchemaHDF5Validator.DATASETS_2D_MAPSGeometrySchemaHDF5Validator.DATASETS_2D_MESHGeometrySchemaHDF5Validator.DATASETS_3D_MAPSGeometrySchemaHDF5Validator.DATASETS_3D_MESHGeometrySchemaHDF5Validator.DATASETS_MANDATORY_MAPSGeometrySchemaHDF5Validator.DATASETS_MANDATORY_MESHGeometrySchemaHDF5Validator.DATASETS_MAPSGeometrySchemaHDF5Validator.DATASETS_MESHGeometrySchemaHDF5Validator.NO_DIM_CONSTRAINTSGeometrySchemaHDF5Validator.validate()
ValidateGeometry
- NekUpload.validate.hdf5_definitions module
- NekUpload.validate.output module
- NekUpload.validate.session module
ValidateSessionValidateSession.check_boundary_condition_schema()ValidateSession.check_boundary_conditions_reference()ValidateSession.check_boundary_definition()ValidateSession.check_checkpoint_files()ValidateSession.check_consistent_output_shape()ValidateSession.check_expansion_definition()ValidateSession.check_filter_files_reference()ValidateSession.check_function_reference()ValidateSession.check_geometry_file_reference()ValidateSession.check_schema()ValidateSession.get_checkpoint_filter_filenames()ValidateSession.is_valid_xml()