Upload-based metadata editing and refactored upload and entry metadata.
This combines #580 (closed) with a new edit API.
There are lot of duplicated metadata in our mongo collections for processing.Upload
and processing.Calc
. Originally, the search index and archive is only updated from Calc.metadata
and therefore, many upload properties are copied into Calc.metadata
. This should be changed.
-
remove duplicated and redundant metadata from processing.Calc
#580 (closed) -
align metadata style of Upload and Calc. E.g. use metadata
dict in both classes. Also #580 (closed) -
add derived property or function (e.g. all_metadata
) toprocessing.Calc
that produces a merged dict of upload and entry metadata -
create EntryMetadata
(and search index indirectly) from these combined dicts inprocessing.data.py
-
replace all specific search index update operations with one function that is based on these merge metadata dicts -
improve POST uploads/{id}/metadata
. It should run a process that performs all necessary Upload/Calc and search index updates. This will later replace the existing edit API. This also needs to validate the metadata, have a respective pydantic model, etc.
Edited by David Sikter