Skip to content

Commit

Permalink
Merge pull request #125 from uc-cdis/publicize_pfb_protected_functions
Browse files Browse the repository at this point in the history
 Making a few protected functions public for raw file ingestion
  • Loading branch information
AlbertSnows authored Jul 5, 2024
2 parents 1f3f992 + 7815dcf commit f4e0354
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/pfb/importers/gen3dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/pfb/importers/json.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit f4e0354

Please sign in to comment.