caosadvancedtools.scifolder.withreadme module#

class caosadvancedtools.scifolder.withreadme.DataModel(results: str = 'results', scripts: str = 'scripts', sources: str = 'sources', date: str = 'date', Project: str = 'Project', Analysis: str = 'Analysis', identifier: str = 'identifier', responsible: str = 'responsible', revisionOf: str = 'revisionOf', Experiment: str = 'Experiment', Publication: str = 'Publication', Simulation: str = 'Simulation', binaries: str = 'binaries', sourcecode: str = 'sourceCode', description: str = 'description')#

Bases: object

Analysis: str = 'Analysis'#
Experiment: str = 'Experiment'#
Project: str = 'Project'#
Publication: str = 'Publication'#
Simulation: str = 'Simulation'#
binaries: str = 'binaries'#
date: str = 'date'#
description: str = 'description'#
identifier: str = 'identifier'#
responsible: str = 'responsible'#
results: str = 'results'#
revisionOf: str = 'revisionOf'#
scripts: str = 'scripts'#
sourcecode: str = 'sourceCode'#
sources: str = 'sources'#
class caosadvancedtools.scifolder.withreadme.HeaderField(key, model)#

Bases: object

class caosadvancedtools.scifolder.withreadme.WithREADME#

Bases: object

convert_path(el)#

converts the path in el to unix type

el can be a dict of a string. If el is dict it must have a file key

returns: same type as el

convert_win_paths()#
find_referenced_files(fields)#

iterates over given fields in the header and searches for files

if the field contains a glob. The file entities are attached

property header#
reference_files_from_header(record)#

adds properties that reference the files collected in ref_files

ref_files is expected to be a list of (files, description, recordtype) tuples, where files is the list of file entities, description the description that shall be added to each and recordtype the recordtype that the files shall get as parent. files may be an empty list and description and recordtype may be None.

The files will be grouped according to the keys used in ref_files and the record types. The record types take precedence.

reference_included_records(record, fields, to_be_updated)#

iterates over given fields in the header and searches for files

if the field contains a glob. The file entities are attached

caosadvancedtools.scifolder.withreadme.get_description(value)#
caosadvancedtools.scifolder.withreadme.get_glob(field)#

takes a field which must be a list of globs or dicts.

if it is a dict, it must have either an include or a file key

caosadvancedtools.scifolder.withreadme.get_rt(value)#