solidipes.loaders package
Submodules
- solidipes.loaders.abaqus module
AbaqusParseAbaqusParseAbaqus._block()ParseAbaqus._data()ParseAbaqus._heading()ParseAbaqus._paragraph()ParseAbaqus._tag()ParseAbaqus._valid_charactersParseAbaqus.commentsParseAbaqus.inp_file()ParseAbaqus.parse()ParseAbaqus.parseComments()ParseAbaqus.parseData()ParseAbaqus.parseTag()ParseAbaqus.ppHeadParseAbaqus.ppText
- solidipes.loaders.binary module
- solidipes.loaders.cached_metadata module
CachedMetadataCachedMetadata._cancel_scheduled_commit()CachedMetadata._commit()CachedMetadata._get_default_cached_attributes()CachedMetadata._get_zodb_file_storage()CachedMetadata._global_cached_metadataCachedMetadata._init_cached_metadata()CachedMetadata._populate_cached_metadata_from_yaml()CachedMetadata._schedule_commit()CachedMetadata._scheduled_commitCachedMetadata._schedulerCachedMetadata._storageCachedMetadata._transaction_managerCachedMetadata._write_cached_metadata_to_yaml()CachedMetadata.cached_loadableCachedMetadata.cached_propertyCachedMetadata.clear_cache()CachedMetadata.clear_cached_metadata()CachedMetadata.close_cached_metadata()CachedMetadata.get_cached_metadata()CachedMetadata.get_global_cached_metadata()CachedMetadata.global_cached_metadataCachedMetadata.is_cache_invalid()CachedMetadata.load_cached_metadata()CachedMetadata.modified_timeCachedMetadata.save_field_to_cache()CachedMetadata.set_cached_metadata_entry()CachedMetadata.update_cached_metadata()CachedMetadata.update_global_cached_metadata()
_default_cached_attributescached_loadablecached_property
- solidipes.loaders.code_snippet module
- solidipes.loaders.data_container module
DataContainerDataContainer._data_collectionDataContainer._has_native_attr()DataContainer._valid_loading()DataContainer.add()DataContainer.copy()DataContainer.dataDataContainer.data_infoDataContainer.default_viewerDataContainer.errorsDataContainer.get()DataContainer.has()DataContainer.load_all()DataContainer.loadableDataContainer.remove()DataContainer.view()
loadablewrap_errors()
- solidipes.loaders.file module
FileFile._supported_extensions()File._valid_extension()File._valid_loading()File._valid_non_empty()File.add_message()File.archive_discussions()File.archived_discussionsFile.check_file_support()File.discussionsFile.file_infoFile.file_statsFile.modified_timeFile.preferred_loader_nameFile.supported_mime_typesFile.valid_loading
LoaderList_supported_extensionsget_cached_preferred_loader()load_file()
- solidipes.loaders.file_sequence module
- solidipes.loaders.geof_mesh module
- solidipes.loaders.gnuplot module
- solidipes.loaders.group module
- solidipes.loaders.hdf5 module
- solidipes.loaders.image module
- solidipes.loaders.image_sequence module
- solidipes.loaders.matlab module
- solidipes.loaders.meshio module
- solidipes.loaders.mime_types module
- solidipes.loaders.notebook module
- solidipes.loaders.parse_inp module
- solidipes.loaders.pdf module
- solidipes.loaders.pyvista_mesh module
DEFAULT_DATA_IDPyvistaMeshPyvistaMesh.add_cell_data()PyvistaMesh.add_point_data()PyvistaMesh.cell_data_namesPyvistaMesh.copy_pyvista_data_to_collection()PyvistaMesh.data_infoPyvistaMesh.default_viewerPyvistaMesh.get_cell_data()PyvistaMesh.get_point_data()PyvistaMesh.get_warped()PyvistaMesh.meshPyvistaMesh.point_data_namesPyvistaMesh.pyvista_meshPyvistaMesh.remove_cell_data()PyvistaMesh.remove_point_data()PyvistaMesh.set_cell_values()PyvistaMesh.set_point_values()PyvistaMesh.supported_mime_types
get_cell_data_from_id_or_array()get_point_data_from_id_or_array()
- solidipes.loaders.sequence module
- solidipes.loaders.symlink module
- solidipes.loaders.table module
- solidipes.loaders.text module
- solidipes.loaders.tikz module
- solidipes.loaders.video module
- solidipes.loaders.xdmf module
- solidipes.loaders.xml module
Module contents
- class solidipes.loaders.Abaqus(**kwargs)[source]
Bases:
CodeSnippet- property mesh
- property meshes
- property parts
- property structure
- supported_mime_types = {'application/fem/abaqus': 'inp'}
List of supported mime types. Override in subclasses.
- property xml
- class solidipes.loaders.Binary(**kwargs)[source]
Bases:
FileFile of unsupported type
- property text
- class solidipes.loaders.CachedMetadata(**kwargs)[source]
Bases:
DataContainer- _get_default_cached_attributes() set[source]
Build the list of cached fields from the class description
- _global_cached_metadata = None
- classmethod _populate_cached_metadata_from_yaml(initial_path='.')[source]
Populate cached metadata from YAML file
- _scheduled_commit = None
- _scheduler = <sched.scheduler object>
- _storage = None
- _transaction_manager = <transaction._manager.TransactionManager object>
- classmethod _write_cached_metadata_to_yaml(initial_path='.')[source]
Write cached metadata to YAML file
- class cached_loadable(func)
Bases:
loadableDecorator class to indicate that a loadable must be cached
- foo(obj, *args, **kwargs)
- foo_setter(obj, value, *args, **kwargs)
- class cached_property(fget=None, fset=None, fdel=None, doc=None)
Bases:
propertyDecorator class to indicate that a property must be cached
- property global_cached_metadata: OOBTree
- class solidipes.loaders.CodeSnippet(**kwargs)[source]
Bases:
Text- property lint
- property lint_errors
- property lint_raw
- supported_mime_types = {'application/mathematica-notebook': ['nb'], 'program/C': ['c', 'h'], 'program/C++': ['cc', 'cpp', 'hh'], 'program/matlab': ['m'], 'program/xfig': ['fig', 'xfig'], 'text/x-script.python': 'py', 'text/x-sh': 'sh', 'text/x-shellscript': 'sh', 'text/x-tex': ['tex', 'latex', 'sty']}
List of supported mime types. Override in subclasses.
- property text
- class solidipes.loaders.DataContainer(initial_data={}, name=None, unique_identifier=None, **kwargs)[source]
Bases:
objectContainer class for other structured data containers
- _data_collection
Dictionary of other DataContainer or arbitrary objects. Set entry to “None” to mark as loadable.
- _has_native_attr(key)[source]
Check if attribute is present, outside of _data_collection, without using __getattr__
- property data
Load all data if necessary and return it
Accessing this property for the first time will load the data. If self.__loaded_data has only one entry, returns it directly.
Override the _load_data method in subclasses to define how data is loaded or built using other data containers.
- property data_info
Returns a multi-line string with information about data keys
- default_viewer
Default viewer for this file. Optionally override this in subclasses.
- errors
stores the error messages during loading
- class solidipes.loaders.File(path=None)[source]
Bases:
CachedMetadata,DataContainerAbstract container class for file metadata
A File can be read from disk and may contain multiple DataContainer entries.
- property archived_discussions
- property discussions
- property file_info
- property file_stats
- property modified_time
- property preferred_loader_name
- supported_mime_types = {}
List of supported mime types. Override in subclasses.
- property valid_loading
- class solidipes.loaders.FileSequence(pattern, paths)[source]
Bases:
Sequence,CachedMetadata,GroupSequence of files
- _abc_impl = <_abc._abc_data object>
- static _find_groups(is_dir_path_dict: dict[str, bool]) dict[str, list[str]][source]
Find groups of file and directory names.
From a list of file and directory names (on a single level), return a dictionary with - key: pattern, - value: list of file and directory names that belong to the group.
- _load_element(n)[source]
Must raise KeyError if element does not exist
Override this method in subclasses.
- property modified_time
- property paths
- class solidipes.loaders.GeofMesh(**kwargs)[source]
Bases:
PyvistaMeshMesh file loaded with pyvista
- property mesh
- supported_mime_types = {'meshing/z-set': 'geof'}
List of supported mime types. Override in subclasses.
- class solidipes.loaders.GnuPlot(**kwargs)[source]
Bases:
CodeSnippet- property image
- supported_mime_types = {'drawing/gnuplot': ['gp', 'gpu', 'gih']}
List of supported mime types. Override in subclasses.
- class solidipes.loaders.Group(pattern: str, paths: list[str], **kwargs)[source]
Bases:
ABCGroup of files and directories.
- _abc_impl = <_abc._abc_data object>
- abstract static _find_groups(is_dir_path_dict: dict[str, bool]) dict[str, list[str]][source]
Find groups of file and directory names.
From a list of file and directory names (on a single level), return a dictionary with - key: pattern, - value: list of file and directory names that belong to the group.
- class solidipes.loaders.HDF5(**kwargs)[source]
Bases:
FileHDF5 loader
- property datasets
- supported_mime_types = {'application/x-hdf': ['h5', 'hdf5'], 'application/x-hdf5': ['hdf', 'h5', 'hdf5']}
List of supported mime types. Override in subclasses.
- class solidipes.loaders.Image(**kwargs)[source]
Bases:
FileImage loaded with PIL
- property exif_data
- property image
- supported_mime_types = {'application/postscript': ['eps', 'ps'], 'image/aces': ['exr'], 'image/apng': ['apng'], 'image/avci': ['avci'], 'image/avcs': ['avcs'], 'image/avif': ['avif', 'hif'], 'image/bmp': ['bmp'], 'image/cgm': ['cgm'], 'image/dicom-rle': ['drle'], 'image/dpx': ['dpx'], 'image/emf': ['emf'], 'image/example': [], 'image/fits': ['fits', 'fit', 'fts'], 'image/g3fax': [], 'image/gif': ['gif'], 'image/heic': ['heic'], 'image/heic-sequence': ['heics'], 'image/heif': ['heif'], 'image/heif-sequence': ['heifs'], 'image/hej2k': ['hej2'], 'image/hsj2': ['hsj2'], 'image/ief': ['ief'], 'image/jls': ['jls'], 'image/jp2': ['jp2', 'jpg2'], 'image/jpeg': ['jpeg', 'jpg', 'jpe', 'jfif'], 'image/jph': ['jph'], 'image/jphc': ['jhc', 'jphc'], 'image/jpm': ['jpm', 'jpgm'], 'image/jpx': ['jpx', 'jpf'], 'image/jxl': ['jxl'], 'image/jxr': ['jxr'], 'image/jxrA': ['jxra'], 'image/jxrS': ['jxrs'], 'image/jxs': ['jxs'], 'image/jxsc': ['jxsc'], 'image/jxsi': ['jxsi'], 'image/jxss': ['jxss'], 'image/ktx': ['ktx'], 'image/ktx2': ['ktx2'], 'image/naplps': [], 'image/png': ['png'], 'image/prs.btif': ['btif', 'btf'], 'image/prs.pti': ['pti'], 'image/pwg-raster': [], 'image/svg+xml': ['svg', 'svgz'], 'image/t38': [], 'image/tiff': ['tiff', 'tif'], 'image/tiff-fx': ['tfx'], 'image/vnd.adobe.photoshop': ['psd'], 'image/vnd.airzip.accelerator.azv': ['azv'], 'image/vnd.cns.inf2': [], 'image/vnd.dece.graphic': ['uvi', 'uvvi', 'uvg', 'uvvg'], 'image/vnd.djvu': ['djvu', 'djv'], 'image/vnd.dvb.subtitle': [], 'image/vnd.dwg': ['dwg'], 'image/vnd.dxf': ['dxf'], 'image/vnd.fastbidsheet': ['fbs'], 'image/vnd.fpx': ['fpx'], 'image/vnd.fst': ['fst'], 'image/vnd.fujixerox.edmics-mmr': ['mmr'], 'image/vnd.fujixerox.edmics-rlc': ['rlc'], 'image/vnd.globalgraphics.pgb': ['PGB', 'pgb'], 'image/vnd.microsoft.icon': ['ico'], 'image/vnd.mix': [], 'image/vnd.ms-modi': ['mdi'], 'image/vnd.net-fpx': [], 'image/vnd.pco.b16': ['b16'], 'image/vnd.radiance': ['hdr', 'rgbe', 'xyze'], 'image/vnd.sealed.png': ['spng', 'spn', 's1n'], 'image/vnd.sealedmedia.softseal.gif': ['sgif', 'sgi', 's1g'], 'image/vnd.sealedmedia.softseal.jpg': ['sjpg', 'sjp', 's1j'], 'image/vnd.svf': [], 'image/vnd.tencent.tap': ['tap'], 'image/vnd.valve.source.texture': ['vtf'], 'image/vnd.wap.wbmp': ['wbmp'], 'image/vnd.xiff': ['xif'], 'image/vnd.zbrush.pcx': ['pcx'], 'image/webp': ['webp'], 'image/wmf': ['wmf'], 'image/x-canon-cr2': ['cr2'], 'image/x-canon-crw': ['crw'], 'image/x-cmu-raster': ['ras'], 'image/x-coreldraw': ['cdr'], 'image/x-coreldrawpattern': ['pat'], 'image/x-coreldrawtemplate': ['cdt'], 'image/x-corelphotopaint': ['cpt'], 'image/x-epson-erf': ['erf'], 'image/x-jg': ['art'], 'image/x-jng': ['jng'], 'image/x-nikon-nef': ['nef'], 'image/x-olympus-orf': ['orf'], 'image/x-portable-anymap': ['pnm'], 'image/x-portable-bitmap': ['pbm'], 'image/x-portable-graymap': ['pgm'], 'image/x-portable-pixmap': ['ppm'], 'image/x-rgb': ['rgb'], 'image/x-xbitmap': ['xbm'], 'image/x-xcf': ['xcf'], 'image/x-xpixmap': ['xpm'], 'image/x-xwindowdump': ['xwd']}
List of supported mime types. Override in subclasses.
- class solidipes.loaders.Markdown(**kwargs)[source]
Bases:
TextMarkdown file
- supported_mime_types = {'text/markdown': 'md'}
List of supported mime types. Override in subclasses.
- class solidipes.loaders.MatlabData(**kwargs)[source]
Bases:
FileMatlab .mat file
- property arrays
- supported_mime_types = {'application/x-matlab-data': 'mat'}
List of supported mime types. Override in subclasses.
- class solidipes.loaders.Meshio(**kwargs)[source]
Bases:
FileFile loaded with meshio
- property mesh
- class solidipes.loaders.Notebook(**kwargs)[source]
Bases:
FileNotebook file, in Jupyter style
- property notebook
- supported_mime_types = {'application/jupyter-notebook': 'ipynb'}
List of supported mime types. Override in subclasses.
- class solidipes.loaders.PDF(**kwargs)[source]
Bases:
FileImage loaded as base64
- property pdf
- supported_mime_types = {'application/pdf': 'pdf'}
List of supported mime types. Override in subclasses.
- class solidipes.loaders.PyvistaMesh(**kwargs)[source]
Bases:
FileMesh file loaded with pyvista
- property cell_data_names
- property data_info
Trigger loading of Pyvista mesh and return info
- default_viewer
Fully loaded pyvista mesh
- get_warped(data_id, factor=1.0)[source]
Returns another PyvistaMesh with the mesh points displaced by the given data.
- Parameters:
data (string) – Name of point data. If data is 1D, the mesh is warped along its normals. Otherwise, the data must have the same number dimensionality as the mesh.
factor (float) – Factor to multiply the displacements by. Defaults to 1.0.
- property mesh
- property point_data_names
- property pyvista_mesh
- set_cell_values(data_id)[source]
Sets the cell values for plotting to the given data.
- Parameters:
data (string) – Name of cell data.
- set_point_values(data_id)[source]
Sets the point values for plotting to the given data.
- Parameters:
data (string) – Name of point data.
- supported_mime_types = {'meshing/AVS': 'avs', 'meshing/GMSH': 'msh', 'meshing/StepFile': 'stl', 'meshing/VTK': ['vtu', 'pvtu', 'vtk']}
List of supported mime types. Override in subclasses.
- class solidipes.loaders.SymLink(**kwargs)[source]
Bases:
FileSymbolic link (special file)
- property linked_file
- class solidipes.loaders.TIKZ(**kwargs)[source]
Bases:
CodeSnippet- property pdf
- supported_mime_types = {'latex/tikz': 'tikz'}
List of supported mime types. Override in subclasses.
- class solidipes.loaders.Table(**kwargs)[source]
Bases:
FileTable file loaded with Pandas
- property header
- supported_mime_types = {'application/numpy/array': 'npy', 'application/vnd.ms-excel': 'xlsx', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': 'xlsx', 'text/csv': 'csv'}
List of supported mime types. Override in subclasses.
- property table
- class solidipes.loaders.Text(**kwargs)[source]
Bases:
FileText file, potentially formatted with markdown
- supported_mime_types = {'application/lammps': ['in', 'data'], 'text/plain': 'txt'}
List of supported mime types. Override in subclasses.
- property text
- class solidipes.loaders.Video(**kwargs)[source]
Bases:
FileVideo file
- supported_mime_types = {'video/1d-interleaved-parityfec': [], 'video/3gpp': [], 'video/3gpp-tt': [], 'video/3gpp2': [], 'video/AV1': [], 'video/BMPEG': [], 'video/BT656': [], 'video/CelB': [], 'video/DV': [], 'video/FFV1': [], 'video/H261': [], 'video/H263': [], 'video/H263-1998': [], 'video/H263-2000': [], 'video/H264': [], 'video/H264-RCDO': [], 'video/H264-SVC': [], 'video/H265': [], 'video/H266': [], 'video/JPEG': [], 'video/MP1S': [], 'video/MP2P': [], 'video/MP2T': [], 'video/MP4V-ES': [], 'video/MPV': [], 'video/SMPTE292M': [], 'video/VP8': [], 'video/VP9': [], 'video/annodex': ['axv'], 'video/dv': ['dif', 'dv'], 'video/encaprtp': [], 'video/example': [], 'video/flexfec': [], 'video/fli': ['fli'], 'video/gl': ['gl'], 'video/iso.segment': ['m4s'], 'video/jpeg2000': [], 'video/jxsv': [], 'video/mj2': ['mj2', 'mjp2'], 'video/mp4': ['mp4', 'mpg4', 'm4v'], 'video/mpeg': ['mpeg', 'mpg', 'mpe', 'm1v', 'm2v'], 'video/mpeg4-generic': [], 'video/nv': [], 'video/ogg': ['ogv'], 'video/parityfec': [], 'video/pointer': [], 'video/quicktime': ['qt', 'mov'], 'video/raptorfec': [], 'video/raw': [], 'video/rtp-enc-aescm128': [], 'video/rtploopback': [], 'video/rtx': [], 'video/scip': [], 'video/smpte291': [], 'video/ulpfec': [], 'video/vc1': [], 'video/vc2': [], 'video/vnd.CCTV': [], 'video/vnd.dece.hd': ['uvh', 'uvvh'], 'video/vnd.dece.mobile': ['uvm', 'uvvm'], 'video/vnd.dece.mp4': ['uvu', 'uvvu'], 'video/vnd.dece.pd': ['uvp', 'uvvp'], 'video/vnd.dece.sd': ['uvs', 'uvvs'], 'video/vnd.dece.video': ['uvv', 'uvvv'], 'video/vnd.directv.mpeg': [], 'video/vnd.directv.mpeg-tts': [], 'video/vnd.dlna.mpeg-tts': [], 'video/vnd.dvb.file': ['dvb'], 'video/vnd.fvt': ['fvt'], 'video/vnd.hns.video': [], 'video/vnd.iptvforum.1dparityfec-1010': [], 'video/vnd.iptvforum.1dparityfec-2005': [], 'video/vnd.iptvforum.2dparityfec-1010': [], 'video/vnd.iptvforum.2dparityfec-2005': [], 'video/vnd.iptvforum.ttsavc': [], 'video/vnd.iptvforum.ttsmpeg2': [], 'video/vnd.motorola.video': [], 'video/vnd.motorola.videop': [], 'video/vnd.mpegurl': ['mxu', 'm4u'], 'video/vnd.ms-playready.media.pyv': ['pyv'], 'video/vnd.nokia.interleaved-multimedia': ['nim'], 'video/vnd.nokia.mp4vr': [], 'video/vnd.nokia.videovoip': [], 'video/vnd.objectvideo': [], 'video/vnd.radgamettools.bink': ['bik', 'bk2'], 'video/vnd.radgamettools.smacker': ['smk'], 'video/vnd.sealed.mpeg1': ['smpg', 's11'], 'video/vnd.sealed.mpeg4': ['s14'], 'video/vnd.sealed.swf': ['sswf', 'ssw'], 'video/vnd.sealedmedia.softseal.mov': ['smov', 'smo', 's1q'], 'video/vnd.uvvu.mp4': [], 'video/vnd.vivo': ['viv'], 'video/vnd.youtube.yt': ['yt'], 'video/webm': ['webm'], 'video/x-flv': ['flv'], 'video/x-la-asf': ['lsf', 'lsx'], 'video/x-matroska': ['mpv', 'mkv'], 'video/x-mng': ['mng'], 'video/x-ms-wm': ['wm'], 'video/x-ms-wmv': ['wmv'], 'video/x-ms-wmx': ['wmx'], 'video/x-ms-wvx': ['wvx'], 'video/x-msvideo': ['avi'], 'video/x-sgi-movie': ['movie']}
List of supported mime types. Override in subclasses.
- property video
- class solidipes.loaders.XDMF(**kwargs)[source]
-
- property _element_count
- property domain
- property grid
- property grids
- property mesh
- property mesh_name
- property n_frames
- supported_mime_types = {'mesh/XDMF': 'xdmf'}
List of supported mime types. Override in subclasses.
- property version
- property xdmf