randonneur.templates ==================== .. py:module:: randonneur.templates Attributes ---------- .. autoapisummary:: randonneur.templates.LICENSES randonneur.templates.MAPPINGS randonneur.templates.ROLES Functions --------- .. autoapisummary:: randonneur.templates.create_excel_template randonneur.templates.read_excel_template Module Contents --------------- .. py:function:: create_excel_template(data: List[dict], filepath: pathlib.Path, replace_existing: bool = False) -> pathlib.Path Create an Excel template with optionally some data for a new matching data file. `data` should be a list of dictionaries like `{'source': {}, 'target': {}}`. The keys and values in these sub-dictionaries should be strings, or castable to strings in a way that can be reversed. This function doesn't do any type conversion or other data handling. `filepath` should be the complete filepath of the file to be created, including directory and suffix. `replace_existing`: Flag on whether to overwrite `filepath` if it exists. Returns the filepath of the created file. .. py:function:: read_excel_template(filepath: pathlib.Path, worksheet: str = 'Matching', license_mapping: Optional[dict] = None, field_mapping: Optional[dict] = None) -> randonneur.Datapackage .. py:data:: LICENSES :value: ['CC-BY-4.0', 'CC-BY-NC-SA-4.0', 'CC-BY-ND-4.0', 'CC-BY-SA-4.0', 'CC0-1.0', 'CDL-1.0', 'MIT',... .. py:data:: MAPPINGS :value: ['SIMAPRO_CSV', 'ECOSPOLD2', 'ECOSPOLD1_BIO', 'ECOSPOLD2_BIO', 'ECOSPOLD2_BIO_FLOWMAPPER', 'CUSTOM'] .. py:data:: ROLES :value: ['author', 'publisher', 'maintainer', 'wrangler', 'contributor']