-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Let the insdc_ingest_user submit data with missing required fields. #2281
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,6 +60,7 @@ def parse_ndjson(ndjson_data: str) -> Sequence[UnprocessedEntry]: | |
json_str_processed = json_str.replace("\N{NO-BREAK SPACE}", " ") | ||
json_object = json.loads(json_str_processed) | ||
unprocessed_data = UnprocessedData( | ||
submitter=json_object["submitter"], | ||
metadata=json_object["data"]["metadata"], | ||
unalignedNucleotideSequences=json_object["data"]["unalignedNucleotideSequences"], | ||
) | ||
|
@@ -157,6 +158,7 @@ def enrich_with_nextclade( | |
for entry in unprocessed: | ||
id = entry.accessionVersion | ||
input_metadata[id] = entry.data.metadata | ||
input_metadata[id]["submitter"] = entry.data.submitter | ||
aligned_aminoacid_sequences[id] = {} | ||
unaligned_nucleotide_sequences[id] = {} | ||
aligned_nucleotide_sequences[id] = {} | ||
|
@@ -513,7 +515,11 @@ def process_single( | |
) | ||
output_metadata[output_field] = processing_result.datum | ||
# TODO(#2249): Do not throw an error if the submitter is insdc_ingest_user. | ||
if null_per_backend(processing_result.datum) and spec.required: | ||
if ( | ||
null_per_backend(processing_result.datum) | ||
and spec.required | ||
and unprocessed.inputMetadata["submitter"] != "insdc_ingest_user" | ||
corneliusroemer marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was wondering whether it's actually a good idea to hardcode a username here? What if someone else installs an own Loculus instance with its own Keycloak, where that ingest user has a different name? Wouldn't it be better to configure something like a "user that may submit broken data" list per config/Helm chart to the pipeline? |
||
): | ||
errors.append( | ||
ProcessingAnnotation( | ||
source=[ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could have also deleted the TODO. Seems to be done now ;)