Skip to content

Commit

Permalink
Update commenting
Browse files Browse the repository at this point in the history
Updates some comments in branch changes
  • Loading branch information
ItIsJordan committed Nov 23, 2023
1 parent 6560339 commit 7c828a3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
11 changes: 6 additions & 5 deletions hepdata/modules/records/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ def get_related_datasubmissions(data_submission):
Only returns an object if associated HEPSubmission status is 'finished'
(All submissions this one is relating to)
:param data_submission: TODO
:param data_submission: The datasubmission object to find related data for.
:return: [list] A list of DataSubmission objects
"""
related_submissions = []
Expand All @@ -1112,7 +1112,7 @@ def get_related_to_this_datasubmissions(data_submission):
Get the DataSubmission Objects with a RelatedTable entry
where this doi is referred to in related_doi.
:param data_submission: TODO
:param data_submission: The datasubmission to find the related entries for.
:return: [List] List of DataSubmission objects.
"""
related_submissions = (
Expand All @@ -1132,10 +1132,11 @@ def get_record_data_list(record, data_type):
Generates a dictionary (title/recid) from a list of record IDs.
This must be done as the record contents are not stored within the hepsubmission object.
:param record: TODO
:param data_type: TODO
:return: List: A list of dictionary objects containing record ID and title pairs
:param record: The record used for the query.
:param data_type: Either the related, or related to this data.
:return: [list] A list of dictionary objects containing record ID and title pairs
"""
# Selects the related data based on the data_type flag
data = []
if data_type == "related":
data = get_related_hepsubmissions(record)
Expand Down
1 change: 1 addition & 0 deletions hepdata/modules/records/utils/submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ def process_data_file(recid, version, basepath, data_obj, datasubmission, main_f
datasubmission.keywords.append(keyword)

if overall_status not in ("sandbox", "sandbox_processing"):
# Process the related doi data (only if not in sandbox mode)
if "related_to_table_dois" in data_obj:
for related_doi in data_obj["related_to_table_dois"]:
this_doi = f"{HEPDATA_DOI_PREFIX}/hepdata.{recid}.v{version}/t{tablenum}"
Expand Down

0 comments on commit 7c828a3

Please sign in to comment.