def run(args): dataset = get_dataset(args) dataset.concepticon = args.concepticon.api dataset.glottolog = args.glottolog.api with_dataset(args, 'makecldf', dataset=dataset) if not dataset.cldf_dir.joinpath('sources.bib').exists(): raise ValueError('The dataset has no sources at {0}'.format( dataset.cldf_dir.joinpath('sources.bib'))) creators, contributors = dataset.get_creators_and_contributors( strict=False) def contrib(d): return { k: v for k, v in d.items() if k in {'name', 'affiliation', 'orcid', 'type'} } with jsonlib.update_ordered(dataset.dir / '.zenodo.json', indent=4) as md: md.update({ 'title': dataset.metadata.title, "access_right": "open", "keywords": sorted( set(md.get('keywords', []) + ["linguistics", "cldf:Wordlist"])), "creators": [contrib(p) for p in creators], "contributors": [contrib(p) for p in contributors], "communities": sorted(md.get('communities', []) + [{ "identifier": "lexibank" }], key=lambda i: i['identifier']), "upload_type": "dataset", }) if dataset.metadata.citation: md['description'] = "<p>Cite the source of the dataset as:</p>\n\n" \ "<blockquote>\n<p>{}</p>\n</blockquote>".format( html.escape(dataset.metadata.citation)) if dataset.metadata.zenodo_license: md['license'] = {'id': dataset.metadata.zenodo_license}
def run(args): res = with_dataset(args, diff) if res == 2: args.log.info( '----------------------------------------------------------------------' ) args.log.info( 'Please commit and push changes to GitHub before releasing the dataset!' ) args.log.info( '----------------------------------------------------------------------' ) return res
def run(args): with_dataset(args, 'create_ref_etc_files')
def run(args): with_dataset(args, 'makecldf') if getattr(args, 'with_cldfreadme', None): cldfreadme.run(args) if getattr(args, 'with_zenodo', None): zenodo.run(args)
def run(args): with_dataset(args, 'makecldf')
def run(args): with_dataset(args, create_language_sheet)
def run(args): with_dataset(args, check_profile)
def run(args): with_dataset(args, args.cmd)
def run(args): with_dataset(args, check)
def run(args): with_dataset(args, 'download')
def run(args): with_dataset(args, check_segments)
def run(args): with_dataset(args, check_phonotactics)