diff --git a/src/pfb/importers/gen3dict.py b/src/pfb/importers/gen3dict.py index 598fc55..9322a86 100644 --- a/src/pfb/importers/gen3dict.py +++ b/src/pfb/importers/gen3dict.py @@ -20,13 +20,13 @@ def from_dict(ctx, url_or_path): """ try: with ctx.obj["writer"] as writer: - _from_dict(writer, url_or_path) + write_from_dict(writer, url_or_path) except Exception: click.secho("Failed!", fg="red", bold=True, err=True) raise -def _from_dict(writer, url_or_path): +def write_from_dict(writer, url_or_path): if writer.isatty: click.secho("Error: cannot output to TTY.", fg="red", bold=True, err=True) return diff --git a/src/pfb/importers/json.py b/src/pfb/importers/json.py index b4d71c0..b72ad81 100644 --- a/src/pfb/importers/json.py +++ b/src/pfb/importers/json.py @@ -74,11 +74,11 @@ def _from_json(metadata, path, program, project): if isinstance(json_data, dict): json_data = [json_data] for json_record in json_data: - record = _convert_json(node_name, json_record, program, project, link_dests) + record = convert_json(node_name, json_record, program, project, link_dests) yield record -def _convert_json(node_name, json_record, program, project, link_dests): +def convert_json(node_name, json_record, program, project, link_dests): relations = [] try: node_id = json_record["submitter_id"]