Generate ReST formatted data stubs for each data element which can be used as a base for a statically generated site and/or updated by users to correct information. In particular, these receipts are where analysts will be able to enter details about the data elements.

sync_data_folder[source]

sync_data_folder(env:DataIntakeEnv, data_group_type:Union[Delivery, Raw_Data, Dataset])

TODO [summary]

Parameters

env : DataIntakeEnv [description]

data_group_type : Data_Groups_Type [description]

Raises

TypeError [description]

sync_data_group[source]

sync_data_group(env:DataIntakeEnv, data_group:Path)

TODO [summary]

Parameters

env : [type] [description]

data_group : Path [description]

data_group_type : str [description]

Raises

TypeError [description]

sync_receipt[source]

sync_receipt(env:DataIntakeEnv, receipt_path:Path, data_group:Union[Delivery, Raw_Data, Dataset])

TODO [summary]

Parameters

env : DataIntakeEnv [description]

receipt_path : Path [description]

data_group : Union[dm.Dataset, dm.Delivery, dm.Raw_Data] [description]

Raises

TypeError [description]

write_receipt[source]

write_receipt(env:DataIntakeEnv, folder:Path)

Create a receipt for a data group based on information from the sqlite database.

Parameters

env : DataIntakeEnv The data registration environment

folder : Path Folder path to the Data Group to create a receipt for.

group_type : str What type of data group is this data element.

Raises

TypeError Raised if the data group type is not correct

parse_receipt[source]

parse_receipt(env:DataIntakeEnv, receipt_path:Path)

TODO [summary]

Parameters

receipt_path : Path [description]

group_type : str [description]

Returns

dict [description]

Raises

TypeError [description]

import re 

text = '''


File Metadata
-------------
:Files Last Changed: 2021-02-10 20:32:52.637435
:File Size: 1244762
:Number of Files: 3
:Hash: 975bd61edb1adec7b61b8fb459de04e775d286bcc5cd19a4be67c74c04044e46

Report
------
Dummy HTML Report


'''
re.search(r'Report\n-+\n(.*?)\n.*',text,  re.MULTILINE | re.DOTALL)[1]
'Dummy HTML Report'